GF_Err gf_odf_write_od_remove(GF_BitStream *bs, GF_ODRemove *odRem) { GF_Err e; u32 size, i; if (!odRem) return GF_BAD_PARAM; e = gf_odf_size_od_remove(odRem, &size); if (e) return e; e = gf_odf_write_base_descriptor(bs, odRem->tag, size); if (e) return e; for (i = 0; i < odRem->NbODs; i++) { gf_bs_write_int(bs, odRem->OD_ID[i], 10); } //OD commands are 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); } }