| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 VideoReceiveStream(int num_cpu_cores, | 51 VideoReceiveStream(int num_cpu_cores, |
| 52 CongestionController* congestion_controller, | 52 CongestionController* congestion_controller, |
| 53 PacketRouter* packet_router, | 53 PacketRouter* packet_router, |
| 54 VideoReceiveStream::Config config, | 54 VideoReceiveStream::Config config, |
| 55 webrtc::VoiceEngine* voice_engine, | 55 webrtc::VoiceEngine* voice_engine, |
| 56 ProcessThread* process_thread, | 56 ProcessThread* process_thread, |
| 57 CallStats* call_stats, | 57 CallStats* call_stats, |
| 58 VieRemb* remb); | 58 VieRemb* remb); |
| 59 ~VideoReceiveStream() override; | 59 ~VideoReceiveStream() override; |
| 60 | 60 |
| 61 const Config& config() const { return config_; } |
| 62 |
| 61 void SignalNetworkState(NetworkState state); | 63 void SignalNetworkState(NetworkState state); |
| 62 bool DeliverRtcp(const uint8_t* packet, size_t length); | 64 bool DeliverRtcp(const uint8_t* packet, size_t length); |
| 63 bool DeliverRtp(const uint8_t* packet, | 65 bool DeliverRtp(const uint8_t* packet, |
| 64 size_t length, | 66 size_t length, |
| 65 const PacketTime& packet_time); | 67 const PacketTime& packet_time); |
| 66 | 68 |
| 67 bool OnRecoveredPacket(const uint8_t* packet, size_t length); | 69 bool OnRecoveredPacket(const uint8_t* packet, size_t length); |
| 68 | 70 |
| 69 // webrtc::VideoReceiveStream implementation. | 71 void SetSyncChannel(VoiceEngine* voice_engine, int audio_channel_id); |
| 72 |
| 73 // Implements webrtc::VideoReceiveStream. |
| 70 void Start() override; | 74 void Start() override; |
| 71 void Stop() override; | 75 void Stop() override; |
| 72 | 76 |
| 73 webrtc::VideoReceiveStream::Stats GetStats() const override; | 77 webrtc::VideoReceiveStream::Stats GetStats() const override; |
| 74 | 78 |
| 75 // Overrides rtc::VideoSinkInterface<VideoFrame>. | |
| 76 void OnFrame(const VideoFrame& video_frame) override; | |
| 77 | |
| 78 // Implements video_coding::OnCompleteFrameCallback. | |
| 79 void OnCompleteFrame( | |
| 80 std::unique_ptr<video_coding::FrameObject> frame) override; | |
| 81 | |
| 82 // Overrides EncodedImageCallback. | |
| 83 EncodedImageCallback::Result OnEncodedImage( | |
| 84 const EncodedImage& encoded_image, | |
| 85 const CodecSpecificInfo* codec_specific_info, | |
| 86 const RTPFragmentationHeader* fragmentation) override; | |
| 87 | |
| 88 const Config& config() const { return config_; } | |
| 89 | |
| 90 void SetSyncChannel(VoiceEngine* voice_engine, int audio_channel_id); | |
| 91 | |
| 92 // Implements NackSender. | |
| 93 void SendNack(const std::vector<uint16_t>& sequence_numbers) override; | |
| 94 | |
| 95 // Implements KeyFrameRequestSender. | |
| 96 void RequestKeyFrame() override; | |
| 97 | |
| 98 // Takes ownership of the file, is responsible for closing it later. | 79 // Takes ownership of the file, is responsible for closing it later. |
| 99 // Calling this method will close and finalize any current log. | 80 // Calling this method will close and finalize any current log. |
| 100 // Giving rtc::kInvalidPlatformFileValue disables logging. | 81 // Giving rtc::kInvalidPlatformFileValue disables logging. |
| 101 // If a frame to be written would make the log too large the write fails and | 82 // If a frame to be written would make the log too large the write fails and |
| 102 // the log is closed and finalized. A |byte_limit| of 0 means no limit. | 83 // the log is closed and finalized. A |byte_limit| of 0 means no limit. |
| 103 void EnableEncodedFrameRecording(rtc::PlatformFile file, | 84 void EnableEncodedFrameRecording(rtc::PlatformFile file, |
| 104 size_t byte_limit) override; | 85 size_t byte_limit) override; |
| 105 | 86 |
| 87 // Implements rtc::VideoSinkInterface<VideoFrame>. |
| 88 void OnFrame(const VideoFrame& video_frame) override; |
| 89 |
| 90 // Implements EncodedImageCallback. |
| 91 EncodedImageCallback::Result OnEncodedImage( |
| 92 const EncodedImage& encoded_image, |
| 93 const CodecSpecificInfo* codec_specific_info, |
| 94 const RTPFragmentationHeader* fragmentation) override; |
| 95 |
| 96 // Implements NackSender. |
| 97 void SendNack(const std::vector<uint16_t>& sequence_numbers) override; |
| 98 |
| 99 // Implements KeyFrameRequestSender. |
| 100 void RequestKeyFrame() override; |
| 101 |
| 102 // Implements video_coding::OnCompleteFrameCallback. |
| 103 void OnCompleteFrame( |
| 104 std::unique_ptr<video_coding::FrameObject> frame) override; |
| 105 |
| 106 private: | 106 private: |
| 107 static bool DecodeThreadFunction(void* ptr); | 107 static bool DecodeThreadFunction(void* ptr); |
| 108 void Decode(); | 108 void Decode(); |
| 109 | 109 |
| 110 TransportAdapter transport_adapter_; | 110 TransportAdapter transport_adapter_; |
| 111 const VideoReceiveStream::Config config_; | 111 const VideoReceiveStream::Config config_; |
| 112 const int num_cpu_cores_; | 112 const int num_cpu_cores_; |
| 113 ProcessThread* const process_thread_; | 113 ProcessThread* const process_thread_; |
| 114 Clock* const clock_; | 114 Clock* const clock_; |
| 115 | 115 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 131 | 131 |
| 132 // Members for the new jitter buffer experiment. | 132 // Members for the new jitter buffer experiment. |
| 133 const bool jitter_buffer_experiment_; | 133 const bool jitter_buffer_experiment_; |
| 134 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; | 134 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; |
| 135 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; | 135 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; |
| 136 }; | 136 }; |
| 137 } // namespace internal | 137 } // namespace internal |
| 138 } // namespace webrtc | 138 } // namespace webrtc |
| 139 | 139 |
| 140 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 140 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
| OLD | NEW |