summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authorlionel.g.landwerlin <lionel.g.landwerlin@intel.com>2015-05-05 17:01:52 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 00:02:22 +0000
commitb8698ac499c130cfea8015d39f539a603a3933c3 (patch)
tree7ad3a08774f68b93a8b0ac8b26652a31c2f97680 /ppapi/api
parent76c0148024b97f8dec0816138f4e0643bb562a27 (diff)
downloadchromium_src-b8698ac499c130cfea8015d39f539a603a3933c3.zip
chromium_src-b8698ac499c130cfea8015d39f539a603a3933c3.tar.gz
chromium_src-b8698ac499c130cfea8015d39f539a603a3933c3.tar.bz2
ppapi: report hardware support with PP_Bool in PP_VideoProfileDescription
We previously reported hardware acceleration support using an enum. Make this simpler by reporting it with a boolean field. Now if a profile is supported both in hardware and software, it will be reported with 2 different PP_VideoProfileDescription. BUG=455409 TEST=compile a NaCl app with the 0.2 api and test it against chromium before and after this patch Review URL: https://codereview.chromium.org/1089223002 Cr-Commit-Position: refs/heads/master@{#328442}
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/pp_codecs.idl32
-rw-r--r--ppapi/api/ppb_video_encoder.idl22
2 files changed, 52 insertions, 2 deletions
diff --git a/ppapi/api/pp_codecs.idl b/ppapi/api/pp_codecs.idl
index 3a20e98..89642a9 100644
--- a/ppapi/api/pp_codecs.idl
+++ b/ppapi/api/pp_codecs.idl
@@ -142,6 +142,37 @@ struct PP_VideoProfileDescription {
uint32_t max_framerate_denominator;
/**
+ * Whether the profile is hardware accelerated.
+ */
+ PP_Bool hardware_accelerated;
+};
+
+/**
+ * Supported video profile information. See the PPB_VideoEncoder function
+ * GetSupportedProfiles() for more details.
+ */
+struct PP_VideoProfileDescription_0_1 {
+ /**
+ * The codec profile.
+ */
+ PP_VideoProfile profile;
+
+ /**
+ * Dimensions of the maximum resolution of video frames, in pixels.
+ */
+ PP_Size max_resolution;
+
+ /**
+ * The numerator of the maximum frame rate.
+ */
+ uint32_t max_framerate_numerator;
+
+ /**
+ * The denominator of the maximum frame rate.
+ */
+ uint32_t max_framerate_denominator;
+
+ /**
* A value indicating if the profile is available in hardware, software, or
* both.
*/
@@ -167,4 +198,3 @@ struct PP_BitstreamBuffer {
*/
PP_Bool key_frame;
};
-
diff --git a/ppapi/api/ppb_video_encoder.idl b/ppapi/api/ppb_video_encoder.idl
index 78b6e60..68a7f6d 100644
--- a/ppapi/api/ppb_video_encoder.idl
+++ b/ppapi/api/ppb_video_encoder.idl
@@ -10,7 +10,8 @@
[generate_thunk]
label Chrome {
- [channel=dev] M42 = 0.1
+ [channel=dev] M42 = 0.1,
+ [channel=dev] M44 = 0.2
};
/**
@@ -66,6 +67,24 @@ interface PPB_VideoEncoder {
* @param[in] video_encoder A <code>PP_Resource</code> identifying the video
* encoder.
* @param[in] output A <code>PP_ArrayOutput</code> to receive the supported
+ * <code>PP_VideoProfileDescription_0_1</code> structs.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion.
+ *
+ * @return If >= 0, the number of supported profiles returned, otherwise an
+ * error code from <code>pp_errors.h</code>.
+ */
+ int32_t GetSupportedProfiles([in] PP_Resource video_encoder,
+ [in] PP_ArrayOutput output,
+ [in] PP_CompletionCallback callback);
+
+ /**
+ * Gets an array of supported video encoder profiles.
+ * These can be used to choose a profile before calling Initialize().
+ *
+ * @param[in] video_encoder A <code>PP_Resource</code> identifying the video
+ * encoder.
+ * @param[in] output A <code>PP_ArrayOutput</code> to receive the supported
* <code>PP_VideoProfileDescription</code> structs.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion.
@@ -73,6 +92,7 @@ interface PPB_VideoEncoder {
* @return If >= 0, the number of supported profiles returned, otherwise an
* error code from <code>pp_errors.h</code>.
*/
+ [version = 0.2]
int32_t GetSupportedProfiles([in] PP_Resource video_encoder,
[in] PP_ArrayOutput output,
[in] PP_CompletionCallback callback);