| 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_STREAM_RECEIVER_H_ | 11 #ifndef WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ |
| 12 #define WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ | 12 #define WEBRTC_VIDEO_RTP_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_demuxer.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 18 matching lines...) Expand all Loading... |
| 50 class Transport; | 51 class Transport; |
| 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 RtpStreamReceiver : public RtpData, | 59 class RtpStreamReceiver : public RtpData, |
| 59 public RtpFeedback, | 60 public RtpFeedback, |
| 61 public RtpPacketSinkInterface, |
| 60 public VCMFrameTypeCallback, | 62 public VCMFrameTypeCallback, |
| 61 public VCMPacketRequestCallback, | 63 public VCMPacketRequestCallback, |
| 62 public video_coding::OnReceivedFrameCallback, | 64 public video_coding::OnReceivedFrameCallback, |
| 63 public video_coding::OnCompleteFrameCallback, | 65 public video_coding::OnCompleteFrameCallback, |
| 64 public CallStatsObserver { | 66 public CallStatsObserver { |
| 65 public: | 67 public: |
| 66 RtpStreamReceiver( | 68 RtpStreamReceiver( |
| 67 Transport* transport, | 69 Transport* transport, |
| 68 RtcpRttStats* rtt_stats, | 70 RtcpRttStats* rtt_stats, |
| 69 PacketRouter* packet_router, | 71 PacketRouter* packet_router, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 88 void StopReceive(); | 90 void StopReceive(); |
| 89 | 91 |
| 90 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); | 92 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); |
| 91 | 93 |
| 92 void FrameContinuous(uint16_t seq_num); | 94 void FrameContinuous(uint16_t seq_num); |
| 93 | 95 |
| 94 void FrameDecoded(uint16_t seq_num); | 96 void FrameDecoded(uint16_t seq_num); |
| 95 | 97 |
| 96 void SignalNetworkState(NetworkState state); | 98 void SignalNetworkState(NetworkState state); |
| 97 | 99 |
| 98 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. | 100 // Implements RtpPacketSinkInterface. |
| 99 void OnRtpPacket(const RtpPacketReceived& packet); | 101 void OnRtpPacket(const RtpPacketReceived& packet) override; |
| 100 | 102 |
| 101 // Implements RtpData. | 103 // Implements RtpData. |
| 102 int32_t OnReceivedPayloadData(const uint8_t* payload_data, | 104 int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
| 103 size_t payload_size, | 105 size_t payload_size, |
| 104 const WebRtcRTPHeader* rtp_header) override; | 106 const WebRtcRTPHeader* rtp_header) override; |
| 105 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; | 107 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; |
| 106 | 108 |
| 107 // Implements RtpFeedback. | 109 // Implements RtpFeedback. |
| 108 int32_t OnInitializeDecoder(int8_t payload_type, | 110 int32_t OnInitializeDecoder(int8_t payload_type, |
| 109 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 111 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Maps a payload type to a map of out-of-band supplied codec parameters. | 194 // Maps a payload type to a map of out-of-band supplied codec parameters. |
| 193 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; | 195 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; |
| 194 int16_t last_payload_type_ = -1; | 196 int16_t last_payload_type_ = -1; |
| 195 | 197 |
| 196 bool has_received_frame_; | 198 bool has_received_frame_; |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 } // namespace webrtc | 201 } // namespace webrtc |
| 200 | 202 |
| 201 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ | 203 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ |
| OLD | NEW |