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
3 // found in the LICENSE file.
5 // Interface to the rtp receiver.
7 #ifndef MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
8 #define MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "media/cast/cast_config.h"
12 #include "media/cast/rtcp/rtcp.h"
13 #include "media/cast/rtp_receiver/rtp_receiver_defines.h"
20 virtual void OnReceivedPayloadData(const uint8* payload_data,
22 const RtpCastHeader* rtp_header) = 0;
33 RtpReceiver(base::TickClock* clock,
34 const AudioReceiverConfig* audio_config,
35 const VideoReceiverConfig* video_config,
36 RtpData* incoming_payload_callback);
39 static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length);
41 bool ReceivedPacket(const uint8* packet, size_t length);
43 void GetStatistics(uint8* fraction_lost,
44 uint32* cumulative_lost, // 24 bits valid.
45 uint32* extended_high_sequence_number,
49 scoped_ptr<ReceiverStats> stats_;
50 scoped_ptr<RtpParser> parser_;
52 DISALLOW_COPY_AND_ASSIGN(RtpReceiver);
58 #endif // MEDIA_CAST_RTP_RECEIVER_RTP_RECEIVER_H_