Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Side by Side Diff: webrtc/video/video_receive_stream.h

Issue 2709723003: Initial implementation of RtpTransportControllerReceive and related interfaces.
Patch Set: Rename foo_audio --> audio_foo. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VCMTiming; 39 class VCMTiming;
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,
45 public RtpPacketReceiverInterface,
44 public rtc::VideoSinkInterface<VideoFrame>, 46 public rtc::VideoSinkInterface<VideoFrame>,
45 public EncodedImageCallback, 47 public EncodedImageCallback,
46 public NackSender, 48 public NackSender,
47 public KeyFrameRequestSender, 49 public KeyFrameRequestSender,
48 public video_coding::OnCompleteFrameCallback, 50 public video_coding::OnCompleteFrameCallback,
49 public Syncable { 51 public Syncable {
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,
(...skipping 17 matching lines...) Expand all
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 // RtpPacketReceiver implementation.
82 void OnRtpPacket(const RtpPacketReceived& packet); 84 bool OnRtpPacketReceive(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
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_
OLDNEW
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698