From: Philip de N. <ph...@us...> - 2011-04-19 09:46:31
|
Update of /cvsroot/ingex/ingex/libMXF/lib/products In directory vz-cvs-4.sog:/tmp/cvs-serv24073/lib/products Modified Files: mxf_avid.c Log Message: add functions to create int32 avid mob attributes Index: mxf_avid.c =================================================================== RCS file: /cvsroot/ingex/ingex/libMXF/lib/products/mxf_avid.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mxf_avid.c 25 Jan 2011 17:39:50 -0000 1.14 --- mxf_avid.c 19 Apr 2011 09:46:28 -0000 1.15 *************** *** 767,770 **** --- 767,787 ---- } + int mxf_avid_set_indirect_int32_item(MXFMetadataSet *set, const mxfKey *itemKey, int32_t value) + { + /* prefix is 0x42 ('B') for big endian, followed by half-swapped key for Int32 type */ + uint8_t itemValue[21] = + { + 0x42, + 0x01, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00 + }; + + mxf_set_int32(value, &itemValue[17]); + + CHK_ORET(mxf_set_item(set, itemKey, itemValue, sizeof(itemValue))); + + return 1; + } + int mxf_avid_set_rgb_color_item(MXFMetadataSet* set, const mxfKey* itemKey, const RGBColor* value) *************** *** 856,859 **** --- 873,890 ---- } + int mxf_avid_attach_int32_mob_attribute(MXFHeaderMetadata *headerMetadata, MXFMetadataSet *packageSet, + const mxfUTF16Char *name, int32_t value) + { + MXFMetadataSet *taggedValueSet; + CHK_ORET(name != NULL); + + CHK_ORET(mxf_create_set(headerMetadata, &MXF_SET_K(TaggedValue), &taggedValueSet)); + CHK_ORET(mxf_add_array_item_strongref(packageSet, &MXF_ITEM_K(GenericPackage, MobAttributeList), taggedValueSet)); + CHK_ORET(mxf_set_utf16string_item(taggedValueSet, &MXF_ITEM_K(TaggedValue, Name), name)); + CHK_ORET(mxf_avid_set_indirect_int32_item(taggedValueSet, &MXF_ITEM_K(TaggedValue, Value), value)); + + return 1; + } + int mxf_avid_attach_user_comment(MXFHeaderMetadata* headerMetadata, MXFMetadataSet* packageSet, mxfUTF16Char* name, mxfUTF16Char* value) |