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
mp3_in.c File Reference
#include <gpac/modules/service.h>
#include <gpac/avparse.h>
#include <gpac/constants.h>
#include <gpac/modules/codec.h>
+ Include dependency graph for mp3_in.c:

Data Structures

struct  MP3Reader
 

Functions

static u32 MP3_RegisterMimeTypes (const GF_InputService *plug)
 
static Bool MP3_CanHandleURL (GF_InputService *plug, const char *url)
 
static Bool mp3_is_local (const char *url)
 
static GF_ESDMP3_GetESD (MP3Reader *read)
 
static void mp3_setup_object (MP3Reader *read)
 
static Bool MP3_ConfigureFromFile (MP3Reader *read, u32 *minSizeToRead)
 
static void MP3_RegulateDataRate (MP3Reader *read)
 
static void MP3_OnLiveData (MP3Reader *read, char *data, u32 data_size)
 
void MP3_NetIO (void *cbk, GF_NETIO_Parameter *param)
 
void mp3_download_file (GF_InputService *plug, char *url)
 
static GF_Err MP3_ConnectService (GF_InputService *plug, GF_ClientService *serv, const char *url)
 
static GF_Err MP3_CloseService (GF_InputService *plug)
 
static GF_DescriptorMP3_GetServiceDesc (GF_InputService *plug, u32 expect_type, const char *sub_url)
 
static GF_Err MP3_ConnectChannel (GF_InputService *plug, LPNETCHANNEL channel, const char *url, Bool upstream)
 
static GF_Err MP3_DisconnectChannel (GF_InputService *plug, LPNETCHANNEL channel)
 
static GF_Err MP3_ServiceCommand (GF_InputService *plug, GF_NetworkCommand *com)
 
static GF_Err MP3_ChannelGetSLP (GF_InputService *plug, LPNETCHANNEL channel, char **out_data_ptr, u32 *out_data_size, GF_SLHeader *out_sl_hdr, Bool *sl_compressed, GF_Err *out_reception_status, Bool *is_new_data)
 
static GF_Err MP3_ChannelReleaseSLP (GF_InputService *plug, LPNETCHANNEL channel)
 
GF_InputServiceMP3_Load ()
 
void MP3_Delete (void *ifce)
 
const u32QueryInterfaces ()
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const char * MP3_MIME_TYPES [] = { "audio/mpeg", "audio/x-mpeg", "audio/mp3", 0 }
 
static const char * MP3_EXTENSIONS = "mp2 mp3 mpga mpega"
 
static const char * MP3_DESC = "MP3 Music"
 

Data Structure Documentation

struct MP3Reader
+ Collaboration diagram for MP3Reader:
Data Fields
GF_ClientService * service
u32 needs_connection
Bool is_remote
FILE * stream
u32 duration
u32 pad_bytes
Bool done
LPNETCHANNEL ch
char * data
u32 data_size
GF_SLHeader sl_hdr
Bool is_inline
u32 sample_rate
u32 oti
Double start_range
Double end_range
u32 current_time
u32 nb_samp
GF_DownloadSession * dnload
Bool is_live
char * liveDataCopy
u32 liveDataCopySize
char prev_data[1000]
u32 prev_size
char * icy_name
char * icy_genre
char * icy_track_name

Function Documentation

static u32 MP3_RegisterMimeTypes ( const GF_InputService plug)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool MP3_CanHandleURL ( GF_InputService plug,
const char *  url 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool mp3_is_local ( const char *  url)
static

+ Here is the caller graph for this function:

static GF_ESD* MP3_GetESD ( MP3Reader read)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mp3_setup_object ( MP3Reader read)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool MP3_ConfigureFromFile ( MP3Reader read,
u32 minSizeToRead 
)
static

Returns TRUE if file is ready to be read, FALSE otherwise

Parameters
readReader
minSizeToReadHow much bytes do we need to start reading at minimum

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MP3_RegulateDataRate ( MP3Reader read)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MP3_OnLiveData ( MP3Reader read,
char *  data,
u32  data_size 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MP3_NetIO ( void *  cbk,
GF_NETIO_Parameter param 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mp3_download_file ( GF_InputService plug,
char *  url 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err MP3_CloseService ( GF_InputService plug)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Descriptor* MP3_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:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err MP3_DisconnectChannel ( GF_InputService plug,
LPNETCHANNEL  channel 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err MP3_ServiceCommand ( GF_InputService plug,
GF_NetworkCommand com 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err MP3_ChannelGetSLP ( GF_InputService plug,
LPNETCHANNEL  channel,
char **  out_data_ptr,
u32 out_data_size,
GF_SLHeader out_sl_hdr,
Bool sl_compressed,
GF_Err out_reception_status,
Bool is_new_data 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err MP3_ChannelReleaseSLP ( GF_InputService plug,
LPNETCHANNEL  channel 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_InputService* MP3_Load ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MP3_Delete ( void *  ifce)

+ 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

const char* MP3_MIME_TYPES[] = { "audio/mpeg", "audio/x-mpeg", "audio/mp3", 0 }
static
const char* MP3_EXTENSIONS = "mp2 mp3 mpga mpega"
static
const char* MP3_DESC = "MP3 Music"
static