| Index: ppapi/c/ppb_audio_frame.h
|
| diff --git a/ppapi/c/ppb_video_frame.h b/ppapi/c/ppb_audio_frame.h
|
| similarity index 42%
|
| copy from ppapi/c/ppb_video_frame.h
|
| copy to ppapi/c/ppb_audio_frame.h
|
| index 02fdc807bfd0f88c21423b91d9a3cd86502b31d6..3f2b2a34ebf10a286d0c3b91982f32f803ff8219 100644
|
| --- a/ppapi/c/ppb_video_frame.h
|
| +++ b/ppapi/c/ppb_audio_frame.h
|
| @@ -3,131 +3,103 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -/* From ppb_video_frame.idl modified Fri Dec 27 17:21:52 2013. */
|
| +/* From ppb_audio_frame.idl modified Thu Jan 9 14:39:24 2014. */
|
|
|
| -#ifndef PPAPI_C_PPB_VIDEO_FRAME_H_
|
| -#define PPAPI_C_PPB_VIDEO_FRAME_H_
|
| +#ifndef PPAPI_C_PPB_AUDIO_FRAME_H_
|
| +#define PPAPI_C_PPB_AUDIO_FRAME_H_
|
|
|
| #include "ppapi/c/pp_bool.h"
|
| #include "ppapi/c/pp_macros.h"
|
| #include "ppapi/c/pp_resource.h"
|
| -#include "ppapi/c/pp_size.h"
|
| #include "ppapi/c/pp_stdint.h"
|
| #include "ppapi/c/pp_time.h"
|
|
|
| -#define PPB_VIDEOFRAME_INTERFACE_0_1 "PPB_VideoFrame;0.1" /* dev */
|
| +#define PPB_AUDIOFRAME_INTERFACE_0_1 "PPB_AudioFrame;0.1" /* dev */
|
| /**
|
| * @file
|
| - * Defines the <code>PPB_VideoFrame</code> interface.
|
| + * Defines the <code>PPB_AudioFrame</code> interface.
|
| */
|
|
|
|
|
| /**
|
| - * @addtogroup Enums
|
| - * @{
|
| - */
|
| -typedef enum {
|
| - /**
|
| - * Unknown format value.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_UNKNOWN = 0,
|
| - /**
|
| - * 12bpp YVU planar 1x1 Y, 2x2 VU samples.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_YV12 = 1,
|
| - /**
|
| - * 16bpp YVU planar 1x1 Y, 2x1 VU samples.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_YV16 = 2,
|
| - /**
|
| - * 12bpp YVU planar 1x1 Y, 2x2 VU samples.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_I420 = 3,
|
| - /**
|
| - * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_YV12A = 4,
|
| - /**
|
| - * JPEG color range version of YV12.
|
| - */
|
| - PP_VIDEOFRAME_FORMAT_YV12J = 5
|
| -} PP_VideoFrame_Format;
|
| -/**
|
| - * @}
|
| - */
|
| -
|
| -/**
|
| * @addtogroup Interfaces
|
| * @{
|
| */
|
| -struct PPB_VideoFrame_0_1 { /* dev */
|
| +struct PPB_AudioFrame_0_1 { /* dev */
|
| /**
|
| - * Determines if a resource is a VideoFrame resource.
|
| + * Determines if a resource is an AudioFrame resource.
|
| *
|
| * @param[in] resource The <code>PP_Resource</code> to test.
|
| *
|
| * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
|
| - * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise.
|
| + * resource is an AudioFrame resource or <code>PP_FALSE</code> otherwise.
|
| */
|
| - PP_Bool (*IsVideoFrame)(PP_Resource resource);
|
| + PP_Bool (*IsAudioFrame)(PP_Resource resource);
|
| /**
|
| - * Gets the timestamp of the video frame.
|
| + * Gets the timestamp of the audio frame.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| *
|
| - * @return A <code>PP_TimeDelta</code> containing the timestamp of the video
|
| - * frame. Given in seconds since the start of the containing video stream.
|
| + * @return A <code>PP_TimeDelta</code> containing the timestamp of the audio
|
| + * frame. Given in seconds since the start of the containing audio stream.
|
| */
|
| PP_TimeDelta (*GetTimestamp)(PP_Resource frame);
|
| /**
|
| - * Sets the timestamp of the video frame. Given in seconds since the
|
| - * start of the containing video stream.
|
| + * Sets the timestamp of the audio frame.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
|
| - * of the video frame. Given in seconds since the start of the containing
|
| - * video stream.
|
| + * of the audio frame. Given in seconds since the start of the containing
|
| + * audio stream.
|
| */
|
| void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp);
|
| /**
|
| - * Gets the format of the video frame.
|
| + * Gets the sample size of the audio frame.
|
| + *
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| + * resource.
|
| + *
|
| + * @return The sample size of the audio frame.
|
| + */
|
| + uint32_t (*GetSampleSize)(PP_Resource frame);
|
| + /**
|
| + * Gets the number of channels in the audio frame.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| *
|
| - * @return A <code>PP_VideoFrame_Format</code> containing the format of the
|
| - * video frame.
|
| + * @return The number of channels in the audio frame.
|
| */
|
| - PP_VideoFrame_Format (*GetFormat)(PP_Resource frame);
|
| + uint32_t (*GetNumberOfChannels)(PP_Resource frame);
|
| /**
|
| - * Gets the size of the video frame.
|
| + * Gets the number of samples in the audio frame.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| - * @param[out] size A <code>PP_Size</code>.
|
| *
|
| - * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or
|
| - * <code>PP_FALSE</code> on failure.
|
| + * @return The number of samples in the audio frame.
|
| + * For example, at a sampling rate of 44,100 Hz in stereo audio, a frame
|
| + * containing 4410 * 2 samples would have a duration of 100 milliseconds.
|
| */
|
| - PP_Bool (*GetSize)(PP_Resource frame, struct PP_Size* size);
|
| + uint32_t (*GetNumberOfSamples)(PP_Resource frame);
|
| /**
|
| - * Gets the data buffer for video frame pixels.
|
| + * Gets the data buffer containing the audio frame samples.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| *
|
| * @return A pointer to the beginning of the data buffer.
|
| */
|
| void* (*GetDataBuffer)(PP_Resource frame);
|
| /**
|
| - * Gets the size of data buffer.
|
| + * Gets the size of the data buffer in bytes.
|
| *
|
| - * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
|
| + * @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
|
| * resource.
|
| *
|
| - * @return The size of the data buffer.
|
| + * @return The size of the data buffer in bytes.
|
| */
|
| uint32_t (*GetDataBufferSize)(PP_Resource frame);
|
| };
|
| @@ -135,5 +107,5 @@ struct PPB_VideoFrame_0_1 { /* dev */
|
| * @}
|
| */
|
|
|
| -#endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */
|
| +#endif /* PPAPI_C_PPB_AUDIO_FRAME_H_ */
|
|
|
|
|