niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
pwestin@webrtc.org | f6bb77a | 2012-01-24 17:16:59 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ |
| 12 | #define MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 15 | #include "modules/rtp_rtcp/source/rtp_receiver_strategy.h" |
| 16 | #include "modules/rtp_rtcp/source/rtp_utility.h" |
| 17 | #include "rtc_base/onetimeevent.h" |
Mirko Bonadei | 7120742 | 2017-09-15 13:58:09 +0200 | [diff] [blame^] | 18 | #include "typedefs.h" // NOLINT(build/include) |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 21 | |
phoglund@webrtc.org | 07bf43c | 2012-12-18 15:40:53 +0000 | [diff] [blame] | 22 | class RTPReceiverVideo : public RTPReceiverStrategy { |
pwestin@webrtc.org | 49888ce | 2012-04-27 05:25:53 +0000 | [diff] [blame] | 23 | public: |
pbos@webrtc.org | b5e6bfc | 2014-09-12 11:05:55 +0000 | [diff] [blame] | 24 | explicit RTPReceiverVideo(RtpData* data_callback); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 25 | |
pwestin@webrtc.org | 49888ce | 2012-04-27 05:25:53 +0000 | [diff] [blame] | 26 | virtual ~RTPReceiverVideo(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 27 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 28 | int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header, |
| 29 | const PayloadUnion& specific_payload, |
| 30 | bool is_red, |
| 31 | const uint8_t* packet, |
| 32 | size_t packet_length, |
| 33 | int64_t timestamp, |
| 34 | bool is_first_packet) override; |
phoglund@webrtc.org | 07bf43c | 2012-12-18 15:40:53 +0000 | [diff] [blame] | 35 | |
danilchap | 799a9d0 | 2016-09-22 03:36:27 -0700 | [diff] [blame] | 36 | TelephoneEventHandler* GetTelephoneEventHandler() override { return NULL; } |
| 37 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 38 | RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override; |
phoglund@webrtc.org | 07bf43c | 2012-12-18 15:40:53 +0000 | [diff] [blame] | 39 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 40 | bool ShouldReportCsrcChanges(uint8_t payload_type) const override; |
phoglund@webrtc.org | 5accd37 | 2013-01-22 12:31:01 +0000 | [diff] [blame] | 41 | |
magjed | 56124bd | 2016-11-24 09:34:46 -0800 | [diff] [blame] | 42 | int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 43 | |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 44 | int32_t InvokeOnInitializeDecoder( |
phoglund@webrtc.org | 07bf43c | 2012-12-18 15:40:53 +0000 | [diff] [blame] | 45 | RtpFeedback* callback, |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 46 | int8_t payload_type, |
phoglund@webrtc.org | a7303bd | 2013-02-05 15:12:39 +0000 | [diff] [blame] | 47 | const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
kjellander@webrtc.org | 14665ff | 2015-03-04 12:58:35 +0000 | [diff] [blame] | 48 | const PayloadUnion& specific_payload) const override; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 49 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 50 | void SetPacketOverHead(uint16_t packet_over_head); |
skvlad | 98bb664 | 2016-04-07 15:36:45 -0700 | [diff] [blame] | 51 | |
| 52 | private: |
| 53 | OneTimeEvent first_packet_received_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 54 | }; |
phoglund@webrtc.org | a7303bd | 2013-02-05 15:12:39 +0000 | [diff] [blame] | 55 | } // namespace webrtc |
| 56 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 57 | #endif // MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_ |