| Index: webrtc/media/engine/webrtcvideoengine2.h
|
| diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
|
| index bc114257567817e2ff3e0e47d5269b346754c102..2ad395923cb63c4aa427cf550e56e332d08029a0 100644
|
| --- a/webrtc/media/engine/webrtcvideoengine2.h
|
| +++ b/webrtc/media/engine/webrtcvideoengine2.h
|
| @@ -234,11 +234,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
|
| static std::string CodecSettingsVectorToString(
|
| const std::vector<VideoCodecSettings>& codecs);
|
|
|
| - // Wrapper for the sender part, this is where the source is connected and
|
| - // frames are then converted from cricket frames to webrtc frames.
|
| + // Wrapper for the sender part.
|
| class WebRtcVideoSendStream
|
| - : public rtc::VideoSinkInterface<cricket::VideoFrame>,
|
| - public rtc::VideoSourceInterface<webrtc::VideoFrame> {
|
| + : public rtc::VideoSourceInterface<webrtc::VideoFrame> {
|
| public:
|
| WebRtcVideoSendStream(
|
| webrtc::Call* call,
|
| @@ -259,15 +257,12 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
|
|
|
| // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>.
|
| // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream
|
| - // in |stream_|. The reason is that WebRtcVideoSendStream receives
|
| - // cricket::VideoFrames and forwards webrtc::VideoFrames to |source_|.
|
| - // TODO(perkj, nisse): Refactor WebRtcVideoSendStream to directly connect
|
| - // the camera input |source_|
|
| - void AddOrUpdateSink(VideoSinkInterface<webrtc::VideoFrame>* sink,
|
| + // in |stream_|. This is done to proxy VideoSinkWants from the encoder to
|
| + // the worker thread.
|
| + void AddOrUpdateSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink,
|
| const rtc::VideoSinkWants& wants) override;
|
| - void RemoveSink(VideoSinkInterface<webrtc::VideoFrame>* sink) override;
|
| + void RemoveSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
|
|
|
| - void OnFrame(const cricket::VideoFrame& frame) override;
|
| bool SetVideoSend(bool mute,
|
| const VideoOptions* options,
|
| rtc::VideoSourceInterface<cricket::VideoFrame>* source);
|
| @@ -310,21 +305,6 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
|
| bool external;
|
| };
|
|
|
| - // TODO(perkj): VideoFrameInfo is currently used for sending a black frame
|
| - // when the video source is removed. Consider moving that logic to
|
| - // VieEncoder or remove it.
|
| - struct VideoFrameInfo {
|
| - VideoFrameInfo()
|
| - : width(0),
|
| - height(0),
|
| - rotation(webrtc::kVideoRotation_0),
|
| - is_texture(false) {}
|
| - int width;
|
| - int height;
|
| - webrtc::VideoRotation rotation;
|
| - bool is_texture;
|
| - };
|
| -
|
| rtc::scoped_refptr<webrtc::VideoEncoderConfig::EncoderSpecificSettings>
|
| ConfigureVideoEncoderSettings(const VideoCodec& codec);
|
| AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec);
|
| @@ -352,10 +332,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
|
| WebRtcVideoEncoderFactory* const external_encoder_factory_
|
| ACCESS_ON(&thread_checker_);
|
|
|
| - rtc::CriticalSection lock_;
|
| webrtc::VideoSendStream* stream_ ACCESS_ON(&thread_checker_);
|
| rtc::VideoSinkInterface<webrtc::VideoFrame>* encoder_sink_
|
| - GUARDED_BY(lock_);
|
| + ACCESS_ON(&thread_checker_);
|
| // Contains settings that are the same for all streams in the MediaChannel,
|
| // such as codecs, header extensions, and the global bitrate limit for the
|
| // entire channel.
|
| @@ -367,13 +346,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
|
| // one stream per MediaChannel.
|
| webrtc::RtpParameters rtp_parameters_ ACCESS_ON(&thread_checker_);
|
| AllocatedEncoder allocated_encoder_ ACCESS_ON(&thread_checker_);
|
| - VideoFrameInfo last_frame_info_ GUARDED_BY(lock_);
|
|
|
| bool sending_ ACCESS_ON(&thread_checker_);
|
| -
|
| - // The timestamp of the last frame received
|
| - // Used to generate timestamp for the black frame when source is removed
|
| - int64_t last_frame_timestamp_us_ GUARDED_BY(lock_);
|
| };
|
|
|
| // Wrapper for the receiver part, contains configs etc. that are needed to
|
|
|