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_demuxer.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" |
(...skipping 11 matching lines...) Expand all Loading... |
39 class VCMJitterEstimator; | 40 class VCMJitterEstimator; |
40 | 41 |
41 namespace internal { | 42 namespace internal { |
42 | 43 |
43 class VideoReceiveStream : public webrtc::VideoReceiveStream, | 44 class VideoReceiveStream : public webrtc::VideoReceiveStream, |
44 public rtc::VideoSinkInterface<VideoFrame>, | 45 public rtc::VideoSinkInterface<VideoFrame>, |
45 public EncodedImageCallback, | 46 public EncodedImageCallback, |
46 public NackSender, | 47 public NackSender, |
47 public KeyFrameRequestSender, | 48 public KeyFrameRequestSender, |
48 public video_coding::OnCompleteFrameCallback, | 49 public video_coding::OnCompleteFrameCallback, |
49 public Syncable { | 50 public Syncable, |
| 51 public RtpPacketSinkInterface { |
50 public: | 52 public: |
51 VideoReceiveStream(int num_cpu_cores, | 53 VideoReceiveStream(int num_cpu_cores, |
52 PacketRouter* packet_router, | 54 PacketRouter* packet_router, |
53 VideoReceiveStream::Config config, | 55 VideoReceiveStream::Config config, |
54 ProcessThread* process_thread, | 56 ProcessThread* process_thread, |
55 CallStats* call_stats); | 57 CallStats* call_stats); |
56 ~VideoReceiveStream() override; | 58 ~VideoReceiveStream() override; |
57 | 59 |
58 const Config& config() const { return config_; } | 60 const Config& config() const { return config_; } |
59 | 61 |
(...skipping 11 matching lines...) Expand all Loading... |
71 webrtc::VideoReceiveStream::Stats GetStats() const override; | 73 webrtc::VideoReceiveStream::Stats GetStats() const override; |
72 | 74 |
73 // Takes ownership of the file, is responsible for closing it later. | 75 // Takes ownership of the file, is responsible for closing it later. |
74 // Calling this method will close and finalize any current log. | 76 // Calling this method will close and finalize any current log. |
75 // Giving rtc::kInvalidPlatformFileValue disables logging. | 77 // Giving rtc::kInvalidPlatformFileValue disables logging. |
76 // If a frame to be written would make the log too large the write fails and | 78 // If a frame to be written would make the log too large the write fails and |
77 // the log is closed and finalized. A |byte_limit| of 0 means no limit. | 79 // the log is closed and finalized. A |byte_limit| of 0 means no limit. |
78 void EnableEncodedFrameRecording(rtc::PlatformFile file, | 80 void EnableEncodedFrameRecording(rtc::PlatformFile file, |
79 size_t byte_limit) override; | 81 size_t byte_limit) override; |
80 | 82 |
81 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. | 83 // RtpPacketSinkInterface. |
82 void OnRtpPacket(const RtpPacketReceived& packet); | 84 void OnRtpPacket(const RtpPacketReceived& packet) override; |
83 | 85 |
84 // Implements rtc::VideoSinkInterface<VideoFrame>. | 86 // Implements rtc::VideoSinkInterface<VideoFrame>. |
85 void OnFrame(const VideoFrame& video_frame) override; | 87 void OnFrame(const VideoFrame& video_frame) override; |
86 | 88 |
87 // Implements EncodedImageCallback. | 89 // Implements EncodedImageCallback. |
88 EncodedImageCallback::Result OnEncodedImage( | 90 EncodedImageCallback::Result OnEncodedImage( |
89 const EncodedImage& encoded_image, | 91 const EncodedImage& encoded_image, |
90 const CodecSpecificInfo* codec_specific_info, | 92 const CodecSpecificInfo* codec_specific_info, |
91 const RTPFragmentationHeader* fragmentation) override; | 93 const RTPFragmentationHeader* fragmentation) override; |
92 | 94 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); | 137 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); |
136 | 138 |
137 // Members for the new jitter buffer experiment. | 139 // Members for the new jitter buffer experiment. |
138 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; | 140 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; |
139 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; | 141 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; |
140 }; | 142 }; |
141 } // namespace internal | 143 } // namespace internal |
142 } // namespace webrtc | 144 } // namespace webrtc |
143 | 145 |
144 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 146 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
OLD | NEW |