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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Interface to the rtp receiver. 5 // Interface to the rtp receiver.
6 6
7 #ifndef MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_ 7 #ifndef MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
8 #define MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_ 8 #define MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "media/cast/cast_config.h" 11 #include "media/cast/cast_config.h"
12 #include "media/cast/rtcp/rtcp.h" 12 #include "media/cast/rtcp/rtcp.h"
13 #include "media/cast/rtp_receiver/receiver_stats.h" 13 #include "media/cast/rtp_receiver/receiver_stats.h"
14 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h" 14 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h"
15 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" 15 #include "media/cast/rtp_receiver/rtp_receiver_defines.h"
16 16
17 namespace media { 17 namespace media {
18 namespace cast { 18 namespace cast {
19 19
20 class RtpReceiver : public RtpParser { 20 class RtpReceiver : public RtpParser {
hubbe 2014/04/24 00:31:13 No need to inherit the parser anymore. Please chan
miu 2014/04/24 21:03:55 Done.
21 public: 21 public:
22 RtpReceiver(base::TickClock* clock, 22 RtpReceiver(base::TickClock* clock,
23 const AudioReceiverConfig* audio_config, 23 const AudioReceiverConfig* audio_config,
24 const VideoReceiverConfig* video_config); 24 const VideoReceiverConfig* video_config);
25 virtual ~RtpReceiver(); 25 virtual ~RtpReceiver();
26 26
27 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); 27 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length);
28 28
29 bool ReceivedPacket(const uint8* packet, size_t length); 29 bool ReceivedPacket(const uint8* packet, size_t length);
30 30
31 RtpReceiverStatistics* GetStatistics() { 31 RtpReceiverStatistics* GetStatistics() {
32 return &stats_; 32 return &stats_;
33 } 33 }
34 34
35 protected:
36 // Subclasses implement this to consume and process deserialized packets.
37 virtual void OnReceivedPayloadData(const uint8* payload_data,
38 size_t payload_size,
39 const RtpCastHeader& rtp_header) = 0;
40
35 private: 41 private:
36 ReceiverStats stats_; 42 ReceiverStats stats_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(RtpReceiver); 44 DISALLOW_COPY_AND_ASSIGN(RtpReceiver);
39 }; 45 };
40 46
41 } // namespace cast 47 } // namespace cast
42 } // namespace media 48 } // namespace media
43 49
44 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_ 50 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698