2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
14 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
15 #include "webrtc/modules/rtp_rtcp/source/bitrate.h"
16 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
18 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
19 #include "webrtc/typedefs.h"
23 class RTPReceiverVideo : public RTPReceiverStrategy {
25 explicit RTPReceiverVideo(RtpData* data_callback);
27 virtual ~RTPReceiverVideo();
29 virtual int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header,
30 const PayloadUnion& specific_payload,
32 const uint8_t* packet,
33 uint16_t packet_length,
35 bool is_first_packet) OVERRIDE;
37 TelephoneEventHandler* GetTelephoneEventHandler() { return NULL; }
39 int GetPayloadTypeFrequency() const OVERRIDE;
41 virtual RTPAliveType ProcessDeadOrAlive(
42 uint16_t last_payload_length) const OVERRIDE;
44 virtual bool ShouldReportCsrcChanges(uint8_t payload_type) const OVERRIDE;
46 virtual int32_t OnNewPayloadTypeCreated(
47 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
49 uint32_t frequency) OVERRIDE;
51 virtual int32_t InvokeOnInitializeDecoder(
52 RtpFeedback* callback,
55 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
56 const PayloadUnion& specific_payload) const OVERRIDE;
58 void SetPacketOverHead(uint16_t packet_over_head);
61 int32_t BuildRTPheader(const WebRtcRTPHeader* rtp_header,
62 uint8_t* data_buffer) const;
66 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_