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); |