Chromium Code Reviews| Index: webrtc/media/base/videocapturer.h |
| diff --git a/webrtc/media/base/videocapturer.h b/webrtc/media/base/videocapturer.h |
| index c9c96eeb1d299cb06eaad73c8d4734cfdc357eac..5f8f152ce8359c29b5f9d3074fb539802363ad74 100644 |
| --- a/webrtc/media/base/videocapturer.h |
| +++ b/webrtc/media/base/videocapturer.h |
| @@ -28,7 +28,6 @@ |
| #include "webrtc/media/base/videoadapter.h" |
| #include "webrtc/media/base/videobroadcaster.h" |
| #include "webrtc/media/base/videocommon.h" |
| -#include "webrtc/media/base/videoframefactory.h" |
| namespace cricket { |
| @@ -45,38 +44,6 @@ enum CaptureState { |
| class VideoFrame; |
| -struct CapturedFrame { |
| - static const uint32_t kFrameHeaderSize = 40; // Size from width to data_size. |
| - static const uint32_t kUnknownDataSize = 0xFFFFFFFF; |
| - |
| - CapturedFrame(); |
| - |
| - // Get the number of bytes of the frame data. If data_size is known, return |
| - // it directly. Otherwise, calculate the size based on width, height, and |
| - // fourcc. Return true if succeeded. |
| - bool GetDataSize(uint32_t* size) const; |
| - |
| - // The width and height of the captured frame could be different from those |
| - // of VideoFormat. Once the first frame is captured, the width, height, |
| - // fourcc, pixel_width, and pixel_height should keep the same over frames. |
| - int width; // in number of pixels |
| - int height; // in number of pixels |
| - uint32_t fourcc; // compression |
| - uint32_t pixel_width; // width of a pixel, default is 1 |
| - uint32_t pixel_height; // height of a pixel, default is 1 |
| - int64_t time_stamp; // timestamp of when the frame was captured, in unix |
| - // time with nanosecond units. |
| - uint32_t data_size; // number of bytes of the frame data |
| - |
| - 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. |
| - |
| - private: |
| - RTC_DISALLOW_COPY_AND_ASSIGN(CapturedFrame); |
| -}; |
| - |
| // VideoCapturer is an abstract class that defines the interfaces for video |
| // capturing. The subclasses implement the video capturer for various types of |
| // capturers and various platforms. |
| @@ -192,13 +159,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| // Signal all capture state changes that are not a direct result of calling |
| // Start(). |
| sigslot::signal2<VideoCapturer*, CaptureState> SignalStateChange; |
| - // Frame callbacks are multithreaded to allow disconnect and connect to be |
| - // called concurrently. It also ensures that it is safe to call disconnect |
| - // at any time which is needed since the signal may be called from an |
| - // unmarshalled thread owned by the VideoCapturer. |
| - // Signal the captured frame to downstream. |
| - sigslot::signal2<VideoCapturer*, const CapturedFrame*, |
| - sigslot::multi_threaded_local> SignalFrameCaptured; |
| // If true, run video adaptation. By default, video adaptation is enabled |
| // and users must call video_adapter()->OnOutputFormatRequest() |
| @@ -208,9 +168,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| enable_video_adapter_ = enable_video_adapter; |
| } |
| - // Takes ownership. |
| - void set_frame_factory(VideoFrameFactory* frame_factory); |
| - |
| bool GetInputSize(int* width, int* height); |
| // Implements VideoSourceInterface |
| @@ -251,10 +208,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| int* crop_y, |
| int64_t* translated_camera_time_us); |
| - // Callback attached to SignalFrameCaptured where SignalVideoFrames is called. |
| - void OnFrameCaptured(VideoCapturer* video_capturer, |
| - const CapturedFrame* captured_frame); |
| - |
| // Called when a frame has been captured and converted to a |
| // VideoFrame. OnFrame can be called directly by an implementation |
| // that does not use SignalFrameCaptured or OnFrameCaptured. The |
| @@ -279,7 +232,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| } |
| void SetSupportedFormats(const std::vector<VideoFormat>& formats); |
| - VideoFrameFactory* frame_factory() { return frame_factory_.get(); } |
| private: |
| void Construct(); |
| @@ -289,9 +241,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| int64_t GetFormatDistance(const VideoFormat& desired, |
| const VideoFormat& supported); |
| - // Convert captured frame to readable string for LOG messages. |
| - std::string ToString(const CapturedFrame* frame) const; |
| - |
| // Updates filtered_supported_formats_ so that it contains the formats in |
| // supported_formats_ that fulfill all applied restrictions. |
| void UpdateFilteredSupportedFormats(); |
| @@ -303,7 +252,6 @@ class VideoCapturer : public sigslot::has_slots<>, |
| rtc::ThreadChecker thread_checker_; |
| std::string id_; |
| CaptureState capture_state_; |
| - std::unique_ptr<VideoFrameFactory> frame_factory_; |
| std::unique_ptr<VideoFormat> capture_format_; |
| std::vector<VideoFormat> supported_formats_; |
| std::unique_ptr<VideoFormat> max_format_; |
| @@ -323,6 +271,7 @@ class VideoCapturer : public sigslot::has_slots<>, |
| int input_width_ GUARDED_BY(frame_stats_crit_); |
| int input_height_ GUARDED_BY(frame_stats_crit_); |
| + // TODO(nisse): Still needed? |
|
pthatcher1
2016/09/07 18:03:03
It's still used here:
https://cs.chromium.org/chr
nisse-webrtc
2016/09/14 07:58:15
I'm changing the comment to say that is is used by
|
| // Whether capturer should apply rotation to the frame before signaling it. |
| bool apply_rotation_; |