external essence files

Help
2005-09-07
2013-04-25
  • Florian Schleich

    Hi,

    is external essence supported by mxflib or is this planed for the future?

    Thanks,
    Florian

     
    • Matt Beard

      Matt Beard - 2005-09-07

      Yes, and no!

      Yes: Once you find that the BodySID in the EssenceDataSet for the essence is zero you simply locate the Locator in the file package and open the file.

      No: There are no special essence parsing functions for external essence - but then there shouldn't need to be any as far as I can tell.

       
    • Florian Schleich

      Thanks for this really fast answer. :-)

      What about writing mxf files referencing external essence? Is it possible not to dump the "incoming" files into the mxf file and instead use a network locator url?

       
      • Matt Beard

        Matt Beard - 2005-09-07

        Writing external essence... Good point

        Whan the writing program calls "AddFilePackage" the BodySID parameter should be 0 for any external essence, and the UMID should be the UMID for the external essence.

        This will cause to EssenceContainerData set to be added (you will have to manually add it if you want to have an internal index table, but that gets complicated!)

        Then you will need to manually add a NetworkLocator set linked from the file package's descriptor.

        Then just don't add it to the BodyWriter that writes the rest of the file. In fact if you don't have any internal essence you can just tag on a footer partition with no copy of the metadata and its all done.

         
    • Florian Schleich

      Thanks for your reply.

      I have a problem adding the NetworkLocator set to the descriptor. I added the following to mxfwrap:

      string URLString = "test.m2v";

      MDObjectPtr Netloc = new MDObject("NetworkLocator");
      Netloc->SetString("URLString" ,URLString);

      (*WrapCfgList_it)->EssenceDescriptor->AddChild("Locators")->AddChild(Netloc);

      And I get the following error:

      ERROR: internal error for object NetworkLocator - Cannot process nesting > 2 in AddMetadata()

      Can you give me some more advice, perhaps my attempt is completely wrong?

       
      • Matt Beard

        Matt Beard - 2005-09-28

        AddChild adds a property to an MDObject.

        The NetworkLocator is not a property of the EssenceDescriptor, but is strong referenced from it.

        The code you need is:

        string URLString = "test.m2v";

        MDObjectPtr Netloc = new MDObject("NetworkLocator");
        Netloc->SetString("URLString" ,URLString);

        MDObjectPtr Locator = (*WrapCfgList_it)->EssenceDescriptor->AddChild("Locators");
        if(Locator) Locator = Locator->AddChild("Locator");
        if(Locator) Locator->MakeLink(Netloc);
        else error("Failed to add NetworkLocator\n");

        This code adds a "Locators" array, then adds a "Locator" entry in that array, finally it links that new entry to your NetworkLocator object.

        I also added some sanity checking as a non-standard dictionary would otherwise cause problems. Strictly speaking you should also sanity check the building of the network locator.

         
    • Florian Schleich

      Thank you very much, Network Locators work fine.

      I dont need any BodyStream if I dont have internal essence, right? Because when I create a file without internal essence I get a file with no header partition, just a footer partition.
      Does WriteFooter change the type of the last "empty" partition, or do you have any idea what could be the reason for this?

       
      • Matt Beard

        Matt Beard - 2005-10-05

        You should have a header and a footer - I don't know why it isn't writing both. Or maybe it is writing both, but it overwrites the header with the footer - however the current code doesn't contain any seeks that appear to be capable of doing that.

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks