Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AS_02_IAB OpenWrite conformsToSpec param needs documentation and usage example #58

Open
kblinova opened this issue Aug 18, 2020 · 2 comments

Comments

@kblinova
Copy link

In SMPTE ST 2067-201:2019, conformsToSpec Element is defined as required with a value set to

IMF_IABTrackFileLevel0 = urn:smpte:ul:060E2B34.0401010D.01010201.02000000

At the minimum, the function declaration comments must include the definition of this value to ensure the caller does not omit it and creates an invalid IMF IAB track file.

It would also be nice to be able to see a usage of this method in one of the test programs (i.e. as-02-wrap).

As another possibility, this parameter could be removed (no other format exposes this) and its value could be set inside the OpenWrite function to avoid creating an invalid file.

--
/**
* Creates and prepares an IAB Track File for writing.
*
* Must be called following instantiation or after Finalize() call
*
* @param filename Path to the file. The file must no exist.
* @param Info MXF file metadata to be written.
* @param sub IAB Soundfield Subdescritor items to be written. MCATagName, MCATagSymbol, MCALabelDictionaryID, MCALinkID are ignored.
* @param conformsToSpecs Value of the ConformsToSpecifications preface item
* @param edit_rate Frame rate of the IA Bitstream
* @param sampling_rate Sampling rate of the audio essence within the IA Bitstream
*
* @return RESULT_OK indicates that frames are ready to be written,
* otherwise the reader is reset and the file is left is an undermined state.
*/
Result_t OpenWrite(
const std::string& filename,
const ASDCP::WriterInfo& Info,
const ASDCP::MXF::IABSoundfieldLabelSubDescriptor& sub,
const std::vectorASDCP::UL& conformsToSpecs,
const ASDCP::Rational& edit_rate,
const ASDCP::Rational& sampling_rate = ASDCP::SampleRate_48k
);

@palemieux
Copy link
Contributor

At the minimum, the function declaration comments must include the definition of this value to ensure the caller does not omit it and creates an invalid IMF IAB track file.

+1

It would also be nice to be able to see a usage of this method in one of the test programs (i.e. as-02-wrap).

I am not excited with modifying as-02-wrap, which is already pretty complex.

What about moving the reader and writer CLI at https://github.com/sandflow/iab-in-imf/tree/master/src/main/cpp to ASDCPLib, and using the opportunity to add simple unit tests?

As another possibility, this parameter could be removed (no other format exposes this) and its value could be set inside the OpenWrite function to avoid creating an invalid file.

It would be nice if the IAB core reader/writer could be used with future IMF specifications, which may not require IMF_IABTrackFileLevel0.

Perhaps a specialized Level0 writer class could be created.

@jhursty
Copy link
Contributor

jhursty commented Aug 24, 2020

I think separate executables is a great idea and would prefer that approach. I have been considering a re-design of the cli similar to git and other multi-function packages where we would have, e.g., 'as02-wrap-iab' and 'as02-unwrap-iab' as the lowest level executables, which may later be incorporated into a larger framework that allows, e.g., 'as02 wrap iab '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants