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

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

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Protect construction of FlexfecReceiveStreamImpl. Created 3 years, 6 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
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
(...skipping 18 matching lines...) Expand all
29 #include "webrtc/video/transport_adapter.h" 29 #include "webrtc/video/transport_adapter.h"
30 #include "webrtc/video/video_stream_decoder.h" 30 #include "webrtc/video/video_stream_decoder.h"
31 #include "webrtc/video_receive_stream.h" 31 #include "webrtc/video_receive_stream.h"
32 32
33 namespace webrtc { 33 namespace webrtc {
34 34
35 class CallStats; 35 class CallStats;
36 class IvfFileWriter; 36 class IvfFileWriter;
37 class ProcessThread; 37 class ProcessThread;
38 class RTPFragmentationHeader; 38 class RTPFragmentationHeader;
39 class RtpStreamReceiverInterface;
40 class RtpStreamReceiverControllerInterface;
39 class VCMTiming; 41 class VCMTiming;
40 class VCMJitterEstimator; 42 class VCMJitterEstimator;
41 43
42 namespace internal { 44 namespace internal {
43 45
44 class VideoReceiveStream : public webrtc::VideoReceiveStream, 46 class VideoReceiveStream : public webrtc::VideoReceiveStream,
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 RtpPacketSinkInterface {
52 public: 53 public:
53 VideoReceiveStream(int num_cpu_cores, 54 VideoReceiveStream(RtpStreamReceiverControllerInterface* receiver_controller,
55 int num_cpu_cores,
54 PacketRouter* packet_router, 56 PacketRouter* packet_router,
55 VideoReceiveStream::Config config, 57 VideoReceiveStream::Config config,
56 ProcessThread* process_thread, 58 ProcessThread* process_thread,
57 CallStats* call_stats); 59 CallStats* call_stats);
58 ~VideoReceiveStream() override; 60 ~VideoReceiveStream() override;
59 61
60 const Config& config() const { return config_; } 62 const Config& config() const { return config_; }
61 63
62 void SignalNetworkState(NetworkState state); 64 void SignalNetworkState(NetworkState state);
63 bool DeliverRtcp(const uint8_t* packet, size_t length); 65 bool DeliverRtcp(const uint8_t* packet, size_t length);
64 66
65 void SetSync(Syncable* audio_syncable); 67 void SetSync(Syncable* audio_syncable);
66 68
67 // Implements webrtc::VideoReceiveStream. 69 // Implements webrtc::VideoReceiveStream.
68 void Start() override; 70 void Start() override;
69 void Stop() override; 71 void Stop() override;
70 72
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 // RtpPacketSinkInterface.
82 void OnRtpPacket(const RtpPacketReceived& packet) override;
83
84 // Implements rtc::VideoSinkInterface<VideoFrame>. 83 // Implements rtc::VideoSinkInterface<VideoFrame>.
85 void OnFrame(const VideoFrame& video_frame) override; 84 void OnFrame(const VideoFrame& video_frame) override;
86 85
87 // Implements EncodedImageCallback. 86 // Implements EncodedImageCallback.
88 EncodedImageCallback::Result OnEncodedImage( 87 EncodedImageCallback::Result OnEncodedImage(
89 const EncodedImage& encoded_image, 88 const EncodedImage& encoded_image,
90 const CodecSpecificInfo* codec_specific_info, 89 const CodecSpecificInfo* codec_specific_info,
91 const RTPFragmentationHeader* fragmentation) override; 90 const RTPFragmentationHeader* fragmentation) override;
92 91
93 // Implements NackSender. 92 // Implements NackSender.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 RtpVideoStreamReceiver rtp_video_stream_receiver_; 129 RtpVideoStreamReceiver rtp_video_stream_receiver_;
131 std::unique_ptr<VideoStreamDecoder> video_stream_decoder_; 130 std::unique_ptr<VideoStreamDecoder> video_stream_decoder_;
132 RtpStreamsSynchronizer rtp_stream_sync_; 131 RtpStreamsSynchronizer rtp_stream_sync_;
133 132
134 rtc::CriticalSection ivf_writer_lock_; 133 rtc::CriticalSection ivf_writer_lock_;
135 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); 134 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_);
136 135
137 // Members for the new jitter buffer experiment. 136 // Members for the new jitter buffer experiment.
138 std::unique_ptr<VCMJitterEstimator> jitter_estimator_; 137 std::unique_ptr<VCMJitterEstimator> jitter_estimator_;
139 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_; 138 std::unique_ptr<video_coding::FrameBuffer> frame_buffer_;
139
140 std::unique_ptr<RtpStreamReceiverInterface> media_receiver_;
141 std::unique_ptr<RtpStreamReceiverInterface> rtx_receiver_;
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

Powered by Google App Engine
This is Rietveld 408576698