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

Side by Side Diff: media/video/video_encode_accelerator.h

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIDEO_ENCODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "gpu/config/gpu_info.h"
12 #include "media/base/bitstream_buffer.h" 13 #include "media/base/bitstream_buffer.h"
13 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
14 #include "media/base/video_decoder_config.h" 15 #include "media/base/video_decoder_config.h"
15 #include "media/base/video_frame.h" 16 #include "media/base/video_frame.h"
16 17
17 namespace media { 18 namespace media {
18 19
19 class BitstreamBuffer; 20 class BitstreamBuffer;
20 class VideoFrame; 21 class VideoFrame;
21 22
22 // Video encoder interface. 23 // Video encoder interface.
23 class MEDIA_EXPORT VideoEncodeAccelerator { 24 class MEDIA_EXPORT VideoEncodeAccelerator {
24 public: 25 public:
25 // Specification of an encoding profile supported by an encoder.
26 struct SupportedProfile {
27 VideoCodecProfile profile;
28 gfx::Size max_resolution;
29 uint32 max_framerate_numerator;
30 uint32 max_framerate_denominator;
31 };
32
33 // Enumeration of potential errors generated by the API. 26 // Enumeration of potential errors generated by the API.
34 enum Error { 27 enum Error {
35 // An operation was attempted during an incompatible encoder state. 28 // An operation was attempted during an incompatible encoder state.
36 kIllegalStateError, 29 kIllegalStateError,
37 // Invalid argument was passed to an API method. 30 // Invalid argument was passed to an API method.
38 kInvalidArgumentError, 31 kInvalidArgumentError,
39 // A failure occurred at the GPU process or one of its dependencies. 32 // A failure occurred at the GPU process or one of its dependencies.
40 // Examples of such failures include GPU hardware failures, GPU driver 33 // Examples of such failures include GPU hardware failures, GPU driver
41 // failures, GPU library failures, GPU process programming errors, and so 34 // failures, GPU library failures, GPU process programming errors, and so
42 // on. 35 // on.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 protected: 78 protected:
86 // Clients are not owned by VEA instances and should not be deleted through 79 // Clients are not owned by VEA instances and should not be deleted through
87 // these pointers. 80 // these pointers.
88 virtual ~Client() {} 81 virtual ~Client() {}
89 }; 82 };
90 83
91 // Video encoder functions. 84 // Video encoder functions.
92 85
93 // Returns a list of the supported codec profiles of the video encoder. This 86 // Returns a list of the supported codec profiles of the video encoder. This
94 // can be called before Initialize(). 87 // can be called before Initialize().
95 virtual std::vector<SupportedProfile> GetSupportedProfiles() = 0; 88 virtual std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
89 GetSupportedProfiles() = 0;
96 90
97 // Initializes the video encoder with specific configuration. Called once per 91 // Initializes the video encoder with specific configuration. Called once per
98 // encoder construction. This call is synchronous and returns true iff 92 // encoder construction. This call is synchronous and returns true iff
99 // initialization is successful. 93 // initialization is successful.
100 // Parameters: 94 // Parameters:
101 // |input_format| is the frame format of the input stream (as would be 95 // |input_format| is the frame format of the input stream (as would be
102 // reported by VideoFrame::format() for frames passed to Encode()). 96 // reported by VideoFrame::format() for frames passed to Encode()).
103 // |input_visible_size| is the resolution of the input stream (as would be 97 // |input_visible_size| is the resolution of the input stream (as would be
104 // reported by VideoFrame::visible_rect().size() for frames passed to 98 // reported by VideoFrame::visible_rect().size() for frames passed to
105 // Encode()). 99 // Encode()).
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // uses "Destroy()" instead of trying to use the destructor. 155 // uses "Destroy()" instead of trying to use the destructor.
162 template <> 156 template <>
163 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> { 157 struct MEDIA_EXPORT DefaultDeleter<media::VideoEncodeAccelerator> {
164 public: 158 public:
165 void operator()(void* video_encode_accelerator) const; 159 void operator()(void* video_encode_accelerator) const;
166 }; 160 };
167 161
168 } // namespace base 162 } // namespace base
169 163
170 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_ 164 #endif // MEDIA_VIDEO_VIDEO_ENCODE_ACCELERATOR_H_
OLDNEW
« gpu/config/gpu_info.h ('K') | « media/filters/mock_gpu_video_accelerator_factories.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698