2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-01-24 17:16:59 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
|
|
|
|
|
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
|
|
|
|
|
|
2016-04-07 15:36:45 -07:00
|
|
|
#include "webrtc/base/onetimeevent.h"
|
2015-11-04 08:31:52 +01:00
|
|
|
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
2013-02-05 15:12:39 +00:00
|
|
|
#include "webrtc/modules/rtp_rtcp/source/bitrate.h"
|
|
|
|
|
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
|
|
|
|
|
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
|
|
|
|
|
#include "webrtc/typedefs.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2012-12-18 15:40:53 +00:00
|
|
|
class RTPReceiverVideo : public RTPReceiverStrategy {
|
2012-04-27 05:25:53 +00:00
|
|
|
public:
|
2014-09-12 11:05:55 +00:00
|
|
|
explicit RTPReceiverVideo(RtpData* data_callback);
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2012-04-27 05:25:53 +00:00
|
|
|
virtual ~RTPReceiverVideo();
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
int32_t ParseRtpPacket(WebRtcRTPHeader* rtp_header,
|
|
|
|
|
const PayloadUnion& specific_payload,
|
|
|
|
|
bool is_red,
|
|
|
|
|
const uint8_t* packet,
|
|
|
|
|
size_t packet_length,
|
|
|
|
|
int64_t timestamp,
|
|
|
|
|
bool is_first_packet) override;
|
2012-12-18 15:40:53 +00:00
|
|
|
|
2016-04-29 06:09:15 -07:00
|
|
|
TelephoneEventHandler* GetTelephoneEventHandler() override { return NULL; }
|
2013-08-15 23:38:54 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
int GetPayloadTypeFrequency() const override;
|
2012-12-18 15:40:53 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
RTPAliveType ProcessDeadOrAlive(uint16_t last_payload_length) const override;
|
2012-12-18 15:40:53 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
bool ShouldReportCsrcChanges(uint8_t payload_type) const override;
|
2013-01-22 12:31:01 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
int32_t OnNewPayloadTypeCreated(
|
2013-02-05 15:12:39 +00:00
|
|
|
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
2013-08-15 23:38:54 +00:00
|
|
|
int8_t payload_type,
|
2015-03-04 12:58:35 +00:00
|
|
|
uint32_t frequency) override;
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
int32_t InvokeOnInitializeDecoder(
|
2012-12-18 15:40:53 +00:00
|
|
|
RtpFeedback* callback,
|
2013-08-15 23:38:54 +00:00
|
|
|
int8_t payload_type,
|
2013-02-05 15:12:39 +00:00
|
|
|
const char payload_name[RTP_PAYLOAD_NAME_SIZE],
|
2015-03-04 12:58:35 +00:00
|
|
|
const PayloadUnion& specific_payload) const override;
|
2011-10-13 15:19:55 +00:00
|
|
|
|
2013-04-08 11:08:41 +00:00
|
|
|
void SetPacketOverHead(uint16_t packet_over_head);
|
2016-04-07 15:36:45 -07:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
OneTimeEvent first_packet_received_;
|
2011-07-07 08:21:25 +00:00
|
|
|
};
|
2013-02-05 15:12:39 +00:00
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RECEIVER_VIDEO_H_
|