[PPAPI] API definition for audio media stream artifacts

This API follows the design at
https://docs.google.com/a/google.com/document/d/1rlwmFhf7VCX8mfrBok8wqXNgvr_ERhL2k6Fqha-pgIo/edit?disco=AAAAAHos8Y8#

c++ interface will be implemented in a separate CL.

It defines new objects for the consumption of media audio tracks based
on the private VideoSource/VideoDestination classes.

BUG=330851

Review URL: https://codereview.chromium.org/126373003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244009 0039d316-1c4b-4281-b951-d872f2087c98
parent b5546e85
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
'FILES': [ 'FILES': [
'pp_array_output.h', 'pp_array_output.h',
'ppb_audio_config.h', 'ppb_audio_config.h',
'ppb_audio_frame.h',
'ppb_audio.h', 'ppb_audio.h',
'ppb_console.h', 'ppb_console.h',
'ppb_core.h', 'ppb_core.h',
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
'ppb_image_data.h', 'ppb_image_data.h',
'ppb_input_event.h', 'ppb_input_event.h',
'ppb_instance.h', 'ppb_instance.h',
'ppb_media_stream_audio_track.h',
'ppb_media_stream_video_track.h', 'ppb_media_stream_video_track.h',
'ppb_message_loop.h', 'ppb_message_loop.h',
'ppb_messaging.h', 'ppb_messaging.h',
......
/* Copyright 2014 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/**
* Defines the <code>PPB_AudioFrame</code> interface.
*/
label Chrome {
[channel=dev] M34 = 0.1
};
interface PPB_AudioFrame {
/**
* 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 an AudioFrame resource or <code>PP_FALSE</code> otherwise.
*/
PP_Bool IsAudioFrame([in] PP_Resource resource);
/**
* Gets the timestamp of the audio 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 audio
* frame. Given in seconds since the start of the containing audio stream.
*/
PP_TimeDelta GetTimestamp([in] PP_Resource frame);
/**
* Sets the timestamp of the audio 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 audio frame. Given in seconds since the start of the containing
* audio stream.
*/
void SetTimestamp([in] PP_Resource frame, [in] PP_TimeDelta timestamp);
/**
* 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([in] PP_Resource frame);
/**
* Gets the number of channels in the audio frame.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @return The number of channels in the audio frame.
*/
uint32_t GetNumberOfChannels([in] PP_Resource frame);
/**
* Gets the number of samples in the audio frame.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @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.
*/
uint32_t GetNumberOfSamples([in] PP_Resource frame);
/**
* Gets the data buffer containing the audio frame samples.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @return A pointer to the beginning of the data buffer.
*/
mem_t GetDataBuffer([in] PP_Resource frame);
/**
* Gets the size of the data buffer in bytes.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @return The size of the data buffer in bytes.
*/
uint32_t GetDataBufferSize([in] PP_Resource frame);
};
/* Copyright 2014 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/**
* Defines the <code>PPB_MediaStreamAudioTrack</code> interface. Used for
* receiving audio frames from a MediaStream audio track in the browser.
* This interface is still in development (Dev API status) and may change.
*/
label Chrome {
[channel=dev] M34 = 0.1
};
/**
*/
interface PPB_MediaStreamAudioTrack {
/**
* Determines if a resource is a MediaStream audio track 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 Mediastream audio track resource or <code>PP_FALSE</code>
* otherwise.
*/
PP_Bool IsMediaStreamAudioTrack([in] PP_Resource resource);
/**
* Configures underlying frame buffers for incoming frames.
* If the application doesn't want to drop frames, then the
* <code>max_buffered_frames</code> should be chosen such that inter-frame
* processing time variability won't overrun the input buffer. If the buffer
* is overfilled, then frames will be dropped. The application can detect
* this by examining the timestamp on returned frames.
* If <code>Configure()</code> is not used, default settings will be used.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[in] samples_per_frame The number of audio samples in an audio frame.
* @param[in] max_buffered_frames The maximum number of audio frames to
* hold in the input buffer.
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
*/
int32_t Configure([in] PP_Resource audio_track,
[in] uint32_t samples_per_frame,
[in] uint32_t max_buffered_frames);
/**
* Returns the track ID of the underlying MediaStream audio track.
*
* @param[in] audio_track The <code>PP_Resource</code> to check.
*
* @return A <code>PP_Var</code> containing the MediaStream track ID as
* a string.
*/
PP_Var GetId([in] PP_Resource audio_track);
/**
* Checks whether the underlying MediaStream track has ended.
* Calls to GetFrame while the track has ended are safe to make and will
* complete, but will fail.
*
* @param[in] audio_track The <code>PP_Resource</code> to check.
*
* @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
* MediaStream track has ended or <code>PP_FALSE</code> otherwise.
*/
PP_Bool HasEnded([in] PP_Resource audio_track);
/**
* Gets the next audio frame from the MediaStream track.
* If internal processing is slower than the incoming frame rate, new frames
* will be dropped from the incoming stream. Once the input buffer is full,
* frames will be dropped until <code>RecycleFrame()</code> is called to free
* a spot for another frame to be buffered.
* If there are no frames in the input buffer,
* <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the
* <code>callback</code> will be called, when a new frame is received or an
* error happens.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[out] frame A <code>PP_Resource</code> corresponding to an AudioFrame
* resource.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of GetFrame().
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
* Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer
* was not allocated successfully.
*/
int32_t GetFrame([in] PP_Resource audio_track,
[out] PP_Resource frame,
[in] PP_CompletionCallback callback);
/**
* Recycles a frame returned by <code>GetFrame()</code>, so the track can
* reuse the underlying buffer of this frame. And the frame will become
* invalid. The caller should release all references it holds to
* <code>frame</code> and not use it anymore.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[in] frame A <code>PP_Resource</code> corresponding to an AudioFrame
* resource returned by <code>GetFrame()</code>.
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
*/
int32_t RecycleFrame([in] PP_Resource audio_track,
[in] PP_Resource frame);
/**
* Closes the MediaStream audio track and disconnects it from the audio
* source. After calling <code>Close()</code>, no new frames will be received.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to a
* MediaStream audio track resource.
*/
void Close([in] PP_Resource audio_track);
};
/* Copyright 2014 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* From ppb_audio_frame.idl modified Thu Jan 9 14:39:24 2014. */
#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_stdint.h"
#include "ppapi/c/pp_time.h"
#define PPB_AUDIOFRAME_INTERFACE_0_1 "PPB_AudioFrame;0.1" /* dev */
/**
* @file
* Defines the <code>PPB_AudioFrame</code> interface.
*/
/**
* @addtogroup Interfaces
* @{
*/
struct PPB_AudioFrame_0_1 { /* dev */
/**
* 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 an AudioFrame resource or <code>PP_FALSE</code> otherwise.
*/
PP_Bool (*IsAudioFrame)(PP_Resource resource);
/**
* Gets the timestamp of the audio 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 audio
* frame. Given in seconds since the start of the containing audio stream.
*/
PP_TimeDelta (*GetTimestamp)(PP_Resource frame);
/**
* Sets the timestamp of the audio 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 audio frame. Given in seconds since the start of the containing
* audio stream.
*/
void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp);
/**
* 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 an audio frame
* resource.
*
* @return The number of channels in the audio frame.
*/
uint32_t (*GetNumberOfChannels)(PP_Resource frame);
/**
* Gets the number of samples in the audio frame.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @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.
*/
uint32_t (*GetNumberOfSamples)(PP_Resource frame);
/**
* Gets the data buffer containing the audio frame samples.
*
* @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 the data buffer in bytes.
*
* @param[in] frame A <code>PP_Resource</code> corresponding to an audio frame
* resource.
*
* @return The size of the data buffer in bytes.
*/
uint32_t (*GetDataBufferSize)(PP_Resource frame);
};
/**
* @}
*/
#endif /* PPAPI_C_PPB_AUDIO_FRAME_H_ */
/* Copyright 2014 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* From ppb_media_stream_audio_track.idl modified Tue Jan 7 17:05:06 2014. */
#ifndef PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_
#define PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
#define PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1 \
"PPB_MediaStreamAudioTrack;0.1" /* dev */
/**
* @file
* Defines the <code>PPB_MediaStreamAudioTrack</code> interface. Used for
* receiving audio frames from a MediaStream audio track in the browser.
* This interface is still in development (Dev API status) and may change.
*/
/**
* @addtogroup Interfaces
* @{
*/
/**
*/
struct PPB_MediaStreamAudioTrack_0_1 { /* dev */
/**
* Determines if a resource is a MediaStream audio track 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 Mediastream audio track resource or <code>PP_FALSE</code>
* otherwise.
*/
PP_Bool (*IsMediaStreamAudioTrack)(PP_Resource resource);
/**
* Configures underlying frame buffers for incoming frames.
* If the application doesn't want to drop frames, then the
* <code>max_buffered_frames</code> should be chosen such that inter-frame
* processing time variability won't overrun the input buffer. If the buffer
* is overfilled, then frames will be dropped. The application can detect
* this by examining the timestamp on returned frames.
* If <code>Configure()</code> is not used, default settings will be used.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[in] samples_per_frame The number of audio samples in an audio frame.
* @param[in] max_buffered_frames The maximum number of audio frames to
* hold in the input buffer.
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
*/
int32_t (*Configure)(PP_Resource audio_track,
uint32_t samples_per_frame,
uint32_t max_buffered_frames);
/**
* Returns the track ID of the underlying MediaStream audio track.
*
* @param[in] audio_track The <code>PP_Resource</code> to check.
*
* @return A <code>PP_Var</code> containing the MediaStream track ID as
* a string.
*/
struct PP_Var (*GetId)(PP_Resource audio_track);
/**
* Checks whether the underlying MediaStream track has ended.
* Calls to GetFrame while the track has ended are safe to make and will
* complete, but will fail.
*
* @param[in] audio_track The <code>PP_Resource</code> to check.
*
* @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
* MediaStream track has ended or <code>PP_FALSE</code> otherwise.
*/
PP_Bool (*HasEnded)(PP_Resource audio_track);
/**
* Gets the next audio frame from the MediaStream track.
* If internal processing is slower than the incoming frame rate, new frames
* will be dropped from the incoming stream. Once the input buffer is full,
* frames will be dropped until <code>RecycleFrame()</code> is called to free
* a spot for another frame to be buffered.
* If there are no frames in the input buffer,
* <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the
* <code>callback</code> will be called, when a new frame is received or an
* error happens.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[out] frame A <code>PP_Resource</code> corresponding to an AudioFrame
* resource.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion of GetFrame().
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
* Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer
* was not allocated successfully.
*/
int32_t (*GetFrame)(PP_Resource audio_track,
PP_Resource* frame,
struct PP_CompletionCallback callback);
/**
* Recycles a frame returned by <code>GetFrame()</code>, so the track can
* reuse the underlying buffer of this frame. And the frame will become
* invalid. The caller should release all references it holds to
* <code>frame</code> and not use it anymore.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to an audio
* resource.
* @param[in] frame A <code>PP_Resource</code> corresponding to an AudioFrame
* resource returned by <code>GetFrame()</code>.
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
*/
int32_t (*RecycleFrame)(PP_Resource audio_track, PP_Resource frame);
/**
* Closes the MediaStream audio track and disconnects it from the audio
* source. After calling <code>Close()</code>, no new frames will be received.
*
* @param[in] audio_track A <code>PP_Resource</code> corresponding to a
* MediaStream audio track resource.
*/
void (*Close)(PP_Resource audio_track);
};
/**
* @}
*/
#endif /* PPAPI_C_PPB_MEDIA_STREAM_AUDIO_TRACK_H_ */
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h" #include "ppapi/c/extensions/dev/ppb_ext_socket_dev.h"
#include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio.h"
#include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_audio_config.h"
#include "ppapi/c/ppb_audio_frame.h"
#include "ppapi/c/ppb_console.h" #include "ppapi/c/ppb_console.h"
#include "ppapi/c/ppb_core.h" #include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_file_io.h" #include "ppapi/c/ppb_file_io.h"
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
#include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_image_data.h"
#include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_media_stream_audio_track.h"
#include "ppapi/c/ppb_media_stream_video_track.h" #include "ppapi/c/ppb_media_stream_video_track.h"
#include "ppapi/c/ppb_message_loop.h" #include "ppapi/c/ppb_message_loop.h"
#include "ppapi/c/ppb_messaging.h" #include "ppapi/c/ppb_messaging.h"
...@@ -154,6 +156,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WheelInputEvent_1_0; ...@@ -154,6 +156,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WheelInputEvent_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MessageLoop_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MessageLoop_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Messaging_1_0; static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Messaging_1_0;
...@@ -247,6 +250,8 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_2; ...@@ -247,6 +250,8 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_Ext_Socket_Dev_0_2;
/* Not generating wrapper methods for PPB_AudioConfig_1_1 */ /* Not generating wrapper methods for PPB_AudioConfig_1_1 */
/* Not generating wrapper methods for PPB_AudioFrame_0_1 */
/* Begin wrapper methods for PPB_Console_1_0 */ /* Begin wrapper methods for PPB_Console_1_0 */
static void Pnacl_M25_PPB_Console_Log(PP_Instance instance, PP_LogLevel level, struct PP_Var* value) { static void Pnacl_M25_PPB_Console_Log(PP_Instance instance, PP_LogLevel level, struct PP_Var* value) {
...@@ -915,6 +920,45 @@ static void Pnacl_M13_PPB_IMEInputEvent_GetSelection(PP_Resource ime_event, uint ...@@ -915,6 +920,45 @@ static void Pnacl_M13_PPB_IMEInputEvent_GetSelection(PP_Resource ime_event, uint
/* Not generating wrapper methods for PPB_Instance_1_0 */ /* Not generating wrapper methods for PPB_Instance_1_0 */
/* Begin wrapper methods for PPB_MediaStreamAudioTrack_0_1 */
static PP_Bool Pnacl_M34_PPB_MediaStreamAudioTrack_IsMediaStreamAudioTrack(PP_Resource resource) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
return iface->IsMediaStreamAudioTrack(resource);
}
static int32_t Pnacl_M34_PPB_MediaStreamAudioTrack_Configure(PP_Resource audio_track, uint32_t samples_per_frame, uint32_t max_buffered_frames) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
return iface->Configure(audio_track, samples_per_frame, max_buffered_frames);
}
static void Pnacl_M34_PPB_MediaStreamAudioTrack_GetId(struct PP_Var* _struct_result, PP_Resource audio_track) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
*_struct_result = iface->GetId(audio_track);
}
static PP_Bool Pnacl_M34_PPB_MediaStreamAudioTrack_HasEnded(PP_Resource audio_track) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
return iface->HasEnded(audio_track);
}
static int32_t Pnacl_M34_PPB_MediaStreamAudioTrack_GetFrame(PP_Resource audio_track, PP_Resource* frame, struct PP_CompletionCallback* callback) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
return iface->GetFrame(audio_track, frame, *callback);
}
static int32_t Pnacl_M34_PPB_MediaStreamAudioTrack_RecycleFrame(PP_Resource audio_track, PP_Resource frame) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
return iface->RecycleFrame(audio_track, frame);
}
static void Pnacl_M34_PPB_MediaStreamAudioTrack_Close(PP_Resource audio_track) {
const struct PPB_MediaStreamAudioTrack_0_1 *iface = Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1.real_iface;
iface->Close(audio_track);
}
/* End wrapper methods for PPB_MediaStreamAudioTrack_0_1 */
/* Begin wrapper methods for PPB_MediaStreamVideoTrack_0_1 */ /* Begin wrapper methods for PPB_MediaStreamVideoTrack_0_1 */
static PP_Bool Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack(PP_Resource resource) { static PP_Bool Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack(PP_Resource resource) {
...@@ -4028,6 +4072,8 @@ static int32_t Pnacl_M29_PPB_Ext_Socket_Dev_GetJoinedGroups(PP_Instance instance ...@@ -4028,6 +4072,8 @@ static int32_t Pnacl_M29_PPB_Ext_Socket_Dev_GetJoinedGroups(PP_Instance instance
/* Not generating wrapper interface for PPB_AudioConfig_1_1 */ /* Not generating wrapper interface for PPB_AudioConfig_1_1 */
/* Not generating wrapper interface for PPB_AudioFrame_0_1 */
static struct PPB_Console_1_0 Pnacl_Wrappers_PPB_Console_1_0 = { static struct PPB_Console_1_0 Pnacl_Wrappers_PPB_Console_1_0 = {
.Log = (void (*)(PP_Instance instance, PP_LogLevel level, struct PP_Var value))&Pnacl_M25_PPB_Console_Log, .Log = (void (*)(PP_Instance instance, PP_LogLevel level, struct PP_Var value))&Pnacl_M25_PPB_Console_Log,
.LogWithSource = (void (*)(PP_Instance instance, PP_LogLevel level, struct PP_Var source, struct PP_Var value))&Pnacl_M25_PPB_Console_LogWithSource .LogWithSource = (void (*)(PP_Instance instance, PP_LogLevel level, struct PP_Var source, struct PP_Var value))&Pnacl_M25_PPB_Console_LogWithSource
...@@ -4207,6 +4253,16 @@ static struct PPB_IMEInputEvent_1_0 Pnacl_Wrappers_PPB_IMEInputEvent_1_0 = { ...@@ -4207,6 +4253,16 @@ static struct PPB_IMEInputEvent_1_0 Pnacl_Wrappers_PPB_IMEInputEvent_1_0 = {
/* Not generating wrapper interface for PPB_Instance_1_0 */ /* Not generating wrapper interface for PPB_Instance_1_0 */
static struct PPB_MediaStreamAudioTrack_0_1 Pnacl_Wrappers_PPB_MediaStreamAudioTrack_0_1 = {
.IsMediaStreamAudioTrack = (PP_Bool (*)(PP_Resource resource))&Pnacl_M34_PPB_MediaStreamAudioTrack_IsMediaStreamAudioTrack,
.Configure = (int32_t (*)(PP_Resource audio_track, uint32_t samples_per_frame, uint32_t max_buffered_frames))&Pnacl_M34_PPB_MediaStreamAudioTrack_Configure,
.GetId = (struct PP_Var (*)(PP_Resource audio_track))&Pnacl_M34_PPB_MediaStreamAudioTrack_GetId,
.HasEnded = (PP_Bool (*)(PP_Resource audio_track))&Pnacl_M34_PPB_MediaStreamAudioTrack_HasEnded,
.GetFrame = (int32_t (*)(PP_Resource audio_track, PP_Resource* frame, struct PP_CompletionCallback callback))&Pnacl_M34_PPB_MediaStreamAudioTrack_GetFrame,
.RecycleFrame = (int32_t (*)(PP_Resource audio_track, PP_Resource frame))&Pnacl_M34_PPB_MediaStreamAudioTrack_RecycleFrame,
.Close = (void (*)(PP_Resource audio_track))&Pnacl_M34_PPB_MediaStreamAudioTrack_Close
};
static struct PPB_MediaStreamVideoTrack_0_1 Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1 = { static struct PPB_MediaStreamVideoTrack_0_1 Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1 = {
.IsMediaStreamVideoTrack = (PP_Bool (*)(PP_Resource resource))&Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack, .IsMediaStreamVideoTrack = (PP_Bool (*)(PP_Resource resource))&Pnacl_M34_PPB_MediaStreamVideoTrack_IsMediaStreamVideoTrack,
.Configure = (int32_t (*)(PP_Resource video_track, uint32_t max_buffered_frames))&Pnacl_M34_PPB_MediaStreamVideoTrack_Configure, .Configure = (int32_t (*)(PP_Resource video_track, uint32_t max_buffered_frames))&Pnacl_M34_PPB_MediaStreamVideoTrack_Configure,
...@@ -5185,6 +5241,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0 = { ...@@ -5185,6 +5241,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0 = {
.real_iface = NULL .real_iface = NULL
}; };
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1 = {
.iface_macro = PPB_MEDIASTREAMAUDIOTRACK_INTERFACE_0_1,
.wrapped_iface = (void *) &Pnacl_Wrappers_PPB_MediaStreamAudioTrack_0_1,
.real_iface = NULL
};
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1 = { static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1 = {
.iface_macro = PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1, .iface_macro = PPB_MEDIASTREAMVIDEOTRACK_INTERFACE_0_1,
.wrapped_iface = (void *) &Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1, .wrapped_iface = (void *) &Pnacl_Wrappers_PPB_MediaStreamVideoTrack_0_1,
...@@ -5701,6 +5763,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = { ...@@ -5701,6 +5763,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0, &Pnacl_WrapperInfo_PPB_KeyboardInputEvent_1_0,
&Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0, &Pnacl_WrapperInfo_PPB_TouchInputEvent_1_0,
&Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0, &Pnacl_WrapperInfo_PPB_IMEInputEvent_1_0,
&Pnacl_WrapperInfo_PPB_MediaStreamAudioTrack_0_1,
&Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1, &Pnacl_WrapperInfo_PPB_MediaStreamVideoTrack_0_1,
&Pnacl_WrapperInfo_PPB_MessageLoop_1_0, &Pnacl_WrapperInfo_PPB_MessageLoop_1_0,
&Pnacl_WrapperInfo_PPB_Messaging_1_0, &Pnacl_WrapperInfo_PPB_Messaging_1_0,
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
'c/ppb.h', 'c/ppb.h',
'c/ppb_audio.h', 'c/ppb_audio.h',
'c/ppb_audio_config.h', 'c/ppb_audio_config.h',
'c/ppb_audio_frame.h',
'c/ppb_console.h', 'c/ppb_console.h',
'c/ppb_core.h', 'c/ppb_core.h',
'c/ppb_file_io.h', 'c/ppb_file_io.h',
...@@ -39,6 +40,8 @@ ...@@ -39,6 +40,8 @@
'c/ppb_image_data.h', 'c/ppb_image_data.h',
'c/ppb_input_event.h', 'c/ppb_input_event.h',
'c/ppb_instance.h', 'c/ppb_instance.h',
'c/ppb_media_stream_audio_track.h',
'c/ppb_media_stream_video_track.h',
'c/ppb_message_loop.h', 'c/ppb_message_loop.h',
'c/ppb_messaging.h', 'c/ppb_messaging.h',
'c/ppb_mouse_cursor.h', 'c/ppb_mouse_cursor.h',
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include "ppapi/c/ppb.h" #include "ppapi/c/ppb.h"
#include "ppapi/c/ppb_audio.h" #include "ppapi/c/ppb_audio.h"
#include "ppapi/c/ppb_audio_config.h" #include "ppapi/c/ppb_audio_config.h"
#include "ppapi/c/ppb_audio_frame.h"
#include "ppapi/c/ppb_console.h" #include "ppapi/c/ppb_console.h"
#include "ppapi/c/ppb_core.h" #include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_file_io.h" #include "ppapi/c/ppb_file_io.h"
...@@ -78,6 +79,7 @@ ...@@ -78,6 +79,7 @@
#include "ppapi/c/ppb_image_data.h" #include "ppapi/c/ppb_image_data.h"
#include "ppapi/c/ppb_input_event.h" #include "ppapi/c/ppb_input_event.h"
#include "ppapi/c/ppb_instance.h" #include "ppapi/c/ppb_instance.h"
#include "ppapi/c/ppb_media_stream_audio_track.h"
#include "ppapi/c/ppb_media_stream_video_track.h" #include "ppapi/c/ppb_media_stream_video_track.h"
#include "ppapi/c/ppb_messaging.h" #include "ppapi/c/ppb_messaging.h"
#include "ppapi/c/ppb_mouse_lock.h" #include "ppapi/c/ppb_mouse_lock.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment