Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: webrtc/media/webrtc/webrtcvideocapturer.h

Issue 1690893002: Revert of Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/media.gyp ('k') | webrtc/media/webrtc/webrtcvideocapturer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_ 11 #ifndef WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_
12 #define WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_ 12 #define WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_
13 13
14 #ifdef HAVE_WEBRTC_VIDEO
15
14 #include <string> 16 #include <string>
15 #include <vector> 17 #include <vector>
16 18
17 #include "webrtc/base/asyncinvoker.h" 19 #include "webrtc/base/asyncinvoker.h"
18 #include "webrtc/base/messagehandler.h" 20 #include "webrtc/base/messagehandler.h"
19 #include "webrtc/base/scoped_ptr.h" 21 #include "webrtc/base/scoped_ptr.h"
20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 22 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
21 #include "webrtc/media/base/videocapturer.h" 23 #include "webrtc/media/base/videocapturer.h"
22 #include "webrtc/media/webrtc/webrtcvideoframe.h" 24 #include "webrtc/media/webrtc/webrtcvideoframe.h"
23 #include "webrtc/modules/video_capture/video_capture.h" 25 #include "webrtc/modules/video_capture/video_capture.h"
(...skipping 17 matching lines...) Expand all
41 public webrtc::VideoCaptureDataCallback { 43 public webrtc::VideoCaptureDataCallback {
42 public: 44 public:
43 WebRtcVideoCapturer(); 45 WebRtcVideoCapturer();
44 explicit WebRtcVideoCapturer(WebRtcVcmFactoryInterface* factory); 46 explicit WebRtcVideoCapturer(WebRtcVcmFactoryInterface* factory);
45 virtual ~WebRtcVideoCapturer(); 47 virtual ~WebRtcVideoCapturer();
46 48
47 bool Init(const Device& device); 49 bool Init(const Device& device);
48 bool Init(webrtc::VideoCaptureModule* module); 50 bool Init(webrtc::VideoCaptureModule* module);
49 51
50 // Override virtual methods of the parent class VideoCapturer. 52 // Override virtual methods of the parent class VideoCapturer.
51 bool GetBestCaptureFormat(const VideoFormat& desired, 53 virtual bool GetBestCaptureFormat(const VideoFormat& desired,
52 VideoFormat* best_format) override; 54 VideoFormat* best_format);
53 CaptureState Start(const VideoFormat& capture_format) override; 55 virtual CaptureState Start(const VideoFormat& capture_format);
54 void Stop() override; 56 virtual void Stop();
55 bool IsRunning() override; 57 virtual bool IsRunning();
56 bool IsScreencast() const override { return false; } 58 virtual bool IsScreencast() const { return false; }
59 virtual bool SetApplyRotation(bool enable);
57 60
58 protected: 61 protected:
59 void OnSinkWantsChanged(const rtc::VideoSinkWants& wants) override;
60 // Override virtual methods of the parent class VideoCapturer. 62 // Override virtual methods of the parent class VideoCapturer.
61 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs); 63 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs);
62 64
63 private: 65 private:
64 // Callback when a frame is captured by camera. 66 // Callback when a frame is captured by camera.
65 virtual void OnIncomingCapturedFrame(const int32_t id, 67 virtual void OnIncomingCapturedFrame(const int32_t id,
66 const webrtc::VideoFrame& frame); 68 const webrtc::VideoFrame& frame);
67 virtual void OnCaptureDelayChanged(const int32_t id, 69 virtual void OnCaptureDelayChanged(const int32_t id,
68 const int32_t delay); 70 const int32_t delay);
69 71
(...skipping 16 matching lines...) Expand all
86 88
87 struct WebRtcCapturedFrame : public CapturedFrame { 89 struct WebRtcCapturedFrame : public CapturedFrame {
88 public: 90 public:
89 WebRtcCapturedFrame(const webrtc::VideoFrame& frame, 91 WebRtcCapturedFrame(const webrtc::VideoFrame& frame,
90 void* buffer, 92 void* buffer,
91 size_t length); 93 size_t length);
92 }; 94 };
93 95
94 } // namespace cricket 96 } // namespace cricket
95 97
98 #endif // HAVE_WEBRTC_VIDEO
96 #endif // WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_ 99 #endif // WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_
OLDNEW
« no previous file with comments | « webrtc/media/media.gyp ('k') | webrtc/media/webrtc/webrtcvideocapturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698