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

Unified Diff: media/cast/rtp_receiver/rtp_receiver.h

Issue 250363002: [Cast] Clean-up RtpCastHeader and RtpParser, removing the last WebRTC dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hubbe's comment. Created 6 years, 8 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
Index: media/cast/rtp_receiver/rtp_receiver.h
diff --git a/media/cast/rtp_receiver/rtp_receiver.h b/media/cast/rtp_receiver/rtp_receiver.h
index 421d124b4452a6c3f46ae8f5ebdf2e27aaebe717..9d5194c1482b1f6c30ed3d20fe059b4167cb054d 100644
--- a/media/cast/rtp_receiver/rtp_receiver.h
+++ b/media/cast/rtp_receiver/rtp_receiver.h
@@ -17,7 +17,9 @@
namespace media {
namespace cast {
-class RtpReceiver : public RtpParser {
+// TODO(miu): This is a good candidate to contain common functionality that's
+// identical in both AudioReceiver and VideoReceiver.
+class RtpReceiver {
public:
RtpReceiver(base::TickClock* clock,
const AudioReceiverConfig* audio_config,
@@ -32,7 +34,14 @@ class RtpReceiver : public RtpParser {
return &stats_;
}
+ protected:
+ // Subclasses implement this to consume and process deserialized packets.
+ virtual void OnReceivedPayloadData(const uint8* payload_data,
+ size_t payload_size,
+ const RtpCastHeader& rtp_header) = 0;
+
private:
+ RtpParser packet_parser_;
ReceiverStats stats_;
DISALLOW_COPY_AND_ASSIGN(RtpReceiver);
« no previous file with comments | « media/cast/rtp_receiver/rtp_parser/test/rtp_packet_builder.cc ('k') | media/cast/rtp_receiver/rtp_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698