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

Side by Side Diff: media/video/capture/video_capture.h

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add assert to vcbp unittest Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file contains abstract classes used for media filter to handle video 5 // This file contains abstract classes used for media filter to handle video
6 // capture devices. 6 // capture devices.
7 7
8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ 8 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_
9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ 9 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_
10 10
(...skipping 30 matching lines...) Expand all
41 virtual void OnRemoved(VideoCapture* capture) = 0; 41 virtual void OnRemoved(VideoCapture* capture) = 0;
42 42
43 // Notify client that a buffer is available. 43 // Notify client that a buffer is available.
44 virtual void OnFrameReady( 44 virtual void OnFrameReady(
45 VideoCapture* capture, 45 VideoCapture* capture,
46 const scoped_refptr<media::VideoFrame>& frame) = 0; 46 const scoped_refptr<media::VideoFrame>& frame) = 0;
47 47
48 // Notify client about device info. 48 // Notify client about device info.
49 virtual void OnDeviceInfoReceived( 49 virtual void OnDeviceInfoReceived(
50 VideoCapture* capture, 50 VideoCapture* capture,
51 const VideoCaptureParams& device_info) = 0; 51 const VideoCaptureFormat& device_info) = 0;
Ami GONE FROM CHROMIUM 2013/10/04 00:24:15 Any reason not to provide empty body for this, lik
ncarter (slow) 2013/10/16 02:08:40 Removed altogether.
52 52
53 // Notify client about the newly changed device info. 53 // Notify client about the newly changed device info.
54 virtual void OnDeviceInfoChanged( 54 virtual void OnDeviceInfoChanged(
Ami GONE FROM CHROMIUM 2013/10/04 00:24:15 CL description makes me think OnDeviceInfo{Changed
ncarter (slow) 2013/10/16 02:08:40 Done.
55 VideoCapture* capture, 55 VideoCapture* capture,
56 const VideoCaptureParams& device_info) {}; 56 const VideoCaptureFormat& device_info) {};
57 57
58 protected: 58 protected:
59 virtual ~EventHandler() {} 59 virtual ~EventHandler() {}
60 }; 60 };
61 61
62 VideoCapture() {} 62 VideoCapture() {}
63 63
64 // Request video capture to start capturing with |capability|. 64 // Request video capture to start capturing with |params|.
65 // Also register |handler| with video capture for event handling. 65 // Also register |handler| with video capture for event handling.
66 // |handler| must remain valid until it has received |OnRemoved()|. 66 // |handler| must remain valid until it has received |OnRemoved()|.
67 virtual void StartCapture(EventHandler* handler, 67 virtual void StartCapture(EventHandler* handler,
68 const VideoCaptureCapability& capability) = 0; 68 const VideoCaptureParams& params) = 0;
69 69
70 // Request video capture to stop capturing for client |handler|. 70 // Request video capture to stop capturing for client |handler|.
71 // |handler| must remain valid until it has received |OnRemoved()|. 71 // |handler| must remain valid until it has received |OnRemoved()|.
72 virtual void StopCapture(EventHandler* handler) = 0; 72 virtual void StopCapture(EventHandler* handler) = 0;
73 73
74 virtual bool CaptureStarted() = 0; 74 virtual bool CaptureStarted() = 0;
75 virtual int CaptureWidth() = 0; 75 virtual int CaptureWidth() = 0;
76 virtual int CaptureHeight() = 0; 76 virtual int CaptureHeight() = 0;
77 virtual int CaptureFrameRate() = 0; 77 virtual int CaptureFrameRate() = 0;
78 78
79 protected: 79 protected:
80 virtual ~VideoCapture() {} 80 virtual ~VideoCapture() {}
81 81
82 private: 82 private:
83 DISALLOW_COPY_AND_ASSIGN(VideoCapture); 83 DISALLOW_COPY_AND_ASSIGN(VideoCapture);
84 }; 84 };
85 85
86 } // namespace media 86 } // namespace media
87 87
88 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ 88 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698