GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
droid_cam.c File Reference
#include <gpac/terminal.h>
#include <gpac/internal/terminal_dev.h>
#include <gpac/internal/compositor_dev.h>
#include <gpac/modules/codec.h>
#include <gpac/constants.h>
#include <gpac/modules/service.h>
#include <gpac/thread.h>
#include <gpac/media_tools.h>
#include <jni.h>
#include <android/log.h>
+ Include dependency graph for droid_cam.c:

Data Structures

struct  ISOMReader
 

Macros

#define LOG_TAG   "ANDROID_CAMERA"
 
#define QUOTEME_(x)   #x
 
#define QUOTEME(x)   QUOTEME_(x)
 
#define LOGI(...)   fprintf(stderr, "I/" LOG_TAG " (" __FILE__ ":" QUOTEME(__LINE__) "): " __VA_ARGS__)
 
#define LOGE(...)   fprintf(stderr, "E/" LOG_TAG "(" ")" __VA_ARGS__)
 
#define CAM_PIXEL_FORMAT   GF_PIXEL_NV21
 
#define CAM_PIXEL_SIZE   1.5f
 
#define CAM_WIDTH   640
 
#define CAM_HEIGHT   480
 

Functions

jint JNI_OnLoad (JavaVM *vm, void *reserved)
 
JavaVM * GetJavaVM ()
 
JNIEnv * GetEnv ()
 
void JNI_OnUnload (JavaVM *vm, void *reserved)
 
void loadCameraControler (ISOMReader *read)
 
void camStartCamera (ISOMReader *read)
 
void camStopCamera (ISOMReader *read)
 
Bool CAM_CanHandleURL (GF_InputService *plug, const char *url)
 
void unloadCameraControler (ISOMReader *read)
 
u32 unregisterFunc (void *data)
 
GF_Err CAM_ConnectService (GF_InputService *plug, GF_ClientService *serv, const char *url)
 
GF_Err CAM_CloseService (GF_InputService *plug)
 
u32 getWidth (ISOMReader *read)
 
u32 getHeight (ISOMReader *read)
 
static GF_DescriptorCAM_GetServiceDesc (GF_InputService *plug, u32 expect_type, const char *sub_url)
 
GF_Err CAM_ConnectChannel (GF_InputService *plug, LPNETCHANNEL channel, const char *url, Bool upstream)
 
GF_Err CAM_DisconnectChannel (GF_InputService *plug, LPNETCHANNEL channel)
 
int * decodeYUV420SP (char *yuv420sp, int width, int height)
 
void Java_com_gpac_Osmo4_Preview_processFrameBuf (JNIEnv *env, jobject thiz, jbyteArray arr)
 
void CallCamMethod (ISOMReader *read, jmethodID methodID)
 
void pauseCamera (ISOMReader *read)
 
void resumeCamera (ISOMReader *read)
 
GF_Err CAM_ServiceCommand (GF_InputService *plug, GF_NetworkCommand *com)
 
GF_InputServiceCAM_client_load ()
 
void CAM_client_del (GF_BaseInterface *bi)
 
const u32QueryInterfaces ()
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static JavaVM * javaVM = 0
 
static jclass camCtrlClass
 
static jmethodID cid
 
static jmethodID startCamera
 
static jmethodID stopCamera
 
static jmethodID startProcessing
 
static jmethodID stopProcessing
 
static jmethodID getImageFormat
 
static jmethodID getImageHeight
 
static jmethodID getImageWidth
 
ISOMReaderglobReader
 

Data Structure Documentation

struct ISOMReader
+ Collaboration diagram for ISOMReader:
Data Fields
GF_InputService * input
GF_ClientService * service
LPNETCHANNEL channel
u32 time_scale
u32 base_track_id
struct _tag_terminal * term
u32 cntr
u32 width
u32 height
Bool started
JNIEnv * env
u8 isAttached
jclass camCtrlClass
jmethodID cid
jobject camCtrlObj
jmethodID startCamera
jmethodID stopCamera
jmethodID startProcessing
jmethodID stopProcessing
jmethodID getImageFormat
jmethodID getImageHeight
jmethodID getImageWidth
GF_List * channels
GF_ISOFile * mov
GF_DownloadSession * dnload
u64 missing_bytes
u64 last_size
Bool no_service_desc
u32 frag_type
Bool waiting_for_data
GF_Mutex * segment_mutex
Bool use_memory
u32 seg_opened
Bool drop_next_segment
Bool in_data_flush
s32 has_pending_segments

Macro Definition Documentation

#define LOG_TAG   "ANDROID_CAMERA"
#define QUOTEME_ (   x)    #x
#define QUOTEME (   x)    QUOTEME_(x)
#define LOGI (   ...)    fprintf(stderr, "I/" LOG_TAG " (" __FILE__ ":" QUOTEME(__LINE__) "): " __VA_ARGS__)
#define LOGE (   ...)    fprintf(stderr, "E/" LOG_TAG "(" ")" __VA_ARGS__)
#define CAM_PIXEL_FORMAT   GF_PIXEL_NV21
#define CAM_PIXEL_SIZE   1.5f
#define CAM_WIDTH   640
#define CAM_HEIGHT   480

Function Documentation

jint JNI_OnLoad ( JavaVM *  vm,
void *  reserved 
)
JavaVM* GetJavaVM ( )
JNIEnv* GetEnv ( )

+ Here is the call graph for this function:

void JNI_OnUnload ( JavaVM *  vm,
void *  reserved 
)
void loadCameraControler ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void camStartCamera ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void camStopCamera ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool CAM_CanHandleURL ( GF_InputService plug,
const char *  url 
)

+ Here is the caller graph for this function:

void unloadCameraControler ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 unregisterFunc ( void *  data)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err CAM_ConnectService ( GF_InputService plug,
GF_ClientService *  serv,
const char *  url 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err CAM_CloseService ( GF_InputService plug)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 getWidth ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 getHeight ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Descriptor* CAM_GetServiceDesc ( GF_InputService plug,
u32  expect_type,
const char *  sub_url 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err CAM_ConnectChannel ( GF_InputService plug,
LPNETCHANNEL  channel,
const char *  url,
Bool  upstream 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err CAM_DisconnectChannel ( GF_InputService plug,
LPNETCHANNEL  channel 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int* decodeYUV420SP ( char *  yuv420sp,
int  width,
int  height 
)

+ Here is the call graph for this function:

void Java_com_gpac_Osmo4_Preview_processFrameBuf ( JNIEnv *  env,
jobject  thiz,
jbyteArray  arr 
)

+ Here is the call graph for this function:

void CallCamMethod ( ISOMReader read,
jmethodID  methodID 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void pauseCamera ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void resumeCamera ( ISOMReader read)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err CAM_ServiceCommand ( GF_InputService plug,
GF_NetworkCommand com 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_InputService* CAM_client_load ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CAM_client_del ( GF_BaseInterface bi)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u32* QueryInterfaces ( )
GF_BaseInterface* LoadInterface ( u32  InterfaceType)

+ Here is the call graph for this function:

void ShutdownInterface ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

Variable Documentation

JavaVM* javaVM = 0
static
jclass camCtrlClass
static
jmethodID cid
static
jmethodID startCamera
static
jmethodID stopCamera
static
jmethodID startProcessing
static
jmethodID stopProcessing
static
jmethodID getImageFormat
static
jmethodID getImageHeight
static
jmethodID getImageWidth
static
ISOMReader* globReader