blob: b75c20b4f716812703c04a6d33e7598fc17d3ed9 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
2 * libjingle
3 * Copyright 2004 Google Inc.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * 3. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#ifndef TALK_MEDIA_WEBRTCVIDEOENGINE_H_
29#define TALK_MEDIA_WEBRTCVIDEOENGINE_H_
30
31#include <map>
32#include <vector>
33
34#include "talk/base/scoped_ptr.h"
35#include "talk/media/base/codec.h"
36#include "talk/media/base/videocommon.h"
37#include "talk/media/webrtc/webrtccommon.h"
38#include "talk/media/webrtc/webrtcexport.h"
39#include "talk/media/webrtc/webrtcvideoencoderfactory.h"
40#include "talk/session/media/channel.h"
41#include "webrtc/video_engine/include/vie_base.h"
42
43#if !defined(LIBPEERCONNECTION_LIB) && \
44 !defined(LIBPEERCONNECTION_IMPLEMENTATION)
45#error "Bogus include."
46#endif
47
48namespace webrtc {
49class VideoCaptureModule;
50class VideoDecoder;
51class VideoEncoder;
52class VideoRender;
53class ViEExternalCapture;
54class ViERTP_RTCP;
55}
56
57namespace talk_base {
58class CpuMonitor;
59} // namespace talk_base
60
61namespace cricket {
62
mallinath@webrtc.org67ee6b92014-02-03 16:57:16 +000063class CoordinatedVideoAdapter;
64class ViETraceWrapper;
65class ViEWrapper;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000066class VideoCapturer;
67class VideoFrame;
68class VideoProcessor;
69class VideoRenderer;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000070class VoiceMediaChannel;
71class WebRtcDecoderObserver;
72class WebRtcEncoderObserver;
73class WebRtcLocalStreamInfo;
74class WebRtcRenderAdapter;
75class WebRtcVideoChannelRecvInfo;
76class WebRtcVideoChannelSendInfo;
77class WebRtcVideoDecoderFactory;
78class WebRtcVideoEncoderFactory;
79class WebRtcVideoMediaChannel;
80class WebRtcVoiceEngine;
81
82struct CapturedFrame;
83struct Device;
84
85class WebRtcVideoEngine : public sigslot::has_slots<>,
86 public webrtc::TraceCallback,
87 public WebRtcVideoEncoderFactory::Observer {
88 public:
89 // Creates the WebRtcVideoEngine with internal VideoCaptureModule.
90 WebRtcVideoEngine();
91 // For testing purposes. Allows the WebRtcVoiceEngine,
92 // ViEWrapper and CpuMonitor to be mocks.
93 // TODO(juberti): Remove the 3-arg ctor once fake tracing is implemented.
94 WebRtcVideoEngine(WebRtcVoiceEngine* voice_engine,
95 ViEWrapper* vie_wrapper,
96 talk_base::CpuMonitor* cpu_monitor);
97 WebRtcVideoEngine(WebRtcVoiceEngine* voice_engine,
98 ViEWrapper* vie_wrapper,
99 ViETraceWrapper* tracing,
100 talk_base::CpuMonitor* cpu_monitor);
101 ~WebRtcVideoEngine();
102
103 // Basic video engine implementation.
104 bool Init(talk_base::Thread* worker_thread);
105 void Terminate();
106
107 int GetCapabilities();
mallinath@webrtc.orga27be8e2013-09-27 23:04:10 +0000108 bool SetOptions(const VideoOptions &options);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000109 bool SetDefaultEncoderConfig(const VideoEncoderConfig& config);
wu@webrtc.org78187522013-10-07 23:32:02 +0000110 VideoEncoderConfig GetDefaultEncoderConfig() const;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000111
112 WebRtcVideoMediaChannel* CreateChannel(VoiceMediaChannel* voice_channel);
113
114 const std::vector<VideoCodec>& codecs() const;
115 const std::vector<RtpHeaderExtension>& rtp_header_extensions() const;
116 void SetLogging(int min_sev, const char* filter);
117
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000118 bool SetLocalRenderer(VideoRenderer* renderer);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000119 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000120
121 // Set the VoiceEngine for A/V sync. This can only be called before Init.
122 bool SetVoiceEngine(WebRtcVoiceEngine* voice_engine);
123 // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does
124 // not take the ownership of |decoder_factory|. The caller needs to make sure
125 // that |decoder_factory| outlives the video engine.
126 void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory);
127 // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does
128 // not take the ownership of |encoder_factory|. The caller needs to make sure
129 // that |encoder_factory| outlives the video engine.
130 void SetExternalEncoderFactory(WebRtcVideoEncoderFactory* encoder_factory);
131 // Enable the render module with timing control.
132 bool EnableTimedRender();
133
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000134 // Returns an external decoder for the given codec type. The return value
135 // can be NULL if decoder factory is not given or it does not support the
136 // codec type. The caller takes the ownership of the returned object.
137 webrtc::VideoDecoder* CreateExternalDecoder(webrtc::VideoCodecType type);
138 // Releases the decoder instance created by CreateExternalDecoder().
139 void DestroyExternalDecoder(webrtc::VideoDecoder* decoder);
140
141 // Returns an external encoder for the given codec type. The return value
142 // can be NULL if encoder factory is not given or it does not support the
143 // codec type. The caller takes the ownership of the returned object.
144 webrtc::VideoEncoder* CreateExternalEncoder(webrtc::VideoCodecType type);
145 // Releases the encoder instance created by CreateExternalEncoder().
146 void DestroyExternalEncoder(webrtc::VideoEncoder* encoder);
147
148 // Returns true if the codec type is supported by the external encoder.
149 bool IsExternalEncoderCodecType(webrtc::VideoCodecType type) const;
150
151 // Functions called by WebRtcVideoMediaChannel.
152 talk_base::Thread* worker_thread() { return worker_thread_; }
153 ViEWrapper* vie() { return vie_wrapper_.get(); }
154 const VideoFormat& default_codec_format() const {
155 return default_codec_format_;
156 }
157 int GetLastEngineError();
158 bool FindCodec(const VideoCodec& in);
159 bool CanSendCodec(const VideoCodec& in, const VideoCodec& current,
160 VideoCodec* out);
161 void RegisterChannel(WebRtcVideoMediaChannel* channel);
162 void UnregisterChannel(WebRtcVideoMediaChannel* channel);
163 bool ConvertFromCricketVideoCodec(const VideoCodec& in_codec,
164 webrtc::VideoCodec* out_codec);
165 // Check whether the supplied trace should be ignored.
166 bool ShouldIgnoreTrace(const std::string& trace);
167 int GetNumOfChannels();
168
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000169 VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }
170
171 talk_base::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }
172
173 protected:
174 // When a video processor registers with the engine.
175 // SignalMediaFrame will be invoked for every video frame.
176 // See videoprocessor.h for param reference.
177 sigslot::signal3<uint32, VideoFrame*, bool*> SignalMediaFrame;
178
179 private:
180 typedef std::vector<WebRtcVideoMediaChannel*> VideoChannels;
181 struct VideoCodecPref {
182 const char* name;
183 int payload_type;
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +0000184 // For RTX, this field is the payload-type that RTX applies to.
185 // For other codecs, it should be set to -1.
186 int associated_payload_type;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000187 int pref;
188 };
189
190 static const VideoCodecPref kVideoCodecPrefs[];
191 static const VideoFormatPod kVideoFormats[];
192 static const VideoFormatPod kDefaultVideoFormat;
193
194 void Construct(ViEWrapper* vie_wrapper,
195 ViETraceWrapper* tracing,
196 WebRtcVoiceEngine* voice_engine,
197 talk_base::CpuMonitor* cpu_monitor);
198 bool SetDefaultCodec(const VideoCodec& codec);
199 bool RebuildCodecList(const VideoCodec& max_codec);
200 void SetTraceFilter(int filter);
201 void SetTraceOptions(const std::string& options);
202 bool InitVideoEngine();
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000203
204 // webrtc::TraceCallback implementation.
205 virtual void Print(webrtc::TraceLevel level, const char* trace, int length);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000206
207 // WebRtcVideoEncoderFactory::Observer implementation.
208 virtual void OnCodecsAvailable();
209
210 talk_base::Thread* worker_thread_;
211 talk_base::scoped_ptr<ViEWrapper> vie_wrapper_;
212 bool vie_wrapper_base_initialized_;
213 talk_base::scoped_ptr<ViETraceWrapper> tracing_;
214 WebRtcVoiceEngine* voice_engine_;
215 talk_base::scoped_ptr<webrtc::VideoRender> render_module_;
216 WebRtcVideoEncoderFactory* encoder_factory_;
217 WebRtcVideoDecoderFactory* decoder_factory_;
218 std::vector<VideoCodec> video_codecs_;
219 std::vector<RtpHeaderExtension> rtp_header_extensions_;
220 VideoFormat default_codec_format_;
221
222 bool initialized_;
223 talk_base::CriticalSection channels_crit_;
224 VideoChannels channels_;
225
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000226 bool capture_started_;
227 int local_renderer_w_;
228 int local_renderer_h_;
229 VideoRenderer* local_renderer_;
230
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000231 talk_base::scoped_ptr<talk_base::CpuMonitor> cpu_monitor_;
232};
233
234class WebRtcVideoMediaChannel : public talk_base::MessageHandler,
235 public VideoMediaChannel,
236 public webrtc::Transport {
237 public:
238 WebRtcVideoMediaChannel(WebRtcVideoEngine* engine,
239 VoiceMediaChannel* voice_channel);
240 ~WebRtcVideoMediaChannel();
241 bool Init();
242
243 WebRtcVideoEngine* engine() { return engine_; }
244 VoiceMediaChannel* voice_channel() { return voice_channel_; }
245 int video_channel() const { return vie_channel_; }
246 bool sending() const { return sending_; }
247
248 // VideoMediaChannel implementation
249 virtual bool SetRecvCodecs(const std::vector<VideoCodec> &codecs);
250 virtual bool SetSendCodecs(const std::vector<VideoCodec> &codecs);
251 virtual bool GetSendCodec(VideoCodec* send_codec);
252 virtual bool SetSendStreamFormat(uint32 ssrc, const VideoFormat& format);
253 virtual bool SetRender(bool render);
254 virtual bool SetSend(bool send);
255
256 virtual bool AddSendStream(const StreamParams& sp);
257 virtual bool RemoveSendStream(uint32 ssrc);
258 virtual bool AddRecvStream(const StreamParams& sp);
259 virtual bool RemoveRecvStream(uint32 ssrc);
260 virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer);
wu@webrtc.orgb9a088b2014-02-13 23:18:49 +0000261 virtual bool GetStats(const StatsOptions& options, VideoMediaInfo* info);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000262 virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer);
263 virtual bool SendIntraFrame();
264 virtual bool RequestIntraFrame();
265
wu@webrtc.orga9890802013-12-13 00:21:03 +0000266 virtual void OnPacketReceived(talk_base::Buffer* packet,
267 const talk_base::PacketTime& packet_time);
268 virtual void OnRtcpReceived(talk_base::Buffer* packet,
269 const talk_base::PacketTime& packet_time);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000270 virtual void OnReadyToSend(bool ready);
271 virtual bool MuteStream(uint32 ssrc, bool on);
272 virtual bool SetRecvRtpHeaderExtensions(
273 const std::vector<RtpHeaderExtension>& extensions);
274 virtual bool SetSendRtpHeaderExtensions(
275 const std::vector<RtpHeaderExtension>& extensions);
mallinath@webrtc.org92fdfeb2014-02-17 18:49:41 +0000276 virtual int GetRtpSendTimeExtnId() const;
sergeyu@chromium.org4b26e2e2014-01-15 23:15:54 +0000277 virtual bool SetStartSendBandwidth(int bps);
278 virtual bool SetMaxSendBandwidth(int bps);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000279 virtual bool SetOptions(const VideoOptions &options);
280 virtual bool GetOptions(VideoOptions *options) const {
281 *options = options_;
282 return true;
283 }
284 virtual void SetInterface(NetworkInterface* iface);
285 virtual void UpdateAspectRatio(int ratio_w, int ratio_h);
286
287 // Public functions for use by tests and other specialized code.
288 uint32 send_ssrc() const { return 0; }
289 bool GetRenderer(uint32 ssrc, VideoRenderer** renderer);
mallinath@webrtc.org67ee6b92014-02-03 16:57:16 +0000290 bool GetVideoAdapter(uint32 ssrc, CoordinatedVideoAdapter** video_adapter);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000291 void SendFrame(VideoCapturer* capturer, const VideoFrame* frame);
292 bool SendFrame(WebRtcVideoChannelSendInfo* channel_info,
293 const VideoFrame* frame, bool is_screencast);
294
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000295 // Thunk functions for use with HybridVideoEngine
296 void OnLocalFrame(VideoCapturer* capturer, const VideoFrame* frame) {
297 SendFrame(0u, frame, capturer->IsScreencast());
298 }
299 void OnLocalFrameFormat(VideoCapturer* capturer, const VideoFormat* format) {
300 }
301
302 virtual void OnMessage(talk_base::Message* msg);
303
304 protected:
305 int GetLastEngineError() { return engine()->GetLastEngineError(); }
306 virtual int SendPacket(int channel, const void* data, int len);
307 virtual int SendRTCPPacket(int channel, const void* data, int len);
308
309 private:
310 typedef std::map<uint32, WebRtcVideoChannelRecvInfo*> RecvChannelMap;
311 typedef std::map<uint32, WebRtcVideoChannelSendInfo*> SendChannelMap;
312 typedef int (webrtc::ViERTP_RTCP::* ExtensionSetterFunction)(int, bool, int);
313
314 enum MediaDirection { MD_RECV, MD_SEND, MD_SENDRECV };
315
316 // Creates and initializes a ViE channel. When successful |channel_id| will
317 // contain the new channel's ID. If |receiving| is true |ssrc| is the
318 // remote ssrc. If |sending| is true the ssrc is local ssrc. If both
319 // |receiving| and |sending| is true the ssrc must be 0 and the channel will
320 // be created as a default channel. The ssrc must be different for receive
321 // channels and it must be different for send channels. If the same SSRC is
322 // being used for creating channel more than once, this function will fail
323 // returning false.
324 bool CreateChannel(uint32 ssrc_key, MediaDirection direction,
325 int* channel_id);
henrike@webrtc.org704bf9e2014-02-27 17:52:04 +0000326 bool CreateUnsignalledRecvChannel(uint32 ssrc_key, int* channel_id);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000327 bool ConfigureChannel(int channel_id, MediaDirection direction,
328 uint32 ssrc_key);
329 bool ConfigureReceiving(int channel_id, uint32 remote_ssrc_key);
330 bool ConfigureSending(int channel_id, uint32 local_ssrc_key);
331 bool SetNackFec(int channel_id, int red_payload_type, int fec_payload_type,
332 bool nack_enabled);
333 bool SetSendCodec(const webrtc::VideoCodec& codec, int min_bitrate,
334 int start_bitrate, int max_bitrate);
335 bool SetSendCodec(WebRtcVideoChannelSendInfo* send_channel,
336 const webrtc::VideoCodec& codec, int min_bitrate,
337 int start_bitrate, int max_bitrate);
338 void LogSendCodecChange(const std::string& reason);
339 // Prepares the channel with channel id |info->channel_id()| to receive all
340 // codecs in |receive_codecs_| and start receive packets.
341 bool SetReceiveCodecs(WebRtcVideoChannelRecvInfo* info);
342 // Returns the channel number that receives the stream with SSRC |ssrc|.
343 int GetRecvChannelNum(uint32 ssrc);
344 // Given captured video frame size, checks if we need to reset vie send codec.
345 // |reset| is set to whether resetting has happened on vie or not.
346 // Returns false on error.
347 bool MaybeResetVieSendCodec(WebRtcVideoChannelSendInfo* send_channel,
348 int new_width, int new_height, bool is_screencast,
349 bool* reset);
350 // Checks the current bitrate estimate and modifies the start bitrate
351 // accordingly.
352 void MaybeChangeStartBitrate(int channel_id, webrtc::VideoCodec* video_codec);
353 // Helper function for starting the sending of media on all channels or
354 // |channel_id|. Note that these two function do not change |sending_|.
355 bool StartSend();
356 bool StartSend(WebRtcVideoChannelSendInfo* send_channel);
357 // Helper function for stop the sending of media on all channels or
358 // |channel_id|. Note that these two function do not change |sending_|.
359 bool StopSend();
360 bool StopSend(WebRtcVideoChannelSendInfo* send_channel);
361 bool SendIntraFrame(int channel_id);
362
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000363 bool HasReadySendChannels();
364
365 // Send channel key returns the key corresponding to the provided local SSRC
366 // in |key|. The return value is true upon success.
367 // If the local ssrc correspond to that of the default channel the key is 0.
368 // For all other channels the returned key will be the same as the local ssrc.
369 bool GetSendChannelKey(uint32 local_ssrc, uint32* key);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000370 WebRtcVideoChannelSendInfo* GetSendChannel(uint32 local_ssrc);
371 // Creates a new unique key that can be used for inserting a new send channel
372 // into |send_channels_|
373 bool CreateSendChannelKey(uint32 local_ssrc, uint32* key);
wu@webrtc.org24301a62013-12-13 19:17:43 +0000374 // Get the number of the send channels |capturer| registered with.
375 int GetSendChannelNum(VideoCapturer* capturer);
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000376
377 bool IsDefaultChannel(int channel_id) const {
378 return channel_id == vie_channel_;
379 }
380 uint32 GetDefaultChannelSsrc();
381
382 bool DeleteSendChannel(uint32 ssrc_key);
383
384 bool InConferenceMode() const {
385 return options_.conference_mode.GetWithDefaultIfUnset(false);
386 }
387 bool RemoveCapturer(uint32 ssrc);
388
389
390 talk_base::MessageQueue* worker_thread() { return engine_->worker_thread(); }
391 void QueueBlackFrame(uint32 ssrc, int64 timestamp, int framerate);
392 void FlushBlackFrame(uint32 ssrc, int64 timestamp);
393
394 void SetNetworkTransmissionState(bool is_transmitting);
395
396 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id,
397 const RtpHeaderExtension* extension);
398 bool SetHeaderExtension(ExtensionSetterFunction setter, int channel_id,
399 const std::vector<RtpHeaderExtension>& extensions,
400 const char header_extension_uri[]);
401
wu@webrtc.orgd64719d2013-08-01 00:00:07 +0000402 // Signal when cpu adaptation has no further scope to adapt.
403 void OnCpuAdaptationUnable();
404
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +0000405 // Set the local (send-side) RTX SSRC corresponding to primary_ssrc.
406 bool SetLocalRtxSsrc(int channel_id, const StreamParams& send_params,
407 uint32 primary_ssrc, int stream_idx);
408
wu@webrtc.org24301a62013-12-13 19:17:43 +0000409 // Connect |capturer| to WebRtcVideoMediaChannel if it is only registered
410 // to one send channel, i.e. the first send channel.
411 void MaybeConnectCapturer(VideoCapturer* capturer);
412 // Disconnect |capturer| from WebRtcVideoMediaChannel if it is only registered
413 // to one send channel, i.e. the last send channel.
414 void MaybeDisconnectCapturer(VideoCapturer* capturer);
415
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000416 // Global state.
417 WebRtcVideoEngine* engine_;
418 VoiceMediaChannel* voice_channel_;
419 int vie_channel_;
420 bool nack_enabled_;
421 // Receiver Estimated Max Bitrate
422 bool remb_enabled_;
423 VideoOptions options_;
424
425 // Global recv side state.
426 // Note the default channel (vie_channel_), i.e. the send channel
427 // corresponding to all the receive channels (this must be done for REMB to
428 // work properly), resides in both recv_channels_ and send_channels_ with the
429 // ssrc key 0.
430 RecvChannelMap recv_channels_; // Contains all receive channels.
431 std::vector<webrtc::VideoCodec> receive_codecs_;
432 bool render_started_;
433 uint32 first_receive_ssrc_;
434 std::vector<RtpHeaderExtension> receive_extensions_;
henrike@webrtc.org704bf9e2014-02-27 17:52:04 +0000435 int num_unsignalled_recv_channels_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000436
437 // Global send side state.
438 SendChannelMap send_channels_;
439 talk_base::scoped_ptr<webrtc::VideoCodec> send_codec_;
sergeyu@chromium.org5bc25c42013-12-05 00:24:06 +0000440 int send_rtx_type_;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000441 int send_red_type_;
442 int send_fec_type_;
443 int send_min_bitrate_;
444 int send_start_bitrate_;
445 int send_max_bitrate_;
446 bool sending_;
447 std::vector<RtpHeaderExtension> send_extensions_;
448
449 // The aspect ratio that the channel desires. 0 means there is no desired
450 // aspect ratio
451 int ratio_w_;
452 int ratio_h_;
453};
454
455} // namespace cricket
456
457#endif // TALK_MEDIA_WEBRTCVIDEOENGINE_H_