freeMXF.org

Open discussion about freeMXF.org tools and MXF in general
It is currently Sun Dec 22, 2024 6:08 pm
Board index » MXF Categories » freeMXF.org Tools



Post new topic Reply to topic  [ 3 posts ] 
Author
Search for:
Message

Offline
Regular

Joined: Tue Aug 14, 2007 2:57 pm
Posts: 23
Location: Firenze

Post Posted: Fri Jan 11, 2008 11:49 am 
Top  
Why there isn't an UL for reading the package name property?
The only way that i found is this, but this isn't the same thing :

std::string packName=package->Name();

where package is the smart pointer to the package metadata.
This function return only the name of the MDObjectPtr, in this case sourcePackage or MaterialPackage.
SO this isn't the same thing because the property can have different value like:
"File Package: SMPTE 382M clip wrapping of wave audio"
why there isn't an UL that permit me to read the Package name value in this why:
std::string packName=package->GetString(mxflib::PackageName_UL);
how i can do this?
thx

 Profile  

Offline
Insider

Joined: Thu Apr 15, 2004 10:39 am
Posts: 198
Location: Scotland

Post Posted: Sun Jan 13, 2008 10:54 am 
Top  
The UL you are looking for is GenericPackage_Name_UL - this is because the name specified in 377M is "Name" and this is not unique, so it gets the name of the set prepended (added to the beginning).

If you ever can't figure out the name of a UL for a property or set, look in 377M or dict.xml for the UL and then search for that value in ulmap.h (you will need to convert it to "0xnn, " format)

For example dict.xml shows the Name property of GenericPackage to be:
Code:
06 0e 2b 34 01 01 01 01  01 03 03 02 01 00 00 00


If you search in ulmap.h for:
Code:
0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00


You will find:
Code:
const UInt8 GenericPackage_Name_UL_Data[16] = { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00 };
const UL GenericPackage_Name_UL(GenericPackage_Name_UL_Data);


In fact only the Item Designator part is required in the search (the last 8 bytes, excluding any zero bytes). This is what is listed in 377M:
Code:
| Name | UTF-16 string | var | 44.02 | 01.03.03.02.01 | Opt | Human readable package name |


So, you only need to search for:
Code:
0x01, 0x03, 0x03, 0x02, 0x01


This is somewhat less than ideal, and a future release should include a handy list of ULs to use for each set, pack or property.

 Profile WWW  

Offline
Regular

Joined: Tue Aug 14, 2007 2:57 pm
Posts: 23
Location: Firenze

Post Posted: Sun Jan 13, 2008 12:24 pm 
Top  
Thx for the reply!!! your answear is very clear and complete. thx

 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Jump to:  


Who is online

Users browsing this forum: No registered users and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group :: Style based on FI Subice by phpBBservice.nl :: All times are UTC