Chromium Code Reviews| Index: talk/media/base/videocapturer.h |
| diff --git a/talk/media/base/videocapturer.h b/talk/media/base/videocapturer.h |
| index a13c201b8b308d0008d3448e87141ae2640599bd..b0f11ef3143f7591bc0174bb3050d24ccb5e591b 100644 |
| --- a/talk/media/base/videocapturer.h |
| +++ b/talk/media/base/videocapturer.h |
| @@ -38,9 +38,11 @@ |
| #include "talk/media/base/videoadapter.h" |
| #include "talk/media/base/videocommon.h" |
| #include "talk/media/base/videoframefactory.h" |
| +#include "talk/media/base/videosourcebase.h" |
| #include "talk/media/devices/devicemanager.h" |
| #include "webrtc/base/basictypes.h" |
| #include "webrtc/base/criticalsection.h" |
| +#include "webrtc/media/base/videosourceinterface.h" |
| #include "webrtc/base/messagehandler.h" |
| #include "webrtc/base/rollingaccumulator.h" |
| #include "webrtc/base/scoped_ptr.h" |
| @@ -90,7 +92,7 @@ struct CapturedFrame { |
| // time with nanosecond units. |
| uint32_t data_size; // number of bytes of the frame data |
| - webrtc::VideoRotation rotation; // rotation in degrees of the frame. |
| + webrtc::VideoRotation rotation; // rotation in degrees of the frame. |
| void* data; // pointer to the frame data. This object allocates the |
| // memory or points to an existing memory. |
| @@ -125,9 +127,9 @@ struct CapturedFrame { |
| // media engine thread). Hence, the VideoCapture subclasses dont need to be |
| // thread safe. |
| // |
| -class VideoCapturer |
| - : public sigslot::has_slots<>, |
| - public rtc::MessageHandler { |
| +class VideoCapturer : public sigslot::has_slots<>, |
| + public rtc::MessageHandler, |
| + public rtc::VideoSourceBase { |
|
pthatcher1
2016/02/03 15:38:35
Can we try making this "has a muxer" rather than "
|
| public: |
| // All signals are marshalled to |thread| or the creating thread if |
| // none is provided. |
| @@ -214,11 +216,9 @@ class VideoCapturer |
| return capture_state_; |
| } |
| - // Tells videocapturer whether to apply the pending rotation. By default, the |
| - // rotation is applied and the generated frame is up right. When set to false, |
| - // generated frames will carry the rotation information from |
| - // SetCaptureRotation. Return value indicates whether this operation succeeds. |
| - virtual bool SetApplyRotation(bool enable); |
| + void OnSinkCapabilitiesChanged( |
| + const rtc::VideoSinkCapabilities& capabilities) override; |
| + |
| virtual bool GetApplyRotation() { return apply_rotation_; } |
| // Returns true if the capturer is screencasting. This can be used to |
| @@ -257,10 +257,6 @@ class VideoCapturer |
| // Signal the captured frame to downstream. |
| sigslot::signal2<VideoCapturer*, const CapturedFrame*, |
| sigslot::multi_threaded_local> SignalFrameCaptured; |
| - // Signal the captured and possibly adapted frame to downstream consumers |
| - // such as the encoder. |
| - sigslot::signal2<VideoCapturer*, const VideoFrame*, |
| - sigslot::multi_threaded_local> SignalVideoFrame; |
| // If true, run video adaptation. By default, video adaptation is enabled |
| // and users must call video_adapter()->OnOutputFormatRequest() |