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

Unified Diff: ppapi/api/pp_codecs.idl

Issue 1128023009: ppapi: define PPB_AudioEncoder API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GetNumberOfSamples() for Speex Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/api/pp_codecs.idl
diff --git a/ppapi/api/pp_codecs.idl b/ppapi/api/pp_codecs.idl
index 89642a9adce32f27a93bf3b8c84f4aaa3e98fb27..2bf47afaaf99ec2dfae84e28364d3ac2af075b5c 100644
--- a/ppapi/api/pp_codecs.idl
+++ b/ppapi/api/pp_codecs.idl
@@ -24,6 +24,15 @@ enum PP_VideoProfile {
};
/**
+ * Audio profiles.
+ */
+enum PP_AudioProfile {
+ PP_AUDIOPROFILE_OPUS = 0,
+ PP_AUDIOPROFILE_SPEEX = 1,
+ PP_AUDIOPROFILE_MAX = PP_AUDIOPROFILE_SPEEX
bbudge 2015/06/09 17:29:41 Is it possible to support AAC? This is very useful
llandwerlin-old 2015/06/10 09:06:19 It's possible to support AAC, although it seems ch
bbudge 2015/09/04 16:26:50 OK.
+};
+
+/**
* Hardware acceleration options.
*/
enum PP_HardwareAcceleration {
@@ -180,6 +189,37 @@ struct PP_VideoProfileDescription_0_1 {
};
/**
+ * Supported audio profile information. See the PPB_AudioEncoder function
+ * GetSupportedProfiles() for more details.
+ */
+struct PP_AudioProfileDescription {
+ /**
+ * The codec profile.
+ */
+ PP_AudioProfile profile;
+
+ /**
+ * Maximum number of channels that can be encoded.
+ */
+ uint32_t max_channels;
+
+ /**
+ * Sample size.
+ */
+ uint32_t sample_size;
+
+ /**
+ * Sampling rate that can be encoded
+ */
+ uint32_t sample_rate;
+
+ /**
+ * Whether the profile is hardware accelerated.
+ */
+ PP_Bool hardware_accelerated;
+};
+
+/**
* Struct describing a bitstream buffer.
*/
struct PP_BitstreamBuffer {
@@ -198,3 +238,18 @@ struct PP_BitstreamBuffer {
*/
PP_Bool key_frame;
};
+
+/**
+ * Struct describing an audio bitstream buffer.
+ */
+struct PP_AudioBitstreamBuffer {
+ /**
+ * The size, in bytes, of the bitstream data.
+ */
+ uint32_t size;
+
+ /**
+ * The base address of the bitstream data.
+ */
+ mem_t buffer;
+};

Powered by Google App Engine
This is Rietveld 408576698