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

Adds cli parameters to provide values for MCA Title and MCA Title Version #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion src/as-02-wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ Options:\n\
- UL value for MCA descriptor MCAAudioContentKind property\n\
--mca-audio-element-kind <string>\n\
- UL value for MCA descriptor MCAAudioElementKind property\n\
--mca-title <string>\n\
- String value for MCA descriptor MCATitle property\n\
--mca-title-version <string>\n\
- String value for MCA descriptor MCATitleVersion property\n\
\n\
\n\
Options specific to ACES ST2067-50:\n\
Expand Down Expand Up @@ -320,7 +324,7 @@ class CommandOptions
MXF::LineMapPair line_map;
bool line_map_flag;
std::string out_file, profile_name; //
std::string mca_audio_element_kind, mca_audio_content_kind;
std::string mca_audio_element_kind, mca_audio_content_kind, mca_title, mca_title_version;

//ST 2067-50 options
bool aces_authoring_information_flag, aces_picture_subdescriptor_flag, target_frame_subdescriptor_flag, target_frame_index_flag;
Expand Down Expand Up @@ -912,6 +916,26 @@ class CommandOptions

mca_audio_element_kind = argv[i];
}
else if ( strcmp(argv[i]+2, "mca-title") == 0 )
{
if ( ++i >= argc || argv[(i)][0] == '-' )
{
fprintf(stderr, "Argument not found for option -mca-title.\n");
return;
}

mca_title = argv[i];
}
else if ( strcmp(argv[i]+2, "mca-title-version") == 0 )
{
if ( ++i >= argc || argv[(i)][0] == '-' )
{
fprintf(stderr, "Argument not found for option -mca-title-version.\n");
return;
}

mca_title_version = argv[i];
}
else
{
fprintf(stderr, "Unrecognized argument: %s\n", argv[i]);
Expand Down Expand Up @@ -1558,6 +1582,14 @@ write_PCM_file(CommandOptions& Options)
{
desc->MCAAudioElementKind = Options.mca_audio_element_kind;
}
if ( ! Options.mca_title.empty() )
{
desc->MCATitle = Options.mca_title;
}
if ( ! Options.mca_title_version.empty() )
{
desc->MCATitleVersion = Options.mca_title_version;
}
}
}

Expand Down