• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
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.
9  */
10 
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
13 
14 #include "webrtc/base/scoped_ptr.h"
15 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
16 #include "webrtc/modules/rtp_rtcp/source/bitrate.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
18 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
19 #include "webrtc/typedefs.h"
20 
21 namespace webrtc {
22 
23 class RTPReceiverVideo : public RTPReceiverStrategy {
24  public:
25   explicit RTPReceiverVideo(RtpData* data_callback);
26 
27   virtual ~RTPReceiverVideo();
28 
29   int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header,
30                          const PayloadUnion& specific_payload,
31                          bool is_red,
32                          const uint8_t* packet,
33                          size_t packet_length,
34                          int64_t timestamp,
35                          bool is_first_packet) override;
36 
GetTelephoneEventHandler()37   TelephoneEventHandler* GetTelephoneEventHandler() { return NULL; }
38 
39   int GetPayloadTypeFrequency() const override;
40 
41   RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override;
42 
43   bool ShouldReportCsrcChanges(uint8_t payload_type) const override;
44 
45   int32_t OnNewPayloadTypeCreated(
46       const char payload_name[RTP_PAYLOAD_NAME_SIZE],
47       int8_t payload_type,
48       uint32_t frequency) override;
49 
50   int32_t InvokeOnInitializeDecoder(
51       RtpFeedback* callback,
52       int8_t payload_type,
53       const char payload_name[RTP_PAYLOAD_NAME_SIZE],
54       const PayloadUnion& specific_payload) const override;
55 
56   void SetPacketOverHead(uint16_t packet_over_head);
57 };
58 }  // namespace webrtc
59 
60 #endif  // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
61