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

Side by Side Diff: media/cast/rtp_receiver/rtp_receiver.h

Issue 214273003: [Cast] Remove AudioDecoder's dependency on WebRTC, and refactor/clean-up AudioReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/rtp_receiver_defines.h" 13 #include "media/cast/rtp_receiver/rtp_receiver_defines.h"
14 14
15 namespace media { 15 namespace media {
16 namespace cast { 16 namespace cast {
17 17
18 class RtpData { 18 class RtpData {
19 public: 19 public:
20 virtual void OnReceivedPayloadData(const uint8* payload_data, 20 virtual void OnReceivedPayloadData(const uint8* payload_data,
21 size_t payload_size, 21 size_t payload_size,
22 const RtpCastHeader* rtp_header) = 0; 22 const RtpCastHeader& rtp_header) = 0;
23 23
24 protected: 24 protected:
25 virtual ~RtpData() {} 25 virtual ~RtpData() {}
26 }; 26 };
27 27
28 class ReceiverStats; 28 class ReceiverStats;
29 class RtpParser; 29 class RtpParser;
30 30
31 class RtpReceiver { 31 class RtpReceiver : public RtpReceiverStatistics {
32 public: 32 public:
33 RtpReceiver(base::TickClock* clock, 33 RtpReceiver(base::TickClock* clock,
34 const AudioReceiverConfig* audio_config, 34 const AudioReceiverConfig* audio_config,
35 const VideoReceiverConfig* video_config, 35 const VideoReceiverConfig* video_config,
36 RtpData* incoming_payload_callback); 36 RtpData* incoming_payload_callback);
37 ~RtpReceiver(); 37 virtual ~RtpReceiver();
38 38
39 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length); 39 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length);
40 40
41 bool ReceivedPacket(const uint8* packet, size_t length); 41 bool ReceivedPacket(const uint8* packet, size_t length);
42 42
43 void GetStatistics(uint8* fraction_lost, 43 virtual void GetStatistics(uint8* fraction_lost,
44 uint32* cumulative_lost, // 24 bits valid. 44 uint32* cumulative_lost, // 24 bits valid.
45 uint32* extended_high_sequence_number, 45 uint32* extended_high_sequence_number,
46 uint32* jitter); 46 uint32* jitter) OVERRIDE;
47 47
48 private: 48 private:
49 scoped_ptr<ReceiverStats> stats_; 49 scoped_ptr<ReceiverStats> stats_;
50 scoped_ptr<RtpParser> parser_; 50 scoped_ptr<RtpParser> parser_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(RtpReceiver); 52 DISALLOW_COPY_AND_ASSIGN(RtpReceiver);
53 }; 53 };
54 54
55 } // namespace cast 55 } // namespace cast
56 } // namespace media 56 } // namespace media
57 57
58 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_ 58 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698