GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
|
#include "javaenv.h"
#include <gpac/modules/audio_out.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <gpac/constants.h>
#include <android/log.h>
Data Structures | |
struct | DroidContext |
Macros | |
#define | STREAM_MUSIC 3 |
#define | CHANNEL_CONFIGURATION_MONO 2 |
#define | CHANNEL_CONFIGURATION_STEREO 3 |
#define | ENCODING_PCM_8BIT 3 |
#define | ENCODING_PCM_16BIT 2 |
#define | MODE_STREAM 1 |
#define | CHANNEL_OUT_MONO 4 |
#define | CHANNEL_IN_STEREO 12 |
#define | CHANNEL_IN_MONO 16 |
#define | TAG "GPAC Android Audio" |
#define | LOGV(X, Y) __android_log_print(ANDROID_LOG_VERBOSE, TAG, X, Y) |
#define | LOGV3(X, Y, Z, K) __android_log_print(ANDROID_LOG_VERBOSE, TAG, X, Y, Z, K) |
#define | LOGD(X, Y) __android_log_print(ANDROID_LOG_DEBUG, TAG, X, Y) |
#define | LOGD2(X, Y, Z) __android_log_print(ANDROID_LOG_DEBUG, TAG, X, Y, Z) |
#define | LOGE(X, Y) __android_log_print(ANDROID_LOG_ERROR, TAG, X, Y) |
#define | LOGE3(X, Y, Z, W) __android_log_print(ANDROID_LOG_ERROR, TAG, X, Y, Z, W) |
#define | LOGW(X, Y) __android_log_print(ANDROID_LOG_WARN, TAG, X, Y) |
#define | LOGI(X, Y) __android_log_print(ANDROID_LOG_INFO, TAG, X, Y) |
Functions | |
static GF_Err | WAV_Setup (GF_AudioOutput *dr, void *os_handle, u32 num_buffers, u32 total_duration) |
static void | WAV_Shutdown (GF_AudioOutput *dr) |
static GF_Err | WAV_ConfigureOutput (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *nbBitsPerSample, u32 channel_cfg) |
static void | WAV_WriteAudio (GF_AudioOutput *dr) |
static void | WAV_Play (GF_AudioOutput *dr, u32 PlayType) |
static void | WAV_UpdateVolume (DroidContext *ctx) |
static void | WAV_SetVolume (GF_AudioOutput *dr, u32 Volume) |
static void | WAV_SetPan (GF_AudioOutput *dr, u32 Pan) |
static GF_Err | WAV_QueryOutputSampleRate (GF_AudioOutput *dr, u32 *desired_samplerate, u32 *NbChannels, u32 *nbBitsPerSample) |
static u32 | WAV_GetAudioDelay (GF_AudioOutput *dr) |
static u32 | WAV_GetTotalBufferTime (GF_AudioOutput *dr) |
void * | NewWAVRender () |
void | DeleteWAVRender (void *ifce) |
const u32 * | QueryInterfaces () |
GF_BaseInterface * | LoadInterface (u32 InterfaceType) |
void | ShutdownInterface (GF_BaseInterface *ifce) |
Variables | |
static const char | android_device [] = "Android Default" |
static jclass | cAudioTrack = 0 |
static jobject | mtrack = 0 |
static jmethodID | mAudioTrack |
static jmethodID | setStereoVolume |
static jmethodID | mGetMinBufferSize |
static jmethodID | mPlay |
static jmethodID | mStop |
static jmethodID | mRelease |
static jmethodID | mWriteB |
static jmethodID | mWriteS |
static jmethodID | mFlush |
struct DroidContext |
#define STREAM_MUSIC 3 |
#define CHANNEL_CONFIGURATION_MONO 2 |
#define CHANNEL_CONFIGURATION_STEREO 3 |
#define ENCODING_PCM_8BIT 3 |
#define ENCODING_PCM_16BIT 2 |
#define MODE_STREAM 1 |
#define CHANNEL_OUT_MONO 4 |
#define CHANNEL_IN_STEREO 12 |
#define CHANNEL_IN_MONO 16 |
#define TAG "GPAC Android Audio" |
#define LOGV | ( | X, | |
Y | |||
) | __android_log_print(ANDROID_LOG_VERBOSE, TAG, X, Y) |
#define LOGV3 | ( | X, | |
Y, | |||
Z, | |||
K | |||
) | __android_log_print(ANDROID_LOG_VERBOSE, TAG, X, Y, Z, K) |
#define LOGD | ( | X, | |
Y | |||
) | __android_log_print(ANDROID_LOG_DEBUG, TAG, X, Y) |
#define LOGD2 | ( | X, | |
Y, | |||
Z | |||
) | __android_log_print(ANDROID_LOG_DEBUG, TAG, X, Y, Z) |
#define LOGE | ( | X, | |
Y | |||
) | __android_log_print(ANDROID_LOG_ERROR, TAG, X, Y) |
#define LOGE3 | ( | X, | |
Y, | |||
Z, | |||
W | |||
) | __android_log_print(ANDROID_LOG_ERROR, TAG, X, Y, Z, W) |
#define LOGW | ( | X, | |
Y | |||
) | __android_log_print(ANDROID_LOG_WARN, TAG, X, Y) |
#define LOGI | ( | X, | |
Y | |||
) | __android_log_print(ANDROID_LOG_INFO, TAG, X, Y) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void* NewWAVRender | ( | ) |
void DeleteWAVRender | ( | void * | ifce | ) |
const u32* QueryInterfaces | ( | ) |
GF_BaseInterface* LoadInterface | ( | u32 | InterfaceType | ) |
void ShutdownInterface | ( | GF_BaseInterface * | ifce | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |