Esempio n. 1
0
GF_Err gf_odf_write_base_command(GF_BitStream *bs, GF_BaseODCom *bcRem)
{
	u32 size;
	GF_Err e;
	if (!bcRem) return GF_BAD_PARAM;

	e = gf_odf_size_base_command(bcRem, &size);
	if (e) return e;
	e = gf_odf_write_base_descriptor(bs, bcRem->tag, size);
	if (e) return e;
	gf_bs_write_data(bs, bcRem->data, bcRem->dataSize);
	return GF_OK;
}
Esempio n. 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);
	}
}