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

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

Issue 416553002: VideoCaptureFormat: add method to print out pixel format as string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
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 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_ 5 #ifndef MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_
6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_ 6 #define MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 28 matching lines...) Expand all
39 // This class is used by the video capture device to specify the format of every 39 // This class is used by the video capture device to specify the format of every
40 // frame captured and returned to a client. It is also used to specify a 40 // frame captured and returned to a client. It is also used to specify a
41 // supported capture format by a device. 41 // supported capture format by a device.
42 class MEDIA_EXPORT VideoCaptureFormat { 42 class MEDIA_EXPORT VideoCaptureFormat {
43 public: 43 public:
44 VideoCaptureFormat(); 44 VideoCaptureFormat();
45 VideoCaptureFormat(const gfx::Size& frame_size, 45 VideoCaptureFormat(const gfx::Size& frame_size,
46 float frame_rate, 46 float frame_rate,
47 VideoPixelFormat pixel_format); 47 VideoPixelFormat pixel_format);
48 48
49 static std::string PixelFormatToString(VideoPixelFormat format);
50
49 // Checks that all values are in the expected range. All limits are specified 51 // Checks that all values are in the expected range. All limits are specified
50 // in media::Limits. 52 // in media::Limits.
51 bool IsValid() const; 53 bool IsValid() const;
52 54
53 gfx::Size frame_size; 55 gfx::Size frame_size;
54 float frame_rate; 56 float frame_rate;
55 VideoPixelFormat pixel_format; 57 VideoPixelFormat pixel_format;
56 }; 58 };
57 59
58 typedef std::vector<VideoCaptureFormat> VideoCaptureFormats; 60 typedef std::vector<VideoCaptureFormat> VideoCaptureFormats;
59 61
60 // Parameters for starting video capture. 62 // Parameters for starting video capture.
61 // This class is used by the client of a video capture device to specify the 63 // This class is used by the client of a video capture device to specify the
62 // format of frames in which the client would like to have captured frames 64 // format of frames in which the client would like to have captured frames
63 // returned. 65 // returned.
64 class MEDIA_EXPORT VideoCaptureParams { 66 class MEDIA_EXPORT VideoCaptureParams {
65 public: 67 public:
66 VideoCaptureParams(); 68 VideoCaptureParams();
67 69
68 // Requests a resolution and format at which the capture will occur. 70 // Requests a resolution and format at which the capture will occur.
69 VideoCaptureFormat requested_format; 71 VideoCaptureFormat requested_format;
70 72
71 // Allow mid-capture resolution change. 73 // Allow mid-capture resolution change.
72 bool allow_resolution_change; 74 bool allow_resolution_change;
73 }; 75 };
74 76
75 } // namespace media 77 } // namespace media
76 78
77 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_ 79 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_TYPES_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.cc ('k') | media/video/capture/video_capture_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698