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 |
11 #ifndef WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
12 #define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/base/thread_checker.h" | 17 #include "webrtc/base/thread_checker.h" |
| 18 #include "webrtc/call/rtp_transport_controller_receive.h" |
18 #include "webrtc/call/syncable.h" | 19 #include "webrtc/call/syncable.h" |
19 #include "webrtc/common_video/include/incoming_video_stream.h" | 20 #include "webrtc/common_video/include/incoming_video_stream.h" |
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 21 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
21 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" | 22 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" |
22 #include "webrtc/modules/video_coding/frame_buffer2.h" | 23 #include "webrtc/modules/video_coding/frame_buffer2.h" |
23 #include "webrtc/modules/video_coding/video_coding_impl.h" | 24 #include "webrtc/modules/video_coding/video_coding_impl.h" |
24 #include "webrtc/system_wrappers/include/clock.h" | 25 #include "webrtc/system_wrappers/include/clock.h" |
25 #include "webrtc/video/receive_statistics_proxy.h" | 26 #include "webrtc/video/receive_statistics_proxy.h" |
26 #include "webrtc/video/rtp_stream_receiver.h" | 27 #include "webrtc/video/rtp_stream_receiver.h" |
27 #include "webrtc/video/rtp_streams_synchronizer.h" | 28 #include "webrtc/video/rtp_streams_synchronizer.h" |
28 #include "webrtc/video/transport_adapter.h" | 29 #include "webrtc/video/transport_adapter.h" |
29 #include "webrtc/video/video_stream_decoder.h" | 30 #include "webrtc/video/video_stream_decoder.h" |
30 #include "webrtc/video_receive_stream.h" | 31 #include "webrtc/video_receive_stream.h" |
31 | 32 |
32 namespace webrtc { | 33 namespace webrtc { |
33 | 34 |
34 class CallStats; | 35 class CallStats; |
35 class IvfFileWriter; | 36 class IvfFileWriter; |
36 class ProcessThread; | 37 class ProcessThread; |
37 class RTPFragmentationHeader; | 38 class RTPFragmentationHeader; |
38 class VieRemb; | 39 class VieRemb; |
39 class VCMTiming; | 40 class VCMTiming; |
40 class VCMJitterEstimator; | 41 class VCMJitterEstimator; |
41 | 42 |
42 namespace internal { | 43 namespace internal { |
43 | 44 |
44 class VideoReceiveStream : public webrtc::VideoReceiveStream, | 45 class VideoReceiveStream : public webrtc::VideoReceiveStream, |
| 46 public RtpPacketReceiverInterface, |
45 public rtc::VideoSinkInterface<VideoFrame>, | 47 public rtc::VideoSinkInterface<VideoFrame>, |
46 public EncodedImageCallback, | 48 public EncodedImageCallback, |
47 public NackSender, | 49 public NackSender, |
48 public KeyFrameRequestSender, | 50 public KeyFrameRequestSender, |
49 public video_coding::OnCompleteFrameCallback, | 51 public video_coding::OnCompleteFrameCallback, |
50 public Syncable { | 52 public Syncable { |
51 public: | 53 public: |
52 VideoReceiveStream(int num_cpu_cores, | 54 VideoReceiveStream(int num_cpu_cores, |
53 PacketRouter* packet_router, | 55 PacketRouter* packet_router, |
54 VideoReceiveStream::Config config, | 56 VideoReceiveStream::Config config, |
(...skipping 18 matching lines...) Expand all Loading... |
73 webrtc::VideoReceiveStream::Stats GetStats() const override; | 75 webrtc::VideoReceiveStream::Stats GetStats() const override; |
74 | 76 |
75 // Takes ownership of the file, is responsible for closing it later. | 77 // Takes ownership of the file, is responsible for closing it later. |
76 // Calling this method will close and finalize any current log. | 78 // Calling this method will close and finalize any current log. |
77 // Giving rtc::kInvalidPlatformFileValue disables logging. | 79 // Giving rtc::kInvalidPlatformFileValue disables logging. |
78 // If a frame to be written would make the log too large the write fails and | 80 // If a frame to be written would make the log too large the write fails and |
79 // the log is closed and finalized. A |byte_limit| of 0 means no limit. | 81 // the log is closed and finalized. A |byte_limit| of 0 means no limit. |
80 void EnableEncodedFrameRecording(rtc::PlatformFile file, | 82 void EnableEncodedFrameRecording(rtc::PlatformFile file, |
81 size_t byte_limit) override; | 83 size_t byte_limit) override; |
82 | 84 |
83 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. | 85 // RtpPacketReceiver implementation. |
84 void OnRtpPacket(const RtpPacketReceived& packet); | 86 bool OnRtpPacketReceive(RtpPacketReceived* packet) override; |
85 | 87 |
86 // Implements rtc::VideoSinkInterface<VideoFrame>. | 88 // Implements rtc::VideoSinkInterface<VideoFrame>. |
87 void OnFrame(const VideoFrame& video_frame) override; | 89 void OnFrame(const VideoFrame& video_frame) override; |
88 | 90 |
89 // Implements EncodedImageCallback. | 91 // Implements EncodedImageCallback. |
90 EncodedImageCallback::Result OnEncodedImage( | 92 EncodedImageCallback::Result OnEncodedImage( |
91 const EncodedImage& encoded_image, | 93 const EncodedImage& encoded_image, |
92 const CodecSpecificInfo* codec_specific_info, | 94 const CodecSpecificInfo* codec_specific_info, |
93 const RTPFragmentationHeader* fragmentation) override; | 95 const RTPFragmentationHeader* fragmentation) override; |
94 | 96 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); | 139 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); |
138 | 140 |
139 // Members for the new jitter buffer experiment. | 141 // Members for the new jitter buffer experiment. |
140 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; | 142 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; |
141 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; | 143 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; |
142 }; | 144 }; |
143 } // namespace internal | 145 } // namespace internal |
144 } // namespace webrtc | 146 } // namespace webrtc |
145 | 147 |
146 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 148 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
OLD | NEW |