void meta_reset(GF_Box *s) { GF_MetaBox *ptr = (GF_MetaBox *)s; if (ptr == NULL) return; gf_isom_box_del((GF_Box *)ptr->handler); ptr->handler = NULL; if (ptr->primary_resource) gf_isom_box_del((GF_Box *)ptr->primary_resource); ptr->primary_resource = NULL; if (ptr->file_locations) gf_isom_box_del((GF_Box *)ptr->file_locations); ptr->file_locations = NULL; if (ptr->item_locations) gf_isom_box_del((GF_Box *)ptr->item_locations); ptr->item_locations = NULL; if (ptr->protections) gf_isom_box_del((GF_Box *)ptr->protections); ptr->protections = NULL; if (ptr->item_infos) gf_isom_box_del((GF_Box *)ptr->item_infos); ptr->item_infos = NULL; if (ptr->IPMP_control) gf_isom_box_del((GF_Box *)ptr->IPMP_control); ptr->IPMP_control = NULL; if (ptr->item_refs) gf_isom_box_del((GF_Box *)ptr->item_refs); ptr->item_refs = NULL; if (ptr->item_props) gf_isom_box_del((GF_Box *)ptr->item_props); ptr->item_props = NULL; if (ptr->other_boxes) gf_isom_box_array_del(ptr->other_boxes); ptr->other_boxes = NULL; }
void gf_isom_hint_sample_del(GF_HintSample *ptr) { GF_HintPacket *pck; if (ptr->hint_subtype==GF_ISOM_BOX_TYPE_FDP_STSD) { gf_isom_box_del((GF_Box*)ptr); return; } while (gf_list_count(ptr->packetTable)) { pck = (GF_HintPacket *)gf_list_get(ptr->packetTable, 0); gf_isom_hint_pck_del(pck); gf_list_rem(ptr->packetTable, 0); } gf_list_del(ptr->packetTable); if (ptr->AdditionalData) gf_free(ptr->AdditionalData); if (ptr->sample_cache) { while (gf_list_count(ptr->sample_cache)) { GF_HintDataCache *hdc = (GF_HintDataCache *)gf_list_get(ptr->sample_cache, 0); gf_list_rem(ptr->sample_cache, 0); if (hdc->samp) gf_isom_sample_del(&hdc->samp); gf_free(hdc); } gf_list_del(ptr->sample_cache); } if (ptr->extra_data) gf_isom_box_del((GF_Box*)ptr->extra_data); if (ptr->other_boxes) gf_isom_box_array_del(ptr->other_boxes); gf_free(ptr); }
GF_Err gf_isom_remove_track_protection(GF_ISOFile *the_file, u32 trackNumber, u32 sampleDescriptionIndex) { GF_TrackBox *trak; GF_Err e; GF_SampleEntryBox *sea; GF_ProtectionInfoBox *sinf; e = CanAccessMovie(the_file, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !sampleDescriptionIndex) return GF_BAD_PARAM; sea = NULL; sinf = gf_isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_CENC_SCHEME, &sea); if (!sinf) sinf = gf_isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_CBC_SCHEME, &sea); if (!sinf) sinf = gf_isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_ISMACRYP_SCHEME, &sea); if (!sinf) sinf = gf_isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_OMADRM_SCHEME, &sea); if (!sinf) sinf = gf_isom_get_sinf_entry(trak, sampleDescriptionIndex, GF_ISOM_ADOBE_SCHEME, &sea); if (!sinf) return GF_OK; sea->type = sinf->original_format->data_format; gf_isom_box_array_del(sea->protections); sea->protections = gf_list_new(); if (sea->type == GF_4CC('2','6','4','b')) sea->type = GF_ISOM_BOX_TYPE_AVC1; if (sea->type == GF_4CC('2','6','5','b')) sea->type = GF_ISOM_BOX_TYPE_HVC1; return GF_OK; }
void mdri_del(GF_Box *s) { GF_OMADRMMutableInformationBox*ptr = (GF_OMADRMMutableInformationBox*)s; if (ptr == NULL) return; gf_isom_box_array_del(ptr->boxes); gf_free(ptr); }
void ghnt_del(GF_Box *s) { GF_HintSampleEntryBox *ptr; ptr = (GF_HintSampleEntryBox *)s; gf_isom_box_array_del(ptr->HintDataTable); if (ptr->hint_sample) gf_isom_hint_sample_del(ptr->hint_sample); gf_free(ptr); }
void gf_isom_delete_movie(GF_ISOFile *mov) { //these are our two main files if (mov->movieFileMap) gf_isom_datamap_del(mov->movieFileMap); #ifndef GPAC_DISABLE_ISOM_WRITE if (mov->editFileMap) { gf_isom_datamap_del(mov->editFileMap); } if (mov->finalName) gf_free(mov->finalName); #endif gf_isom_box_array_del(mov->TopBoxes); gf_isom_box_array_del(mov->moof_list); if (mov->fileName) gf_free(mov->fileName); gf_free(mov); }
void ohdr_del(GF_Box *s) { GF_OMADRMCommonHeaderBox *ptr = (GF_OMADRMCommonHeaderBox*)s; if (ptr == NULL) return; gf_isom_box_array_del(ptr->ExtendedHeaders); if (ptr->ContentID) gf_free(ptr->ContentID); if (ptr->RightsIssuerURL) gf_free(ptr->RightsIssuerURL); if (ptr->TextualHeaders) gf_free(ptr->TextualHeaders); gf_free(ptr); }
void gf_isom_hint_rtp_del(GF_RTPPacket *ptr) { GF_GenericDTE *p; //the DTE while (gf_list_count(ptr->DataTable)) { p = (GF_GenericDTE *)gf_list_get(ptr->DataTable, 0); DelDTE(p); gf_list_rem(ptr->DataTable, 0); } gf_list_del(ptr->DataTable); //the TLV gf_isom_box_array_del(ptr->TLV); gf_free(ptr); }
void gf_isom_sample_entry_predestroy(GF_SampleEntryBox *ptr) { if (ptr->protections) gf_isom_box_array_del(ptr->protections); }