summaryrefslogtreecommitdiffstats
path: root/media/cast/rtp_receiver/rtp_receiver.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/cast/rtp_receiver/rtp_receiver.h')
-rw-r--r--media/cast/rtp_receiver/rtp_receiver.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/media/cast/rtp_receiver/rtp_receiver.h b/media/cast/rtp_receiver/rtp_receiver.h
index 421d124..9d5194c 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);