2014-05-13 11:07:01 +00:00
|
|
|
/*
|
|
|
|
|
* libjingle
|
|
|
|
|
* Copyright 2014 Google Inc.
|
|
|
|
|
*
|
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
|
*
|
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
|
* this list of conditions and the following disclaimer.
|
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
|
*
|
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
|
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
|
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
|
|
|
|
|
#define TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
|
|
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
2014-08-13 17:26:08 +00:00
|
|
|
#include <vector>
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
#include "talk/media/base/mediaengine.h"
|
|
|
|
|
#include "talk/media/webrtc/webrtcvideochannelfactory.h"
|
2014-09-23 09:40:22 +00:00
|
|
|
#include "talk/media/webrtc/webrtcvideodecoderfactory.h"
|
|
|
|
|
#include "talk/media/webrtc/webrtcvideoencoderfactory.h"
|
2014-10-08 14:48:08 +00:00
|
|
|
#include "webrtc/base/criticalsection.h"
|
2014-08-13 17:26:08 +00:00
|
|
|
#include "webrtc/base/scoped_ptr.h"
|
2014-09-24 06:05:00 +00:00
|
|
|
#include "webrtc/base/thread_annotations.h"
|
2015-05-07 14:07:48 +02:00
|
|
|
#include "webrtc/base/thread_checker.h"
|
2016-01-28 04:47:08 -08:00
|
|
|
#include "webrtc/media/base/videosinkinterface.h"
|
2014-10-03 11:25:45 +00:00
|
|
|
#include "webrtc/call.h"
|
2014-05-13 11:07:01 +00:00
|
|
|
#include "webrtc/transport.h"
|
2015-04-10 12:52:13 +02:00
|
|
|
#include "webrtc/video_frame.h"
|
2014-08-13 17:26:08 +00:00
|
|
|
#include "webrtc/video_receive_stream.h"
|
2014-05-13 11:07:01 +00:00
|
|
|
#include "webrtc/video_renderer.h"
|
|
|
|
|
#include "webrtc/video_send_stream.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
class VideoDecoder;
|
|
|
|
|
class VideoEncoder;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-29 17:36:52 +00:00
|
|
|
namespace rtc {
|
2014-05-13 11:07:01 +00:00
|
|
|
class Thread;
|
2014-07-29 17:36:52 +00:00
|
|
|
} // namespace rtc
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
class VideoCapturer;
|
|
|
|
|
class VideoFrame;
|
|
|
|
|
class VideoProcessor;
|
|
|
|
|
class VideoRenderer;
|
|
|
|
|
class VoiceMediaChannel;
|
|
|
|
|
class WebRtcDecoderObserver;
|
|
|
|
|
class WebRtcEncoderObserver;
|
|
|
|
|
class WebRtcLocalStreamInfo;
|
|
|
|
|
class WebRtcRenderAdapter;
|
|
|
|
|
class WebRtcVideoChannelRecvInfo;
|
|
|
|
|
class WebRtcVideoChannelSendInfo;
|
|
|
|
|
class WebRtcVoiceEngine;
|
2015-05-07 14:07:48 +02:00
|
|
|
class WebRtcVoiceMediaChannel;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
struct CapturedFrame;
|
|
|
|
|
struct Device;
|
|
|
|
|
|
2015-05-07 11:41:09 +02:00
|
|
|
// Exposed here for unittests.
|
|
|
|
|
std::vector<VideoCodec> DefaultVideoCodecList();
|
|
|
|
|
|
2014-08-12 23:17:13 +00:00
|
|
|
class UnsignalledSsrcHandler {
|
|
|
|
|
public:
|
|
|
|
|
enum Action {
|
|
|
|
|
kDropPacket,
|
|
|
|
|
kDeliverPacket,
|
|
|
|
|
};
|
2015-03-06 15:35:19 +00:00
|
|
|
virtual Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel,
|
2014-08-12 23:17:13 +00:00
|
|
|
uint32_t ssrc) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// TODO(pbos): Remove, use external handlers only.
|
|
|
|
|
class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
|
|
|
|
|
public:
|
|
|
|
|
DefaultUnsignalledSsrcHandler();
|
2015-03-06 15:35:19 +00:00
|
|
|
Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel,
|
|
|
|
|
uint32_t ssrc) override;
|
2014-08-12 23:17:13 +00:00
|
|
|
|
2016-02-04 01:24:52 -08:00
|
|
|
rtc::VideoSinkInterface<VideoFrame>* GetDefaultSink() const;
|
|
|
|
|
void SetDefaultSink(VideoMediaChannel* channel,
|
|
|
|
|
rtc::VideoSinkInterface<VideoFrame>* sink);
|
2014-08-12 23:17:13 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
uint32_t default_recv_ssrc_;
|
2016-02-04 01:24:52 -08:00
|
|
|
rtc::VideoSinkInterface<VideoFrame>* default_sink_;
|
2014-08-12 23:17:13 +00:00
|
|
|
};
|
|
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
// WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667).
|
2015-09-15 12:26:33 +02:00
|
|
|
class WebRtcVideoEngine2 {
|
2014-05-13 11:07:01 +00:00
|
|
|
public:
|
2015-09-15 12:26:33 +02:00
|
|
|
WebRtcVideoEngine2();
|
|
|
|
|
~WebRtcVideoEngine2();
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
// Basic video engine implementation.
|
2015-05-22 09:04:09 +02:00
|
|
|
void Init();
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2015-09-15 12:26:33 +02:00
|
|
|
WebRtcVideoChannel2* CreateChannel(webrtc::Call* call,
|
|
|
|
|
const VideoOptions& options);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
const std::vector<VideoCodec>& codecs() const;
|
2015-12-07 10:45:43 +01:00
|
|
|
RtpCapabilities GetCapabilities() const;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2014-09-23 09:40:22 +00:00
|
|
|
// Set a WebRtcVideoDecoderFactory for external decoding. Video engine does
|
|
|
|
|
// not take the ownership of |decoder_factory|. The caller needs to make sure
|
|
|
|
|
// that |decoder_factory| outlives the video engine.
|
|
|
|
|
void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory);
|
|
|
|
|
// Set a WebRtcVideoEncoderFactory for external encoding. Video engine does
|
|
|
|
|
// not take the ownership of |encoder_factory|. The caller needs to make sure
|
|
|
|
|
// that |encoder_factory| outlives the video engine.
|
|
|
|
|
virtual void SetExternalEncoderFactory(
|
|
|
|
|
WebRtcVideoEncoderFactory* encoder_factory);
|
|
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
private:
|
2014-10-14 04:25:33 +00:00
|
|
|
std::vector<VideoCodec> GetSupportedCodecs() const;
|
|
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
std::vector<VideoCodec> video_codecs_;
|
|
|
|
|
|
|
|
|
|
bool initialized_;
|
|
|
|
|
|
2014-09-23 09:40:22 +00:00
|
|
|
WebRtcVideoDecoderFactory* external_decoder_factory_;
|
|
|
|
|
WebRtcVideoEncoderFactory* external_encoder_factory_;
|
2015-01-14 16:26:23 +00:00
|
|
|
rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_;
|
2014-05-13 11:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
2016-02-01 19:30:33 +01:00
|
|
|
class WebRtcVideoChannel2 : public VideoMediaChannel,
|
2015-09-28 09:59:31 -07:00
|
|
|
public webrtc::Transport,
|
2014-10-03 11:25:45 +00:00
|
|
|
public webrtc::LoadObserver {
|
2014-05-13 11:07:01 +00:00
|
|
|
public:
|
2015-09-15 12:26:33 +02:00
|
|
|
WebRtcVideoChannel2(webrtc::Call* call,
|
2014-10-20 11:07:07 +00:00
|
|
|
const VideoOptions& options,
|
2015-09-17 16:42:56 +02:00
|
|
|
const std::vector<VideoCodec>& recv_codecs,
|
2014-10-14 04:25:33 +00:00
|
|
|
WebRtcVideoEncoderFactory* external_encoder_factory,
|
2015-01-14 17:29:27 +00:00
|
|
|
WebRtcVideoDecoderFactory* external_decoder_factory);
|
2015-09-15 12:26:33 +02:00
|
|
|
~WebRtcVideoChannel2() override;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
// VideoMediaChannel implementation
|
2015-08-07 16:05:34 -07:00
|
|
|
bool SetSendParameters(const VideoSendParameters& params) override;
|
|
|
|
|
bool SetRecvParameters(const VideoRecvParameters& params) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool GetSendCodec(VideoCodec* send_codec) override;
|
|
|
|
|
bool SetSend(bool send) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool SetVideoSend(uint32_t ssrc,
|
|
|
|
|
bool mute,
|
2015-09-10 01:57:14 -07:00
|
|
|
const VideoOptions* options) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool AddSendStream(const StreamParams& sp) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveSendStream(uint32_t ssrc) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool AddRecvStream(const StreamParams& sp) override;
|
2015-03-06 15:35:19 +00:00
|
|
|
bool AddRecvStream(const StreamParams& sp, bool default_stream);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool RemoveRecvStream(uint32_t ssrc) override;
|
2016-02-04 01:24:52 -08:00
|
|
|
bool SetSink(uint32_t ssrc,
|
|
|
|
|
rtc::VideoSinkInterface<VideoFrame>* sink) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool GetStats(VideoMediaInfo* info) override;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
|
|
|
|
|
void OnPacketReceived(rtc::Buffer* packet,
|
|
|
|
|
const rtc::PacketTime& packet_time) override;
|
|
|
|
|
void OnRtcpReceived(rtc::Buffer* packet,
|
|
|
|
|
const rtc::PacketTime& packet_time) override;
|
|
|
|
|
void OnReadyToSend(bool ready) override;
|
|
|
|
|
void SetInterface(NetworkInterface* iface) override;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2015-03-04 12:58:35 +00:00
|
|
|
void OnLoadUpdate(Load load) override;
|
2014-10-03 11:25:45 +00:00
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
// Implemented for VideoMediaChannelTest.
|
|
|
|
|
bool sending() const { return sending_; }
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
uint32_t GetDefaultSendChannelSsrc() { return default_send_ssrc_; }
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
private:
|
2016-01-28 15:58:41 -08:00
|
|
|
class WebRtcVideoReceiveStream;
|
2016-01-27 16:45:21 +01:00
|
|
|
struct VideoCodecSettings {
|
|
|
|
|
VideoCodecSettings();
|
|
|
|
|
|
|
|
|
|
bool operator==(const VideoCodecSettings& other) const;
|
|
|
|
|
bool operator!=(const VideoCodecSettings& other) const;
|
|
|
|
|
|
|
|
|
|
VideoCodec codec;
|
|
|
|
|
webrtc::FecConfig fec;
|
|
|
|
|
int rtx_payload_type;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct ChangedSendParameters {
|
|
|
|
|
// These optionals are unset if not changed.
|
|
|
|
|
rtc::Optional<VideoCodecSettings> codec;
|
|
|
|
|
rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions;
|
|
|
|
|
rtc::Optional<int> max_bandwidth_bps;
|
|
|
|
|
rtc::Optional<VideoOptions> options;
|
|
|
|
|
rtc::Optional<webrtc::RtcpMode> rtcp_mode;
|
|
|
|
|
};
|
2016-01-28 15:58:41 -08:00
|
|
|
|
|
|
|
|
struct ChangedRecvParameters {
|
|
|
|
|
// These optionals are unset if not changed.
|
|
|
|
|
rtc::Optional<std::vector<VideoCodecSettings>> codec_settings;
|
|
|
|
|
rtc::Optional<std::vector<webrtc::RtpExtension>> rtp_header_extensions;
|
|
|
|
|
rtc::Optional<webrtc::RtcpMode> rtcp_mode;
|
|
|
|
|
};
|
|
|
|
|
|
2016-01-27 16:45:21 +01:00
|
|
|
bool GetChangedSendParameters(const VideoSendParameters& params,
|
|
|
|
|
ChangedSendParameters* changed_params) const;
|
2016-01-28 15:58:41 -08:00
|
|
|
bool GetChangedRecvParameters(const VideoRecvParameters& params,
|
|
|
|
|
ChangedRecvParameters* changed_params) const;
|
|
|
|
|
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
bool MuteStream(uint32_t ssrc, bool mute);
|
2015-09-17 16:42:56 +02:00
|
|
|
|
2016-01-27 16:45:21 +01:00
|
|
|
void SetMaxSendBandwidth(int bps);
|
|
|
|
|
void SetOptions(const VideoOptions& options);
|
2015-09-17 16:42:56 +02:00
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config,
|
|
|
|
|
const StreamParams& sp) const;
|
2014-11-03 14:46:44 +00:00
|
|
|
bool CodecIsExternallySupported(const std::string& name) const;
|
2015-03-26 16:23:04 +01:00
|
|
|
bool ValidateSendSsrcAvailability(const StreamParams& sp) const
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(stream_crit_);
|
|
|
|
|
bool ValidateReceiveSsrcAvailability(const StreamParams& sp) const
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(stream_crit_);
|
|
|
|
|
void DeleteReceiveStream(WebRtcVideoReceiveStream* stream)
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(stream_crit_);
|
2014-07-18 09:35:58 +00:00
|
|
|
|
2015-08-20 17:19:20 -07:00
|
|
|
static std::string CodecSettingsVectorToString(
|
|
|
|
|
const std::vector<VideoCodecSettings>& codecs);
|
|
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
// Wrapper for the sender part, this is where the capturer is connected and
|
|
|
|
|
// frames are then converted from cricket frames to webrtc frames.
|
2014-05-13 11:07:01 +00:00
|
|
|
class WebRtcVideoSendStream : public sigslot::has_slots<> {
|
|
|
|
|
public:
|
2014-07-17 08:51:46 +00:00
|
|
|
WebRtcVideoSendStream(
|
|
|
|
|
webrtc::Call* call,
|
2015-08-28 04:07:10 -07:00
|
|
|
const StreamParams& sp,
|
|
|
|
|
const webrtc::VideoSendStream::Config& config,
|
2014-10-14 04:25:33 +00:00
|
|
|
WebRtcVideoEncoderFactory* external_encoder_factory,
|
2014-07-17 08:51:46 +00:00
|
|
|
const VideoOptions& options,
|
2015-03-27 15:58:11 +01:00
|
|
|
int max_bitrate_bps,
|
2015-11-10 22:34:18 +01:00
|
|
|
const rtc::Optional<VideoCodecSettings>& codec_settings,
|
2015-12-09 12:37:51 -08:00
|
|
|
const std::vector<webrtc::RtpExtension>& rtp_extensions,
|
|
|
|
|
const VideoSendParameters& send_params);
|
2014-05-13 11:07:01 +00:00
|
|
|
~WebRtcVideoSendStream();
|
2015-03-26 16:23:04 +01:00
|
|
|
|
2014-07-17 08:51:46 +00:00
|
|
|
void SetOptions(const VideoOptions& options);
|
2016-01-27 16:45:21 +01:00
|
|
|
// TODO(pbos): Move logic from SetOptions into this method.
|
|
|
|
|
void SetSendParameters(const ChangedSendParameters& send_params);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
|
|
|
|
|
bool SetCapturer(VideoCapturer* capturer);
|
2014-08-13 21:36:18 +00:00
|
|
|
void MuteStream(bool mute);
|
2014-05-13 11:07:01 +00:00
|
|
|
bool DisconnectCapturer();
|
|
|
|
|
|
|
|
|
|
void Start();
|
|
|
|
|
void Stop();
|
|
|
|
|
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
const std::vector<uint32_t>& GetSsrcs() const;
|
2014-07-18 11:11:55 +00:00
|
|
|
VideoSenderInfo GetVideoSenderInfo();
|
2014-11-05 14:05:29 +00:00
|
|
|
void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info);
|
2014-07-18 11:11:55 +00:00
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
private:
|
2014-06-06 10:49:19 +00:00
|
|
|
// Parameters needed to reconstruct the underlying stream.
|
|
|
|
|
// webrtc::VideoSendStream doesn't support setting a lot of options on the
|
|
|
|
|
// fly, so when those need to be changed we tear down and reconstruct with
|
|
|
|
|
// similar parameters depending on which options changed etc.
|
|
|
|
|
struct VideoSendStreamParameters {
|
|
|
|
|
VideoSendStreamParameters(
|
|
|
|
|
const webrtc::VideoSendStream::Config& config,
|
|
|
|
|
const VideoOptions& options,
|
2015-03-27 15:58:11 +01:00
|
|
|
int max_bitrate_bps,
|
2015-11-10 22:34:18 +01:00
|
|
|
const rtc::Optional<VideoCodecSettings>& codec_settings);
|
2014-06-06 10:49:19 +00:00
|
|
|
webrtc::VideoSendStream::Config config;
|
|
|
|
|
VideoOptions options;
|
2015-03-27 15:58:11 +01:00
|
|
|
int max_bitrate_bps;
|
2015-11-10 22:34:18 +01:00
|
|
|
rtc::Optional<VideoCodecSettings> codec_settings;
|
2014-06-06 10:49:19 +00:00
|
|
|
// Sent resolutions + bitrates etc. by the underlying VideoSendStream,
|
|
|
|
|
// typically changes when setting a new resolution or reconfiguring
|
|
|
|
|
// bitrates.
|
2014-09-19 12:30:25 +00:00
|
|
|
webrtc::VideoEncoderConfig encoder_config;
|
2014-06-06 10:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
2014-10-14 04:25:33 +00:00
|
|
|
struct AllocatedEncoder {
|
|
|
|
|
AllocatedEncoder(webrtc::VideoEncoder* encoder,
|
|
|
|
|
webrtc::VideoCodecType type,
|
2015-05-19 23:09:35 +02:00
|
|
|
bool external);
|
2014-10-14 04:25:33 +00:00
|
|
|
webrtc::VideoEncoder* encoder;
|
2015-05-19 23:09:35 +02:00
|
|
|
webrtc::VideoEncoder* external_encoder;
|
2014-10-14 04:25:33 +00:00
|
|
|
webrtc::VideoCodecType type;
|
|
|
|
|
bool external;
|
|
|
|
|
};
|
|
|
|
|
|
2014-11-07 10:54:43 +00:00
|
|
|
struct Dimensions {
|
2015-02-18 10:13:09 +00:00
|
|
|
// Initial encoder configuration (QCIF, 176x144) frame (to ensure that
|
|
|
|
|
// hardware encoders can be initialized). This gives us low memory usage
|
|
|
|
|
// but also makes it so configuration errors are discovered at the time we
|
|
|
|
|
// apply the settings rather than when we get the first frame (waiting for
|
|
|
|
|
// the first frame to know that you gave a bad codec parameter could make
|
|
|
|
|
// debugging hard).
|
|
|
|
|
// TODO(pbos): Consider setting up encoders lazily.
|
|
|
|
|
Dimensions() : width(176), height(144), is_screencast(false) {}
|
2014-10-27 13:58:00 +00:00
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
bool is_screencast;
|
|
|
|
|
};
|
|
|
|
|
|
2015-01-14 17:29:27 +00:00
|
|
|
union VideoEncoderSettings {
|
2016-01-27 01:36:03 -08:00
|
|
|
webrtc::VideoCodecH264 h264;
|
2015-01-14 17:29:27 +00:00
|
|
|
webrtc::VideoCodecVP8 vp8;
|
|
|
|
|
webrtc::VideoCodecVP9 vp9;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static std::vector<webrtc::VideoStream> CreateVideoStreams(
|
|
|
|
|
const VideoCodec& codec,
|
|
|
|
|
const VideoOptions& options,
|
2015-03-27 15:58:11 +01:00
|
|
|
int max_bitrate_bps,
|
2015-01-14 17:29:27 +00:00
|
|
|
size_t num_streams);
|
|
|
|
|
static std::vector<webrtc::VideoStream> CreateSimulcastVideoStreams(
|
|
|
|
|
const VideoCodec& codec,
|
|
|
|
|
const VideoOptions& options,
|
2015-03-27 15:58:11 +01:00
|
|
|
int max_bitrate_bps,
|
2015-01-14 17:29:27 +00:00
|
|
|
size_t num_streams);
|
|
|
|
|
|
|
|
|
|
void* ConfigureVideoEncoderSettings(const VideoCodec& codec,
|
2015-04-28 10:01:41 +02:00
|
|
|
const VideoOptions& options,
|
|
|
|
|
bool is_screencast)
|
2015-01-14 17:29:27 +00:00
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
|
|
|
|
|
2014-10-14 04:25:33 +00:00
|
|
|
AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec)
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
2014-11-07 10:54:43 +00:00
|
|
|
void DestroyVideoEncoder(AllocatedEncoder* encoder)
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
2014-07-17 08:51:46 +00:00
|
|
|
void SetCodecAndOptions(const VideoCodecSettings& codec,
|
2014-09-24 07:10:57 +00:00
|
|
|
const VideoOptions& options)
|
|
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
|
|
|
|
void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
2014-11-07 10:54:43 +00:00
|
|
|
webrtc::VideoEncoderConfig CreateVideoEncoderConfig(
|
|
|
|
|
const Dimensions& dimensions,
|
|
|
|
|
const VideoCodec& codec) const EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
2014-10-27 13:58:00 +00:00
|
|
|
void SetDimensions(int width, int height, bool is_screencast)
|
2014-09-24 07:10:57 +00:00
|
|
|
EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
const std::vector<uint32_t> ssrcs_;
|
2015-05-28 13:39:50 +02:00
|
|
|
const std::vector<SsrcGroup> ssrc_groups_;
|
2014-05-13 11:07:01 +00:00
|
|
|
webrtc::Call* const call_;
|
2014-11-07 10:54:43 +00:00
|
|
|
WebRtcVideoEncoderFactory* const external_encoder_factory_
|
|
|
|
|
GUARDED_BY(lock_);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2014-07-29 17:36:52 +00:00
|
|
|
rtc::CriticalSection lock_;
|
2014-05-13 11:07:01 +00:00
|
|
|
webrtc::VideoSendStream* stream_ GUARDED_BY(lock_);
|
2014-06-06 10:49:19 +00:00
|
|
|
VideoSendStreamParameters parameters_ GUARDED_BY(lock_);
|
2016-01-27 16:45:21 +01:00
|
|
|
bool pending_encoder_reconfiguration_ GUARDED_BY(lock_);
|
2015-01-14 17:29:27 +00:00
|
|
|
VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_);
|
2014-10-14 04:25:33 +00:00
|
|
|
AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_);
|
2014-11-07 10:54:43 +00:00
|
|
|
Dimensions last_dimensions_ GUARDED_BY(lock_);
|
2014-06-06 10:49:19 +00:00
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
VideoCapturer* capturer_ GUARDED_BY(lock_);
|
|
|
|
|
bool sending_ GUARDED_BY(lock_);
|
|
|
|
|
bool muted_ GUARDED_BY(lock_);
|
|
|
|
|
VideoFormat format_ GUARDED_BY(lock_);
|
2015-02-26 10:03:39 +00:00
|
|
|
int old_adapt_changes_ GUARDED_BY(lock_);
|
2015-07-16 10:27:16 -07:00
|
|
|
|
|
|
|
|
// The timestamp of the first frame received
|
|
|
|
|
// Used to generate the timestamps of subsequent frames
|
|
|
|
|
int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_);
|
|
|
|
|
|
|
|
|
|
// The timestamp of the last frame received
|
|
|
|
|
// Used to generate timestamp for the black frame when capturer is removed
|
|
|
|
|
int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_);
|
2014-05-13 11:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
// Wrapper for the receiver part, contains configs etc. that are needed to
|
|
|
|
|
// reconstruct the underlying VideoReceiveStream. Also serves as a wrapper
|
|
|
|
|
// between webrtc::VideoRenderer and cricket::VideoRenderer.
|
|
|
|
|
class WebRtcVideoReceiveStream : public webrtc::VideoRenderer {
|
|
|
|
|
public:
|
|
|
|
|
WebRtcVideoReceiveStream(
|
2015-05-28 13:39:50 +02:00
|
|
|
webrtc::Call* call,
|
|
|
|
|
const StreamParams& sp,
|
2015-08-28 04:07:10 -07:00
|
|
|
const webrtc::VideoReceiveStream::Config& config,
|
2014-10-29 15:28:39 +00:00
|
|
|
WebRtcVideoDecoderFactory* external_decoder_factory,
|
2015-03-06 15:35:19 +00:00
|
|
|
bool default_stream,
|
2015-11-24 18:07:56 -08:00
|
|
|
const std::vector<VideoCodecSettings>& recv_codecs,
|
|
|
|
|
bool disable_prerenderer_smoothing);
|
2014-07-18 09:35:58 +00:00
|
|
|
~WebRtcVideoReceiveStream();
|
|
|
|
|
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
const std::vector<uint32_t>& GetSsrcs() const;
|
2015-03-26 16:23:04 +01:00
|
|
|
|
2015-05-22 18:48:36 +02:00
|
|
|
void SetLocalSsrc(uint32_t local_ssrc);
|
2015-11-20 18:05:48 -08:00
|
|
|
void SetFeedbackParameters(bool nack_enabled,
|
|
|
|
|
bool remb_enabled,
|
|
|
|
|
bool transport_cc_enabled);
|
2016-01-28 15:58:41 -08:00
|
|
|
void SetRecvParameters(const ChangedRecvParameters& recv_params);
|
2014-07-18 09:35:58 +00:00
|
|
|
|
2015-05-29 17:21:40 -07:00
|
|
|
void RenderFrame(const webrtc::VideoFrame& frame,
|
2015-03-04 12:58:35 +00:00
|
|
|
int time_to_render_ms) override;
|
|
|
|
|
bool IsTextureSupported() const override;
|
2015-11-24 18:07:56 -08:00
|
|
|
bool SmoothsRenderedFrames() const override;
|
2015-03-06 15:35:19 +00:00
|
|
|
bool IsDefaultStream() const;
|
2014-07-18 09:35:58 +00:00
|
|
|
|
2016-01-28 04:47:08 -08:00
|
|
|
void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink);
|
2014-07-18 09:35:58 +00:00
|
|
|
|
2014-07-18 11:11:55 +00:00
|
|
|
VideoReceiverInfo GetVideoReceiverInfo();
|
|
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
private:
|
2014-10-29 15:28:39 +00:00
|
|
|
struct AllocatedDecoder {
|
2014-11-03 14:46:44 +00:00
|
|
|
AllocatedDecoder(webrtc::VideoDecoder* decoder,
|
|
|
|
|
webrtc::VideoCodecType type,
|
2015-05-18 19:42:03 +02:00
|
|
|
bool external);
|
2014-10-29 15:28:39 +00:00
|
|
|
webrtc::VideoDecoder* decoder;
|
2015-05-18 19:42:03 +02:00
|
|
|
// Decoder wrapped into a fallback decoder to permit software fallback.
|
|
|
|
|
webrtc::VideoDecoder* external_decoder;
|
2014-11-03 14:46:44 +00:00
|
|
|
webrtc::VideoCodecType type;
|
2014-10-29 15:28:39 +00:00
|
|
|
bool external;
|
|
|
|
|
};
|
|
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
void RecreateWebRtcStream();
|
|
|
|
|
|
2016-01-28 15:58:41 -08:00
|
|
|
void ConfigureCodecs(const std::vector<VideoCodecSettings>& recv_codecs,
|
|
|
|
|
std::vector<AllocatedDecoder>* old_codecs);
|
2014-11-03 14:46:44 +00:00
|
|
|
AllocatedDecoder CreateOrReuseVideoDecoder(
|
|
|
|
|
std::vector<AllocatedDecoder>* old_decoder,
|
|
|
|
|
const VideoCodec& codec);
|
|
|
|
|
void ClearDecoders(std::vector<AllocatedDecoder>* allocated_decoders);
|
2014-10-29 15:28:39 +00:00
|
|
|
|
2015-08-28 07:35:32 -07:00
|
|
|
std::string GetCodecNameFromPayloadType(int payload_type);
|
|
|
|
|
|
2014-07-18 09:35:58 +00:00
|
|
|
webrtc::Call* const call_;
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
const std::vector<uint32_t> ssrcs_;
|
2015-05-28 13:39:50 +02:00
|
|
|
const std::vector<SsrcGroup> ssrc_groups_;
|
2014-07-18 09:35:58 +00:00
|
|
|
|
|
|
|
|
webrtc::VideoReceiveStream* stream_;
|
2015-03-06 15:35:19 +00:00
|
|
|
const bool default_stream_;
|
2014-07-18 09:35:58 +00:00
|
|
|
webrtc::VideoReceiveStream::Config config_;
|
|
|
|
|
|
2014-10-29 15:28:39 +00:00
|
|
|
WebRtcVideoDecoderFactory* const external_decoder_factory_;
|
|
|
|
|
std::vector<AllocatedDecoder> allocated_decoders_;
|
|
|
|
|
|
2015-11-24 18:07:56 -08:00
|
|
|
const bool disable_prerenderer_smoothing_;
|
|
|
|
|
|
2016-01-28 04:47:08 -08:00
|
|
|
rtc::CriticalSection sink_lock_;
|
|
|
|
|
rtc::VideoSinkInterface<cricket::VideoFrame>* sink_ GUARDED_BY(sink_lock_);
|
|
|
|
|
int last_width_ GUARDED_BY(sink_lock_);
|
|
|
|
|
int last_height_ GUARDED_BY(sink_lock_);
|
2015-01-27 09:57:01 +00:00
|
|
|
// Expands remote RTP timestamps to int64_t to be able to estimate how long
|
|
|
|
|
// the stream has been running.
|
|
|
|
|
rtc::TimestampWrapAroundHandler timestamp_wraparound_handler_
|
2016-01-28 04:47:08 -08:00
|
|
|
GUARDED_BY(sink_lock_);
|
|
|
|
|
int64_t first_frame_timestamp_ GUARDED_BY(sink_lock_);
|
2015-01-27 09:57:01 +00:00
|
|
|
// Start NTP time is estimated as current remote NTP time (estimated from
|
|
|
|
|
// RTCP) minus the elapsed time, as soon as remote NTP time is available.
|
2016-01-28 04:47:08 -08:00
|
|
|
int64_t estimated_remote_start_ntp_time_ms_ GUARDED_BY(sink_lock_);
|
2014-07-18 09:35:58 +00:00
|
|
|
};
|
|
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine);
|
2014-07-22 16:29:54 +00:00
|
|
|
void SetDefaultOptions();
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2015-10-02 03:39:33 -07:00
|
|
|
bool SendRtp(const uint8_t* data,
|
|
|
|
|
size_t len,
|
|
|
|
|
const webrtc::PacketOptions& options) override;
|
2015-03-04 12:58:35 +00:00
|
|
|
bool SendRtcp(const uint8_t* data, size_t len) override;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
|
|
|
|
void StartAllSendStreams();
|
|
|
|
|
void StopAllSendStreams();
|
2014-07-18 09:35:58 +00:00
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
static std::vector<VideoCodecSettings> MapCodecs(
|
|
|
|
|
const std::vector<VideoCodec>& codecs);
|
|
|
|
|
std::vector<VideoCodecSettings> FilterSupportedCodecs(
|
2014-11-03 14:46:44 +00:00
|
|
|
const std::vector<VideoCodecSettings>& mapped_codecs) const;
|
2015-08-20 17:19:20 -07:00
|
|
|
static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before,
|
|
|
|
|
std::vector<VideoCodecSettings> after);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2014-07-18 11:11:55 +00:00
|
|
|
void FillSenderStats(VideoMediaInfo* info);
|
|
|
|
|
void FillReceiverStats(VideoMediaInfo* info);
|
2014-12-11 13:26:09 +00:00
|
|
|
void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats,
|
|
|
|
|
VideoMediaInfo* info);
|
2014-07-18 11:11:55 +00:00
|
|
|
|
2015-05-07 14:07:48 +02:00
|
|
|
rtc::ThreadChecker thread_checker_;
|
|
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
uint32_t rtcp_receiver_report_ssrc_;
|
|
|
|
|
bool sending_;
|
2015-09-15 12:26:33 +02:00
|
|
|
webrtc::Call* const call_;
|
2014-10-03 11:25:45 +00:00
|
|
|
|
2014-05-13 11:07:01 +00:00
|
|
|
uint32_t default_send_ssrc_;
|
2014-08-12 23:17:13 +00:00
|
|
|
|
|
|
|
|
DefaultUnsignalledSsrcHandler default_unsignalled_ssrc_handler_;
|
|
|
|
|
UnsignalledSsrcHandler* const unsignalled_ssrc_handler_;
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2015-04-13 15:34:32 +02:00
|
|
|
// Separate list of set capturers used to signal CPU adaptation. These should
|
|
|
|
|
// not be locked while calling methods that take other locks to prevent
|
|
|
|
|
// lock-order inversions.
|
|
|
|
|
rtc::CriticalSection capturer_crit_;
|
|
|
|
|
bool signal_cpu_adaptation_ GUARDED_BY(capturer_crit_);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
std::map<uint32_t, VideoCapturer*> capturers_ GUARDED_BY(capturer_crit_);
|
2015-04-13 15:34:32 +02:00
|
|
|
|
2014-10-08 14:48:08 +00:00
|
|
|
rtc::CriticalSection stream_crit_;
|
2014-05-13 11:07:01 +00:00
|
|
|
// Using primary-ssrc (first ssrc) as key.
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
std::map<uint32_t, WebRtcVideoSendStream*> send_streams_
|
2014-10-08 14:48:08 +00:00
|
|
|
GUARDED_BY(stream_crit_);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
std::map<uint32_t, WebRtcVideoReceiveStream*> receive_streams_
|
2014-10-08 14:48:08 +00:00
|
|
|
GUARDED_BY(stream_crit_);
|
Use suffixed {uint,int}{8,16,32,64}_t types.
Removes the use of uint8, etc. in favor of uint8_t.
BUG=webrtc:5024
R=henrik.lundin@webrtc.org, henrikg@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1362503003 .
Cr-Commit-Position: refs/heads/master@{#10196}
2015-10-07 12:23:21 +02:00
|
|
|
std::set<uint32_t> send_ssrcs_ GUARDED_BY(stream_crit_);
|
|
|
|
|
std::set<uint32_t> receive_ssrcs_ GUARDED_BY(stream_crit_);
|
2014-05-13 11:07:01 +00:00
|
|
|
|
2015-11-10 22:34:18 +01:00
|
|
|
rtc::Optional<VideoCodecSettings> send_codec_;
|
2014-06-16 17:32:02 +00:00
|
|
|
std::vector<webrtc::RtpExtension> send_rtp_extensions_;
|
|
|
|
|
|
2014-10-14 04:25:33 +00:00
|
|
|
WebRtcVideoEncoderFactory* const external_encoder_factory_;
|
|
|
|
|
WebRtcVideoDecoderFactory* const external_decoder_factory_;
|
2014-05-13 11:07:01 +00:00
|
|
|
std::vector<VideoCodecSettings> recv_codecs_;
|
2014-06-16 17:32:02 +00:00
|
|
|
std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
|
2014-11-25 14:03:34 +00:00
|
|
|
webrtc::Call::Config::BitrateConfig bitrate_config_;
|
2014-05-13 11:07:01 +00:00
|
|
|
VideoOptions options_;
|
2015-12-09 12:37:51 -08:00
|
|
|
// TODO(deadbeef): Don't duplicate information between
|
|
|
|
|
// send_params/recv_params, rtp_extensions, options, etc.
|
|
|
|
|
VideoSendParameters send_params_;
|
|
|
|
|
VideoRecvParameters recv_params_;
|
2014-05-13 11:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace cricket
|
|
|
|
|
|
|
|
|
|
#endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
|