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

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: fixes from bbudge Created 7 years, 1 month 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 27 matching lines...) Expand all
38 38
39 // Notify client that the client has been removed and no more calls will be 39 // Notify client that the client has been removed and no more calls will be
40 // received. 40 // received.
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.
49 virtual void OnDeviceInfoReceived(
50 VideoCapture* capture,
51 const VideoCaptureParams& device_info) = 0;
52
53 // Notify client about the newly changed device info.
54 virtual void OnDeviceInfoChanged(
55 VideoCapture* capture,
56 const VideoCaptureParams& device_info) {};
57
58 protected: 48 protected:
59 virtual ~EventHandler() {} 49 virtual ~EventHandler() {}
60 }; 50 };
61 51
62 VideoCapture() {} 52 VideoCapture() {}
63 53
64 // Request video capture to start capturing with |capability|. 54 // Request video capture to start capturing with |params|.
65 // Also register |handler| with video capture for event handling. 55 // Also register |handler| with video capture for event handling.
66 // |handler| must remain valid until it has received |OnRemoved()|. 56 // |handler| must remain valid until it has received |OnRemoved()|.
67 virtual void StartCapture(EventHandler* handler, 57 virtual void StartCapture(EventHandler* handler,
68 const VideoCaptureCapability& capability) = 0; 58 const VideoCaptureParams& params) = 0;
69 59
70 // Request video capture to stop capturing for client |handler|. 60 // Request video capture to stop capturing for client |handler|.
71 // |handler| must remain valid until it has received |OnRemoved()|. 61 // |handler| must remain valid until it has received |OnRemoved()|.
72 virtual void StopCapture(EventHandler* handler) = 0; 62 virtual void StopCapture(EventHandler* handler) = 0;
73 63
74 virtual bool CaptureStarted() = 0; 64 virtual bool CaptureStarted() = 0;
75 virtual int CaptureWidth() = 0;
76 virtual int CaptureHeight() = 0;
77 virtual int CaptureFrameRate() = 0; 65 virtual int CaptureFrameRate() = 0;
78 66
79 protected: 67 protected:
80 virtual ~VideoCapture() {} 68 virtual ~VideoCapture() {}
81 69
82 private: 70 private:
83 DISALLOW_COPY_AND_ASSIGN(VideoCapture); 71 DISALLOW_COPY_AND_ASSIGN(VideoCapture);
84 }; 72 };
85 73
86 } // namespace media 74 } // namespace media
87 75
88 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_ 76 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_capture_host.cc ('k') | media/video/capture/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698