Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: media/cast/test/utility/in_process_receiver.h

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/in_process_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/utility/in_process_receiver.h
diff --git a/media/cast/test/utility/in_process_receiver.h b/media/cast/test/utility/in_process_receiver.h
index cd957d4f778ec400300446aae4804382df0e71cc..8248cebc71f36461f26ef120bd8260741cdc616c 100644
--- a/media/cast/test/utility/in_process_receiver.h
+++ b/media/cast/test/utility/in_process_receiver.h
@@ -33,6 +33,7 @@ namespace cast {
class CastEnvironment;
class CastReceiver;
class UdpTransport;
+class InProcessReceiver;
// Common base functionality for an in-process Cast receiver. This is meant to
// be subclassed with the OnAudioFrame() and OnVideoFrame() methods implemented,
@@ -40,6 +41,23 @@ class UdpTransport;
// rather than on the boilerplate "glue" code.
class InProcessReceiver {
public:
+ class TransportClient : public CastTransportSender::Client {
+ public:
+ explicit TransportClient(InProcessReceiver* in_process_receiver)
+ : in_process_receiver_(in_process_receiver) {}
+
+ void OnStatusChanged(CastTransportStatus status) final;
+ void OnLoggingEventsReceived(
+ scoped_ptr<std::vector<FrameEvent>> frame_events,
+ scoped_ptr<std::vector<PacketEvent>> packet_events) final {}
+ void ProcessRtpPacket(scoped_ptr<Packet> packet) final;
+
+ private:
+ InProcessReceiver* in_process_receiver_;
+
+ DISALLOW_COPY_AND_ASSIGN(TransportClient);
+ };
+
// Construct a receiver with the given configuration. |remote_end_point| can
// be left empty, if the transport should automatically mate with the first
// remote sender it encounters.
« no previous file with comments | « media/cast/test/simulator.cc ('k') | media/cast/test/utility/in_process_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698