Open discussion about tools and MXF in general
It is currently Sun Apr 05, 2020 3:18 am
Board index » MXF Categories » Tools

Post new topic Reply to topic  [ 2 posts ] 
Search for:


Joined: Tue Aug 01, 2006 11:22 pm
Posts: 4

Post Posted: Mon Aug 07, 2006 5:06 pm 

I have been trying to get the Codec UL from the descriptor.

This is what I have been doing unsuccessfully:

if(Track && (Descriptor->IsA(FileDescriptor_UL)))
MDObjectPtr Codec_ul=Descriptor->Child("Codec");
ULPtr codec_ul_ptr=Codec_ul->GetUL();
//const UInt8 *this_ptr=Codec_ul->GetUL()->GetValue();

The MDObjectPtr never gets initialized. Help Please.



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

Post Posted: Thu Aug 10, 2006 11:12 am 
I don't see why the MDObjectPtr Codec_ul is not getting initialized (but I would change its name as there is already a Codec_UL which is the UL of this property). Are you sure that this file descriptor has a codec property?

GetUL() will return the property UL (the same as the value of the global constant Codec_UL mentioned above) not the value of property as a UL.

I would use the following:
if(Track && (Descriptor->IsA(FileDescriptor_UL)))
    ULPtr CodecLabel;
    MDObjectPtr Codec = Descriptor->Child(Codec_UL);

        DataChunkPtr Data = Codec->PutData();
        if(Data->Size == 16) CodecLabel = new UL(Data->Data);

What happens here is that once the codec property is located its value is written into a buffer. This should be 16 bytes (but I always check as you never know what rubbish there may be in the file!). This can then be used to build a new UL.

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

Jump to:  

Who is online

Users browsing this forum: No registered users and 1 guest

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
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group :: Style based on FI Subice by :: All times are UTC