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

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.h

Issue 1631703002: Make WebRtcVideoChannel2::WebRtcVideoSendStream implement rtc::VideoRendererInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix PropagatesInputFrameTimestamp and ProducesIncreasingTimestampsWithResetInputSources. Created 4 years, 11 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 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // VideoMediaChannel implementation 161 // VideoMediaChannel implementation
162 bool SetSendParameters(const VideoSendParameters& params) override; 162 bool SetSendParameters(const VideoSendParameters& params) override;
163 bool SetRecvParameters(const VideoRecvParameters& params) override; 163 bool SetRecvParameters(const VideoRecvParameters& params) override;
164 bool GetSendCodec(VideoCodec* send_codec) override; 164 bool GetSendCodec(VideoCodec* send_codec) override;
165 bool SetSendStreamFormat(uint32_t ssrc, const VideoFormat& format) override; 165 bool SetSendStreamFormat(uint32_t ssrc, const VideoFormat& format) override;
166 bool SetSend(bool send) override; 166 bool SetSend(bool send) override;
167 bool SetVideoSend(uint32_t ssrc, 167 bool SetVideoSend(uint32_t ssrc,
168 bool mute, 168 bool mute,
169 const VideoOptions* options) override; 169 const VideoOptions* options) override;
170 rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink(uint32_t ssrc) override;
170 bool AddSendStream(const StreamParams& sp) override; 171 bool AddSendStream(const StreamParams& sp) override;
171 bool RemoveSendStream(uint32_t ssrc) override; 172 bool RemoveSendStream(uint32_t ssrc) override;
172 bool AddRecvStream(const StreamParams& sp) override; 173 bool AddRecvStream(const StreamParams& sp) override;
173 bool AddRecvStream(const StreamParams& sp, bool default_stream); 174 bool AddRecvStream(const StreamParams& sp, bool default_stream);
174 bool RemoveRecvStream(uint32_t ssrc) override; 175 bool RemoveRecvStream(uint32_t ssrc) override;
175 bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer) override; 176 bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer) override;
176 bool GetStats(VideoMediaInfo* info) override; 177 bool GetStats(VideoMediaInfo* info) override;
177 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) override; 178 bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) override;
178 bool SendIntraFrame() override; 179 bool SendIntraFrame() override;
179 bool RequestIntraFrame() override; 180 bool RequestIntraFrame() override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 VideoCodec codec; 227 VideoCodec codec;
227 webrtc::FecConfig fec; 228 webrtc::FecConfig fec;
228 int rtx_payload_type; 229 int rtx_payload_type;
229 }; 230 };
230 231
231 static std::string CodecSettingsVectorToString( 232 static std::string CodecSettingsVectorToString(
232 const std::vector<VideoCodecSettings>& codecs); 233 const std::vector<VideoCodecSettings>& codecs);
233 234
234 // Wrapper for the sender part, this is where the capturer is connected and 235 // Wrapper for the sender part, this is where the capturer is connected and
235 // frames are then converted from cricket frames to webrtc frames. 236 // frames are then converted from cricket frames to webrtc frames.
236 class WebRtcVideoSendStream : public sigslot::has_slots<> { 237 class WebRtcVideoSendStream :
238 // public sigslot::has_slots<>,
perkj_webrtc 2016/01/26 15:40:56 remove public sigslot::has_slo
nisse-webrtc 2016/01/28 08:24:54 Done.
239 public rtc::VideoSinkInterface<cricket::VideoFrame> {
237 public: 240 public:
238 WebRtcVideoSendStream( 241 WebRtcVideoSendStream(
239 webrtc::Call* call, 242 webrtc::Call* call,
240 const StreamParams& sp, 243 const StreamParams& sp,
241 const webrtc::VideoSendStream::Config& config, 244 const webrtc::VideoSendStream::Config& config,
242 WebRtcVideoEncoderFactory* external_encoder_factory, 245 WebRtcVideoEncoderFactory* external_encoder_factory,
243 const VideoOptions& options, 246 const VideoOptions& options,
244 int max_bitrate_bps, 247 int max_bitrate_bps,
245 const rtc::Optional<VideoCodecSettings>& codec_settings, 248 const rtc::Optional<VideoCodecSettings>& codec_settings,
246 const std::vector<webrtc::RtpExtension>& rtp_extensions, 249 const std::vector<webrtc::RtpExtension>& rtp_extensions,
247 const VideoSendParameters& send_params); 250 const VideoSendParameters& send_params);
248 ~WebRtcVideoSendStream(); 251 // TODO(nisse): Make class final instead?
perkj_webrtc 2016/01/26 15:40:56 remove comment...
nisse-webrtc 2016/01/28 08:24:54 Done.
252 virtual ~WebRtcVideoSendStream();
249 253
250 void SetOptions(const VideoOptions& options); 254 void SetOptions(const VideoOptions& options);
251 void SetCodec(const VideoCodecSettings& codec); 255 void SetCodec(const VideoCodecSettings& codec);
252 void SetRtpExtensions( 256 void SetRtpExtensions(
253 const std::vector<webrtc::RtpExtension>& rtp_extensions); 257 const std::vector<webrtc::RtpExtension>& rtp_extensions);
254 // TODO(deadbeef): Move logic from SetCodec/SetRtpExtensions/etc. 258 // TODO(deadbeef): Move logic from SetCodec/SetRtpExtensions/etc.
255 // into this method. Currently this method only sets the RTCP mode. 259 // into this method. Currently this method only sets the RTCP mode.
256 void SetSendParameters(const VideoSendParameters& send_params); 260 void SetSendParameters(const VideoSendParameters& send_params);
257 261
262 void OnFrame(const cricket::VideoFrame& frame) override;
258 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame); 263 void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
perkj_webrtc 2016/01/26 15:40:56 remove InputFrame
nisse-webrtc 2016/01/28 08:24:54 Done.
259 bool SetCapturer(VideoCapturer* capturer); 264 bool SetCapturer(VideoCapturer* capturer);
260 bool SetVideoFormat(const VideoFormat& format); 265 bool SetVideoFormat(const VideoFormat& format);
261 void MuteStream(bool mute); 266 void MuteStream(bool mute);
262 bool DisconnectCapturer(); 267 bool DisconnectCapturer();
263 268
264 void SetApplyRotation(bool apply_rotation); 269 void SetApplyRotation(bool apply_rotation);
265 270
266 void Start(); 271 void Start();
267 void Stop(); 272 void Stop();
268 273
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 VideoOptions options_; 531 VideoOptions options_;
527 // TODO(deadbeef): Don't duplicate information between 532 // TODO(deadbeef): Don't duplicate information between
528 // send_params/recv_params, rtp_extensions, options, etc. 533 // send_params/recv_params, rtp_extensions, options, etc.
529 VideoSendParameters send_params_; 534 VideoSendParameters send_params_;
530 VideoRecvParameters recv_params_; 535 VideoRecvParameters recv_params_;
531 }; 536 };
532 537
533 } // namespace cricket 538 } // namespace cricket
534 539
535 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_ 540 #endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698