summaryrefslogtreecommitdiff
path: root/src/asdcp-wrap.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2014-01-02 23:29:22 +0000
committerjhurst <>2014-01-02 23:29:22 +0000
commit7ff636405a6bff37432e1c70123f0e6936186166 (patch)
tree87d858c6afd73fd21ca6cab5607cffcd1f7d01c3 /src/asdcp-wrap.cpp
parent7f373b689817ee70fbe5d6a14cb0512b5260f77c (diff)
o Fixed missing-index-partion bugs for AS-02 files.
o Improved integration of ST 377-4 MCA concepts with ST 429-2 static labels. o Added new EssenceType_t values for IMF/AS-02 track files. o Added detection for AS-02 track files to ASDCP::EssenceType() o Changed lots of "const char*" to "const std::string&" in the APIs defined by KM_fileio.h and AS_DCP.h. o Fixed VBR Delta Segment entries to correctly flag progressive material. o Fixed PCM unwrapping bugs in as-02-unwrap.
Diffstat (limited to 'src/asdcp-wrap.cpp')
-rwxr-xr-xsrc/asdcp-wrap.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/asdcp-wrap.cpp b/src/asdcp-wrap.cpp
index 3bad03e..fd4a6d9 100755
--- a/src/asdcp-wrap.cpp
+++ b/src/asdcp-wrap.cpp
@@ -187,6 +187,9 @@ decode_channel_fmt(const std::string& label_name)
else if ( label_name == "7.1DS" )
return PCM::CF_CFG_5;
+ else if ( label_name == "MCA" )
+ return PCM::CF_CFG_6;
+
fprintf(stderr, "Error decoding channel format string: %s\n", label_name.c_str());
fprintf(stderr, "Expecting '5.1', '6.1', '7.1', '7.1DS' or 'WTF'\n");
return PCM::CF_NONE;
@@ -475,7 +478,7 @@ write_MPEG2_file(CommandOptions& Options)
Kumu::FortunaRNG RNG;
// set up essence parser
- Result_t result = Parser.OpenRead(Options.filenames.front().c_str());
+ Result_t result = Parser.OpenRead(Options.filenames.front());
// set up MXF writer
if ( ASDCP_SUCCESS(result) )
@@ -531,7 +534,7 @@ write_MPEG2_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, VDesc);
+ result = Writer.OpenWrite(Options.out_file, Info, VDesc);
}
if ( ASDCP_SUCCESS(result) )
@@ -631,12 +634,12 @@ write_JP2K_S_file(CommandOptions& Options)
}
// set up essence parser
- Result_t result = ParserLeft.OpenRead(Options.filenames.front().c_str(), Options.j2c_pedantic);
+ Result_t result = ParserLeft.OpenRead(Options.filenames.front(), Options.j2c_pedantic);
if ( ASDCP_SUCCESS(result) )
{
Options.filenames.pop_front();
- result = ParserRight.OpenRead(Options.filenames.front().c_str(), Options.j2c_pedantic);
+ result = ParserRight.OpenRead(Options.filenames.front(), Options.j2c_pedantic);
}
// set up MXF writer
@@ -696,7 +699,7 @@ write_JP2K_S_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, PDesc);
+ result = Writer.OpenWrite(Options.out_file, Info, PDesc);
if ( ASDCP_SUCCESS(result) && Options.picture_coding.HasValue() )
{
@@ -771,7 +774,7 @@ write_JP2K_file(CommandOptions& Options)
Kumu::FortunaRNG RNG;
// set up essence parser
- Result_t result = Parser.OpenRead(Options.filenames.front().c_str(), Options.j2c_pedantic);
+ Result_t result = Parser.OpenRead(Options.filenames.front(), Options.j2c_pedantic);
// set up MXF writer
if ( ASDCP_SUCCESS(result) )
@@ -831,7 +834,7 @@ write_JP2K_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, PDesc);
+ result = Writer.OpenWrite(Options.out_file, Info, PDesc);
if ( ASDCP_SUCCESS(result) && Options.picture_coding.HasValue() )
{
@@ -915,9 +918,9 @@ write_PCM_file(CommandOptions& Options)
FrameBuffer.Capacity(PCM::CalcFrameBufferSize(ADesc));
ADesc.ChannelFormat = Options.channel_fmt;
- if ( Options.use_smpte_labels && ADesc.ChannelFormat == PCM::CF_NONE)
+ if ( Options.use_smpte_labels && ADesc.ChannelFormat == PCM::CF_NONE && Options.mca_config.empty() )
{
- fprintf(stderr, "ATTENTION! Writing SMPTE audio without ChannelAssignment property (see option -l)\n");
+ fprintf(stderr, "ATTENTION! Writing SMPTE audio without ChannelAssignment property (see options -C, -l and -m)\n");
}
if ( Options.verbose_flag )
@@ -971,7 +974,7 @@ write_PCM_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, ADesc);
+ result = Writer.OpenWrite(Options.out_file, Info, ADesc);
if ( ASDCP_SUCCESS(result)
&& ( Options.channel_assignment.HasValue()
@@ -1139,7 +1142,7 @@ write_PCM_with_ATMOS_sync_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, ADesc);
+ result = Writer.OpenWrite(Options.out_file, Info, ADesc);
}
if ( ASDCP_SUCCESS(result) )
@@ -1209,7 +1212,7 @@ write_timed_text_file(CommandOptions& Options)
Kumu::FortunaRNG RNG;
// set up essence parser
- Result_t result = Parser.OpenRead(Options.filenames.front().c_str());
+ Result_t result = Parser.OpenRead(Options.filenames.front());
// set up MXF writer
if ( ASDCP_SUCCESS(result) )
@@ -1262,7 +1265,7 @@ write_timed_text_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, TDesc);
+ result = Writer.OpenWrite(Options.out_file, Info, TDesc);
}
if ( ASDCP_FAILURE(result) )
@@ -1324,7 +1327,7 @@ write_dolby_atmos_file(CommandOptions& Options)
Kumu::FortunaRNG RNG;
// set up essence parser
- Result_t result = Parser.OpenRead(Options.filenames.front().c_str());
+ Result_t result = Parser.OpenRead(Options.filenames.front());
// set up MXF writer
if ( ASDCP_SUCCESS(result) )
@@ -1382,7 +1385,7 @@ write_dolby_atmos_file(CommandOptions& Options)
}
if ( ASDCP_SUCCESS(result) )
- result = Writer.OpenWrite(Options.out_file.c_str(), Info, ADesc);
+ result = Writer.OpenWrite(Options.out_file, Info, ADesc);
}
if ( ASDCP_SUCCESS(result) )
@@ -1460,7 +1463,7 @@ main(int argc, const char** argv)
}
EssenceType_t EssenceType;
- result = ASDCP::RawEssenceType(Options.filenames.front().c_str(), EssenceType);
+ result = ASDCP::RawEssenceType(Options.filenames.front(), EssenceType);
if ( ASDCP_SUCCESS(result) )
{