diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-05 15:32:10 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-05 15:32:10 +0000 |
| commit | 3ec4338ce90ea0549409312f24f8b28c07a5d2da (patch) | |
| tree | 09aaaff66dd860abbeacc20793145e1a27f4defd /asdcplib/src/asdcp-test.cpp | |
| parent | 342aad2ddf893aaaafa9a2c9980579d2dc4ec125 (diff) | |
asdcplib 2.5.11
Diffstat (limited to 'asdcplib/src/asdcp-test.cpp')
| -rwxr-xr-x | asdcplib/src/asdcp-test.cpp | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/asdcplib/src/asdcp-test.cpp b/asdcplib/src/asdcp-test.cpp index 05f486f5..a7ee1901 100755 --- a/asdcplib/src/asdcp-test.cpp +++ b/asdcplib/src/asdcp-test.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2012, John Hurst +Copyright (c) 2003-2014, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! \file asdcp-test.cpp - \version $Id: asdcp-test.cpp,v 1.46 2012/02/03 19:49:56 jhurst Exp $ + \version $Id: asdcp-test.cpp,v 1.53 2015/10/07 16:41:23 jhurst Exp $ \brief AS-DCP file manipulation utility This program provides command line access to the major features of the asdcplib @@ -103,7 +103,7 @@ banner(FILE* stream = stdout) { fprintf(stream, "\n\ %s (asdcplib %s)\n\n\ -Copyright (c) 2003-2012 John Hurst\n\n\ +Copyright (c) 2003-2015 John Hurst\n\n\ asdcplib may be copied only under the terms of the license found at\n\ the top of every file in the asdcplib distribution kit.\n\n\ Specify the -h (help) option for further information about %s\n\n", @@ -292,6 +292,10 @@ public: // Rational PictureRate() { + if ( picture_rate == 16 ) return EditRate_16; + if ( picture_rate == 18 ) return EditRate_18; + if ( picture_rate == 20 ) return EditRate_20; + if ( picture_rate == 22 ) return EditRate_22; if ( picture_rate == 23 ) return EditRate_23_98; if ( picture_rate == 24 ) return EditRate_24; if ( picture_rate == 25 ) return EditRate_25; @@ -308,6 +312,10 @@ public: // const char* szPictureRate() { + if ( picture_rate == 16 ) return "16"; + if ( picture_rate == 18 ) return "18.182"; + if ( picture_rate == 20 ) return "20"; + if ( picture_rate == 22 ) return "21.818"; if ( picture_rate == 23 ) return "23.976"; if ( picture_rate == 24 ) return "24"; if ( picture_rate == 25 ) return "25"; @@ -371,7 +379,7 @@ public: case 'b': TEST_EXTRA_ARG(i, 'b'); - fb_size = abs(atoi(argv[i])); + fb_size = Kumu::xabs(strtol(argv[i], 0, 10)); if ( verbose_flag ) fprintf(stderr, "Frame Buffer size: %u bytes.\n", fb_size); @@ -387,7 +395,7 @@ public: case 'd': TEST_EXTRA_ARG(i, 'd'); duration_flag = true; - duration = abs(atoi(argv[i])); + duration = Kumu::xabs(strtol(argv[i], 0, 10)); break; case 'E': encrypt_header_flag = false; break; @@ -395,7 +403,7 @@ public: case 'f': TEST_EXTRA_ARG(i, 'f'); - start_frame = abs(atoi(argv[i])); + start_frame = Kumu::xabs(strtol(argv[i], 0, 10)); break; case 'G': mode = MMT_GOP_START; break; @@ -444,7 +452,7 @@ public: case 'p': TEST_EXTRA_ARG(i, 'p'); - picture_rate = abs(atoi(argv[i])); + picture_rate = Kumu::xabs(strtol(argv[i], 0, 10)); break; case 'R': do_repeat = true; break; @@ -452,7 +460,7 @@ public: case 's': TEST_EXTRA_ARG(i, 's'); - fb_dump_size = abs(atoi(argv[i])); + fb_dump_size = Kumu::xabs(strtol(argv[i], 0, 10)); break; case 't': mode = MMT_DIGEST; break; @@ -464,7 +472,7 @@ public: case 'w': TEST_EXTRA_ARG(i, 'w'); - number_width = abs(atoi(argv[i])); + number_width = Kumu::xabs(strtol(argv[i], 0, 10)); break; case 'x': @@ -1794,18 +1802,18 @@ show_file_info(CommandOptions& Options) { const Dictionary* Dict = &DefaultCompositeDict(); PCM::MXFReader Reader; - MXF::OPAtomHeader OPAtomHeader(Dict); + MXF::OP1aHeader Header(Dict); MXF::WaveAudioDescriptor *descriptor = 0; result = Reader.OpenRead(Options.filenames[0]); if ( ASDCP_SUCCESS(result) ) - result = Reader.OPAtomHeader().GetMDObjectByType(Dict->ul(MDD_WaveAudioDescriptor), reinterpret_cast<MXF::InterchangeObject**>(&descriptor)); + result = Reader.OP1aHeader().GetMDObjectByType(Dict->ul(MDD_WaveAudioDescriptor), reinterpret_cast<MXF::InterchangeObject**>(&descriptor)); if ( ASDCP_SUCCESS(result) ) { char buf[64]; - fprintf(stdout, " ChannelAssignment: %s\n", descriptor->ChannelAssignment.EncodeString(buf, 64)); + fprintf(stdout, " ChannelAssignment: %s\n", descriptor->ChannelAssignment.const_get().EncodeString(buf, 64)); } } } @@ -1836,7 +1844,7 @@ show_file_info(CommandOptions& Options) fprintf(stderr, "File is not AS-DCP: %s\n", Options.filenames[0]); Kumu::FileReader Reader; const Dictionary* Dict = &DefaultCompositeDict(); - MXF::OPAtomHeader TestHeader(Dict); + MXF::OP1aHeader TestHeader(Dict); result = Reader.OpenRead(Options.filenames[0]); |
