| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ | 11 #ifndef WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
| 12 #define WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ | 12 #define WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
| 13 | 13 |
| 14 #include <list> | 14 #include <list> |
| 15 #include <map> | 15 #include <map> |
| 16 #include <memory> | 16 #include <memory> |
| 17 #include <string> | 17 #include <string> |
| 18 #include <vector> | 18 #include <vector> |
| 19 | 19 |
| 20 #include "webrtc/base/constructormagic.h" | 20 #include "webrtc/base/constructormagic.h" |
| 21 #include "webrtc/base/criticalsection.h" | 21 #include "webrtc/base/criticalsection.h" |
| 22 #include "webrtc/call/rtp_packet_sink_interface.h" |
| 22 #include "webrtc/modules/include/module_common_types.h" | 23 #include "webrtc/modules/include/module_common_types.h" |
| 23 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" | 24 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
| 24 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" | 25 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
| 25 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" | 26 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
| 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 27 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
| 27 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 28 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 28 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" | 29 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" |
| 29 #include "webrtc/modules/video_coding/include/video_coding_defines.h" | 30 #include "webrtc/modules/video_coding/include/video_coding_defines.h" |
| 30 #include "webrtc/modules/video_coding/packet_buffer.h" | 31 #include "webrtc/modules/video_coding/packet_buffer.h" |
| 31 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" | 32 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 51 class UlpfecReceiver; | 52 class UlpfecReceiver; |
| 52 class VCMTiming; | 53 class VCMTiming; |
| 53 | 54 |
| 54 namespace vcm { | 55 namespace vcm { |
| 55 class VideoReceiver; | 56 class VideoReceiver; |
| 56 } // namespace vcm | 57 } // namespace vcm |
| 57 | 58 |
| 58 class RtpVideoStreamReceiver : public RtpData, | 59 class RtpVideoStreamReceiver : public RtpData, |
| 59 public RecoveredPacketReceiver, | 60 public RecoveredPacketReceiver, |
| 60 public RtpFeedback, | 61 public RtpFeedback, |
| 62 public RtpPacketSinkInterface, |
| 61 public VCMFrameTypeCallback, | 63 public VCMFrameTypeCallback, |
| 62 public VCMPacketRequestCallback, | 64 public VCMPacketRequestCallback, |
| 63 public video_coding::OnReceivedFrameCallback, | 65 public video_coding::OnReceivedFrameCallback, |
| 64 public video_coding::OnCompleteFrameCallback, | 66 public video_coding::OnCompleteFrameCallback, |
| 65 public CallStatsObserver { | 67 public CallStatsObserver { |
| 66 public: | 68 public: |
| 67 RtpVideoStreamReceiver( | 69 RtpVideoStreamReceiver( |
| 68 Transport* transport, | 70 Transport* transport, |
| 69 RtcpRttStats* rtt_stats, | 71 RtcpRttStats* rtt_stats, |
| 70 PacketRouter* packet_router, | 72 PacketRouter* packet_router, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 89 void StopReceive(); | 91 void StopReceive(); |
| 90 | 92 |
| 91 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); | 93 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); |
| 92 | 94 |
| 93 void FrameContinuous(uint16_t seq_num); | 95 void FrameContinuous(uint16_t seq_num); |
| 94 | 96 |
| 95 void FrameDecoded(uint16_t seq_num); | 97 void FrameDecoded(uint16_t seq_num); |
| 96 | 98 |
| 97 void SignalNetworkState(NetworkState state); | 99 void SignalNetworkState(NetworkState state); |
| 98 | 100 |
| 99 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. | 101 // Implements RtpPacketSinkInterface. |
| 100 void OnRtpPacket(const RtpPacketReceived& packet); | 102 void OnRtpPacket(const RtpPacketReceived& packet) override; |
| 101 | 103 |
| 102 // Implements RtpData. | 104 // Implements RtpData. |
| 103 int32_t OnReceivedPayloadData(const uint8_t* payload_data, | 105 int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
| 104 size_t payload_size, | 106 size_t payload_size, |
| 105 const WebRtcRTPHeader* rtp_header) override; | 107 const WebRtcRTPHeader* rtp_header) override; |
| 106 // Implements RecoveredPacketReceiver. | 108 // Implements RecoveredPacketReceiver. |
| 107 void OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; | 109 void OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; |
| 108 | 110 |
| 109 // Implements RtpFeedback. | 111 // Implements RtpFeedback. |
| 110 int32_t OnInitializeDecoder(int8_t payload_type, | 112 int32_t OnInitializeDecoder(int8_t payload_type, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // Maps a payload type to a map of out-of-band supplied codec parameters. | 199 // Maps a payload type to a map of out-of-band supplied codec parameters. |
| 198 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; | 200 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; |
| 199 int16_t last_payload_type_ = -1; | 201 int16_t last_payload_type_ = -1; |
| 200 | 202 |
| 201 bool has_received_frame_; | 203 bool has_received_frame_; |
| 202 }; | 204 }; |
| 203 | 205 |
| 204 } // namespace webrtc | 206 } // namespace webrtc |
| 205 | 207 |
| 206 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ | 208 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ |
| OLD | NEW |