Exemple #1
0
GF_Err gf_odf_write_ipmp_remove(GF_BitStream *bs, GF_IPMPRemove *ipmpRem)
{
	GF_Err e;
	u32 size, i;
	if (!ipmpRem) return GF_BAD_PARAM;

	e = gf_odf_size_ipmp_remove(ipmpRem, &size);
	if (e) return e;
	e = gf_odf_write_base_descriptor(bs, ipmpRem->tag, size);
	if (e) return e;

	for (i = 0; i < ipmpRem->NbIPMPDs; i++) {
		gf_bs_write_int(bs, ipmpRem->IPMPDescID[i], 8);
	}
	//OD commands are aligned
	gf_bs_align(bs);
	return GF_OK;
}
Exemple #2
0
//
//		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);
	}
}