GF_Err gf_odf_write_esd_remove(GF_BitStream *bs, GF_ESDRemove *esdRem) { GF_Err e; u32 size, i; if (!esdRem) return GF_BAD_PARAM; e = gf_odf_size_esd_remove(esdRem, &size); if (e) return e; e = gf_odf_write_base_descriptor(bs, esdRem->tag, size); if (e) return e; gf_bs_write_int(bs, esdRem->ODID, 10); gf_bs_write_int(bs, 0, 6); //aligned for (i = 0; i < esdRem->NbESDs; i++) { gf_bs_write_int(bs, esdRem->ES_ID[i], 16); } //OD commands are aligned (but we are already aligned.... gf_bs_align(bs); return GF_OK; }
// // SIZE FUNCTION // GF_Err gf_odf_size_command(GF_ODCom *com, u32 *outSize) { switch (com->tag) { case GF_ODF_OD_UPDATE_TAG: return gf_odf_size_od_update((GF_ODUpdate *)com, outSize); case GF_ODF_OD_REMOVE_TAG: return gf_odf_size_od_remove((GF_ODRemove *)com, outSize); case GF_ODF_ESD_UPDATE_TAG: return gf_odf_size_esd_update((GF_ESDUpdate *)com, outSize); case GF_ODF_ESD_REMOVE_TAG: case GF_ODF_ESD_REMOVE_REF_TAG: return gf_odf_size_esd_remove((GF_ESDRemove *)com, outSize); case GF_ODF_IPMP_UPDATE_TAG: return gf_odf_size_ipmp_update((GF_IPMPUpdate *)com, outSize); case GF_ODF_IPMP_REMOVE_TAG: return gf_odf_size_ipmp_remove((GF_IPMPRemove *)com, outSize); default: return gf_odf_size_base_command((GF_BaseODCom *)com, outSize); } }