static void mp3_setup_object(MP3Reader *read) { if (read->is_inline) { GF_ESD *esd; GF_ObjectDescriptor *od = (GF_ObjectDescriptor *) gf_odf_desc_new(GF_ODF_OD_TAG); od->objectDescriptorID = 1; esd = MP3_GetESD(read); gf_list_add(od->ESDescriptors, esd); gf_term_add_media(read->service, (GF_Descriptor*)od, 0); } }
static GF_Descriptor *MP3_GetServiceDesc(GF_InputService *plug, u32 expect_type, const char *sub_url) { MP3Reader *read = plug->priv; /*since we don't handle multitrack in mp3, we don't need to check sub_url, only use expected type*/ /*audio object*/ if (expect_type==GF_MEDIA_OBJECT_AUDIO) { GF_ObjectDescriptor *od = (GF_ObjectDescriptor *) gf_odf_desc_new(GF_ODF_OD_TAG); GF_ESD *esd = MP3_GetESD(read); od->objectDescriptorID = 1; gf_list_add(od->ESDescriptors, esd); return (GF_Descriptor *) od; } read->is_inline = 1; return NULL; }
static GF_Descriptor *MP3_GetServiceDesc(GF_InputService *plug, u32 expect_type, const char *sub_url) { MP3Reader *read = plug->priv; /*override default*/ if (expect_type==GF_MEDIA_OBJECT_UNDEF) expect_type=GF_MEDIA_OBJECT_AUDIO; /*audio object*/ if (expect_type==GF_MEDIA_OBJECT_AUDIO) { GF_ObjectDescriptor *od = (GF_ObjectDescriptor *) gf_odf_desc_new(GF_ODF_OD_TAG); GF_ESD *esd = MP3_GetESD(read); od->objectDescriptorID = 1; gf_list_add(od->ESDescriptors, esd); return (GF_Descriptor *) od; } read->is_inline = 1; return NULL; }