blob: 8ffea218feb97f1f966ca551bd695d49984ed205 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
pwestin@webrtc.orgf6bb77a2012-01-24 17:16:59 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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 Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
12#define MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#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 Bonadei71207422017-09-15 13:58:09 +020018#include "typedefs.h" // NOLINT(build/include)
niklase@google.com470e71d2011-07-07 08:21:25 +000019
20namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000021
phoglund@webrtc.org07bf43c2012-12-18 15:40:53 +000022class RTPReceiverVideo : public RTPReceiverStrategy {
pwestin@webrtc.org49888ce2012-04-27 05:25:53 +000023 public:
pbos@webrtc.orgb5e6bfc2014-09-12 11:05:55 +000024 explicit RTPReceiverVideo(RtpData* data_callback);
niklase@google.com470e71d2011-07-07 08:21:25 +000025
pwestin@webrtc.org49888ce2012-04-27 05:25:53 +000026 virtual ~RTPReceiverVideo();
niklase@google.com470e71d2011-07-07 08:21:25 +000027
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000028 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.org07bf43c2012-12-18 15:40:53 +000035
danilchap799a9d02016-09-22 03:36:27 -070036 TelephoneEventHandler* GetTelephoneEventHandler() override { return NULL; }
37
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000038 RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override;
phoglund@webrtc.org07bf43c2012-12-18 15:40:53 +000039
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000040 bool ShouldReportCsrcChanges(uint8_t payload_type) const override;
phoglund@webrtc.org5accd372013-01-22 12:31:01 +000041
magjed56124bd2016-11-24 09:34:46 -080042 int32_t OnNewPayloadTypeCreated(const CodecInst& audio_codec) override;
niklase@google.com470e71d2011-07-07 08:21:25 +000043
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000044 int32_t InvokeOnInitializeDecoder(
phoglund@webrtc.org07bf43c2012-12-18 15:40:53 +000045 RtpFeedback* callback,
wu@webrtc.org822fbd82013-08-15 23:38:54 +000046 int8_t payload_type,
phoglund@webrtc.orga7303bd2013-02-05 15:12:39 +000047 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000048 const PayloadUnion& specific_payload) const override;
niklase@google.com470e71d2011-07-07 08:21:25 +000049
pbos@webrtc.org2f446732013-04-08 11:08:41 +000050 void SetPacketOverHead(uint16_t packet_over_head);
skvlad98bb6642016-04-07 15:36:45 -070051
52 private:
53 OneTimeEvent first_packet_received_;
niklase@google.com470e71d2011-07-07 08:21:25 +000054};
phoglund@webrtc.orga7303bd2013-02-05 15:12:39 +000055} // namespace webrtc
56
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020057#endif // MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_