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

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

Issue 1689923002: Reland of Make cricket::VideoCapturer implement VideoSourceInterface (patchset #14 id:30000… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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/base/videosourceinterface.h ('k') | webrtc/media/engine/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_ENGINE_WEBRTCVIDEOCAPTURER_H_ 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURER_H_
12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURER_H_ 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURER_H_
13 13
14 #ifdef HAVE_WEBRTC_VIDEO
15
16 #include <string> 14 #include <string>
17 #include <vector> 15 #include <vector>
18 16
19 #include "webrtc/base/asyncinvoker.h" 17 #include "webrtc/base/asyncinvoker.h"
20 #include "webrtc/base/messagehandler.h" 18 #include "webrtc/base/messagehandler.h"
21 #include "webrtc/base/scoped_ptr.h" 19 #include "webrtc/base/scoped_ptr.h"
22 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
23 #include "webrtc/media/base/videocapturer.h" 21 #include "webrtc/media/base/videocapturer.h"
24 #include "webrtc/media/engine/webrtcvideoframe.h" 22 #include "webrtc/media/engine/webrtcvideoframe.h"
25 #include "webrtc/modules/video_capture/video_capture.h" 23 #include "webrtc/modules/video_capture/video_capture.h"
(...skipping 17 matching lines...) Expand all
43 public webrtc::VideoCaptureDataCallback { 41 public webrtc::VideoCaptureDataCallback {
44 public: 42 public:
45 WebRtcVideoCapturer(); 43 WebRtcVideoCapturer();
46 explicit WebRtcVideoCapturer(WebRtcVcmFactoryInterface* factory); 44 explicit WebRtcVideoCapturer(WebRtcVcmFactoryInterface* factory);
47 virtual ~WebRtcVideoCapturer(); 45 virtual ~WebRtcVideoCapturer();
48 46
49 bool Init(const Device& device); 47 bool Init(const Device& device);
50 bool Init(webrtc::VideoCaptureModule* module); 48 bool Init(webrtc::VideoCaptureModule* module);
51 49
52 // Override virtual methods of the parent class VideoCapturer. 50 // Override virtual methods of the parent class VideoCapturer.
53 virtual bool GetBestCaptureFormat(const VideoFormat& desired, 51 bool GetBestCaptureFormat(const VideoFormat& desired,
54 VideoFormat* best_format); 52 VideoFormat* best_format) override;
55 virtual CaptureState Start(const VideoFormat& capture_format); 53 CaptureState Start(const VideoFormat& capture_format) override;
56 virtual void Stop(); 54 void Stop() override;
57 virtual bool IsRunning(); 55 bool IsRunning() override;
58 virtual bool IsScreencast() const { return false; } 56 bool IsScreencast() const override { return false; }
59 virtual bool SetApplyRotation(bool enable);
60 57
61 protected: 58 protected:
59 void OnSinkWantsChanged(const rtc::VideoSinkWants& wants) override;
62 // Override virtual methods of the parent class VideoCapturer. 60 // Override virtual methods of the parent class VideoCapturer.
63 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs); 61 virtual bool GetPreferredFourccs(std::vector<uint32_t>* fourccs);
64 62
65 private: 63 private:
66 // Callback when a frame is captured by camera. 64 // Callback when a frame is captured by camera.
67 virtual void OnIncomingCapturedFrame(const int32_t id, 65 virtual void OnIncomingCapturedFrame(const int32_t id,
68 const webrtc::VideoFrame& frame); 66 const webrtc::VideoFrame& frame);
69 virtual void OnCaptureDelayChanged(const int32_t id, 67 virtual void OnCaptureDelayChanged(const int32_t id,
70 const int32_t delay); 68 const int32_t delay);
71 69
(...skipping 16 matching lines...) Expand all
88 86
89 struct WebRtcCapturedFrame : public CapturedFrame { 87 struct WebRtcCapturedFrame : public CapturedFrame {
90 public: 88 public:
91 WebRtcCapturedFrame(const webrtc::VideoFrame& frame, 89 WebRtcCapturedFrame(const webrtc::VideoFrame& frame,
92 void* buffer, 90 void* buffer,
93 size_t length); 91 size_t length);
94 }; 92 };
95 93
96 } // namespace cricket 94 } // namespace cricket
97 95
98 #endif // HAVE_WEBRTC_VIDEO 96 #endif // WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_
99 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOCAPTURER_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/videosourceinterface.h ('k') | webrtc/media/engine/webrtcvideocapturer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698