summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AS_DCP.cpp2
-rwxr-xr-xsrc/AS_DCP_JP2K.cpp36
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp30
-rwxr-xr-xsrc/AS_DCP_PCM.cpp22
-rwxr-xr-xsrc/Index.cpp8
-rwxr-xr-xsrc/MXF.h2
-rwxr-xr-xsrc/MXFTypes.cpp2
-rwxr-xr-xsrc/MXFTypes.h2
-rwxr-xr-xsrc/WavFileWriter.h2
-rwxr-xr-xsrc/asdcp-test.cpp28
10 files changed, 67 insertions, 67 deletions
diff --git a/src/AS_DCP.cpp b/src/AS_DCP.cpp
index 12765c6..10d5c66 100755
--- a/src/AS_DCP.cpp
+++ b/src/AS_DCP.cpp
@@ -36,7 +36,7 @@ const char*
ASDCP::Version()
{
static char ver[16];
- snprintf(ver, 16, "%lu.%lu.%lu", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
+ snprintf(ver, 16, "%u.%u.%u", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
return ver;
}
diff --git a/src/AS_DCP_JP2K.cpp b/src/AS_DCP_JP2K.cpp
index 02d1d91..ce4d5af 100755
--- a/src/AS_DCP_JP2K.cpp
+++ b/src/AS_DCP_JP2K.cpp
@@ -45,20 +45,20 @@ ASDCP::JP2K::PictureDescriptorDump(const PictureDescriptor& PDesc, FILE* stream)
stream = stderr;
fprintf(stream, "\
- AspectRatio: %lu/%lu\n\
- EditRate: %lu/%lu\n\
- StoredWidth: %lu\n\
- StoredHeight: %lu\n\
- Rsize: %lu\n\
- Xsize: %lu\n\
- Ysize: %lu\n\
- XOsize: %lu\n\
- YOsize: %lu\n\
- XTsize: %lu\n\
- YTsize: %lu\n\
- XTOsize: %lu\n\
- YTOsize: %lu\n\
- ContainerDuration: %lu\n",
+ AspectRatio: %d/%d\n\
+ EditRate: %d/%d\n\
+ StoredWidth: %u\n\
+ StoredHeight: %u\n\
+ Rsize: %u\n\
+ Xsize: %u\n\
+ Ysize: %u\n\
+ XOsize: %u\n\
+ YOsize: %u\n\
+ XTsize: %u\n\
+ YTsize: %u\n\
+ XTOsize: %u\n\
+ YTOsize: %u\n\
+ ContainerDuration: %u\n",
PDesc.AspectRatio.Numerator ,PDesc.AspectRatio.Denominator,
PDesc.EditRate.Numerator ,PDesc.EditRate.Denominator,
PDesc.StoredWidth,
@@ -79,7 +79,7 @@ ASDCP::JP2K::PictureDescriptorDump(const PictureDescriptor& PDesc, FILE* stream)
for ( ui32_t i = 0; i < PDesc.Csize; i++ )
{
- fprintf(stream, " %lu.%lu.%lu\n",
+ fprintf(stream, " %u.%u.%u\n",
PDesc.ImageComponents[i].Ssize,
PDesc.ImageComponents[i].XRsize,
PDesc.ImageComponents[i].YRsize
@@ -90,13 +90,13 @@ ASDCP::JP2K::PictureDescriptorDump(const PictureDescriptor& PDesc, FILE* stream)
char tmp_buf[tmp_buf_len];
if ( PDesc.CodingStyleLength )
- fprintf(stream, "Default Coding (%lu): %s\n",
+ fprintf(stream, "Default Coding (%u): %s\n",
PDesc.CodingStyleLength,
Kumu::bin2hex(PDesc.CodingStyle, PDesc.CodingStyleLength, tmp_buf, tmp_buf_len)
);
if ( PDesc.QuantDefaultLength )
- fprintf(stream, "Quantization Default (%lu): %s\n",
+ fprintf(stream, "Quantization Default (%u): %s\n",
PDesc.QuantDefaultLength,
Kumu::bin2hex(PDesc.QuantDefault, PDesc.QuantDefaultLength, tmp_buf, tmp_buf_len)
);
@@ -156,7 +156,7 @@ ASDCP::JP2K::MXFReader::h__Reader::MD_to_JP2K_PDesc(JP2K::PictureDescriptor& PDe
memcpy(&PDesc.ImageComponents, m_EssenceSubDescriptor->PictureComponentSizing.RoData() + 8, tmp_size - 8);
else
- DefaultLogSink().Error("Unexpected PictureComponentSizing size: %lu, should be 17\n", tmp_size);
+ DefaultLogSink().Error("Unexpected PictureComponentSizing size: %u, should be 17\n", tmp_size);
// CodingStyleDefault
if ( ( PDesc.CodingStyleLength = m_EssenceSubDescriptor->CodingStyleDefault.Length() ) != 0 )
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 83f7bbe..04010be 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -102,20 +102,20 @@ ASDCP::MPEG2::VideoDescriptorDump(const VideoDescriptor& VDesc, FILE* stream)
stream = stderr;
fprintf(stream, "\
- SampleRate: %lu/%lu\n\
- FrameLayout: %lu\n\
- StoredWidth: %lu\n\
- StoredHeight: %lu\n\
- AspectRatio: %lu/%lu\n\
- ComponentDepth: %lu\n\
- HorizontalSubsmpl: %lu\n\
- VerticalSubsmpl: %lu\n\
- ColorSiting: %lu\n\
- CodedContentType: %lu\n\
- LowDelay: %lu\n\
- BitRate: %lu\n\
- ProfileAndLevel: %lu\n\
- ContainerDuration: %lu\n",
+ SampleRate: %d/%d\n\
+ FrameLayout: %u\n\
+ StoredWidth: %u\n\
+ StoredHeight: %u\n\
+ AspectRatio: %d/%d\n\
+ ComponentDepth: %u\n\
+ HorizontalSubsmpl: %u\n\
+ VerticalSubsmpl: %u\n\
+ ColorSiting: %u\n\
+ CodedContentType: %u\n\
+ LowDelay: %u\n\
+ BitRate: %u\n\
+ ProfileAndLevel: %u\n\
+ ContainerDuration: %u\n",
VDesc.SampleRate.Numerator ,VDesc.SampleRate.Denominator,
VDesc.FrameLayout,
VDesc.StoredWidth,
@@ -212,7 +212,7 @@ ASDCP::MPEG2::MXFReader::h__Reader::FindFrameGOPStart(ui32_t FrameNum, ui32_t& K
if ( ASDCP_FAILURE(m_FooterPart.Lookup(FrameNum, TmpEntry)) )
{
- DefaultLogSink().Error("Frame value out of range: %lu\n", FrameNum);
+ DefaultLogSink().Error("Frame value out of range: %u\n", FrameNum);
return RESULT_RANGE;
}
diff --git a/src/AS_DCP_PCM.cpp b/src/AS_DCP_PCM.cpp
index a4f9b5f..e5260e4 100755
--- a/src/AS_DCP_PCM.cpp
+++ b/src/AS_DCP_PCM.cpp
@@ -78,15 +78,15 @@ ASDCP::PCM::AudioDescriptorDump(const AudioDescriptor& ADesc, FILE* stream)
stream = stderr;
fprintf(stream, "\
- SampleRate: %lu/%lu\n\
- AudioSamplingRate: %lu/%lu\n\
- Locked: %lu\n\
- ChannelCount: %lu\n\
- QuantizationBits: %lu\n\
- BlockAlign: %lu\n\
- AvgBps: %lu\n\
- LinkedTrackID: %lu\n\
- ContainerDuration: %lu\n",
+ SampleRate: %d/%d\n\
+ AudioSamplingRate: %d/%d\n\
+ Locked: %u\n\
+ ChannelCount: %u\n\
+ QuantizationBits: %u\n\
+ BlockAlign: %u\n\
+ AvgBps: %u\n\
+ LinkedTrackID: %u\n\
+ ContainerDuration: %u\n",
ADesc.SampleRate.Numerator ,ADesc.SampleRate.Denominator,
ADesc.AudioSamplingRate.Numerator ,ADesc.AudioSamplingRate.Denominator,
ADesc.Locked,
@@ -363,14 +363,14 @@ ASDCP::PCM::MXFWriter::h__Writer::SetSourceStream(const AudioDescriptor& ADesc)
&& ADesc.SampleRate != EditRate_48
&& ADesc.SampleRate != EditRate_23_98 )
{
- DefaultLogSink().Error("AudioDescriptor.SampleRate is not 24/1, 48/1 or 24000/1001: %lu/%lu\n",
+ DefaultLogSink().Error("AudioDescriptor.SampleRate is not 24/1, 48/1 or 24000/1001: %d/%d\n",
ADesc.SampleRate.Numerator, ADesc.SampleRate.Denominator);
return RESULT_RAW_FORMAT;
}
if ( ADesc.AudioSamplingRate != SampleRate_48k )
{
- DefaultLogSink().Error("AudioDescriptor.AudioSamplingRate is not 48000/1: %lu/%lu\n",
+ DefaultLogSink().Error("AudioDescriptor.AudioSamplingRate is not 48000/1: %d/%d\n",
ADesc.AudioSamplingRate.Numerator, ADesc.AudioSamplingRate.Denominator);
return RESULT_RAW_FORMAT;
}
diff --git a/src/Index.cpp b/src/Index.cpp
index a7bedb1..5e0743c 100755
--- a/src/Index.cpp
+++ b/src/Index.cpp
@@ -110,9 +110,9 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
fprintf(stream, " IndexEditRate = %s\n", IndexEditRate.EncodeString(identbuf, IdentBufferLen));
fprintf(stream, " IndexStartPosition = %s\n", i64sz(IndexStartPosition, identbuf));
fprintf(stream, " IndexDuration = %s\n", i64sz(IndexDuration, identbuf));
- fprintf(stream, " EditUnitByteCount = %lu\n", EditUnitByteCount);
- fprintf(stream, " IndexSID = %lu\n", IndexSID);
- fprintf(stream, " BodySID = %lu\n", BodySID);
+ fprintf(stream, " EditUnitByteCount = %u\n", EditUnitByteCount);
+ fprintf(stream, " IndexSID = %u\n", IndexSID);
+ fprintf(stream, " BodySID = %u\n", BodySID);
fprintf(stream, " SliceCount = %hu\n", SliceCount);
fprintf(stream, " PosTableCount = %hu\n", PosTableCount);
@@ -136,7 +136,7 @@ ASDCP::MXF::IndexTableSegment::Dump(FILE* stream)
const char*
ASDCP::MXF::IndexTableSegment::DeltaEntry::EncodeString(char* str_buf, ui32_t buf_len) const
{
- snprintf(str_buf, buf_len, "%3i %-3hu %-3lu", PosTableIndex, Slice, ElementData);
+ snprintf(str_buf, buf_len, "%3d %-3hu %-3u", PosTableIndex, Slice, ElementData);
return str_buf;
}
diff --git a/src/MXF.h b/src/MXF.h
index da9c498..a38b6db 100755
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -64,7 +64,7 @@ namespace ASDCP
inline const char* EncodeString(char* str_buf, ui32_t buf_len) const {
Kumu::ui64Printer offset_str(ByteOffset);
- snprintf(str_buf, buf_len, "%-6lu: %s", BodySID, offset_str.c_str());
+ snprintf(str_buf, buf_len, "%-6u: %s", BodySID, offset_str.c_str());
return str_buf;
}
diff --git a/src/MXFTypes.cpp b/src/MXFTypes.cpp
index af6e6af..90d68c1 100755
--- a/src/MXFTypes.cpp
+++ b/src/MXFTypes.cpp
@@ -431,7 +431,7 @@ ASDCP::MXF::Timestamp::EncodeString(char* str_buf, ui32_t buf_len) const
// 2004-05-01 13:20:00.000
snprintf(str_buf, buf_len,
"%04hu-%02hu-%02hu %02hu:%02hu:%02hu.000",
- Year, Month, Day, Hour, Minute, Second, Tick);
+ Year, Month, Day, Hour, Minute, Second);
return str_buf;
}
diff --git a/src/MXFTypes.h b/src/MXFTypes.h
index 5bb8ca4..051832b 100755
--- a/src/MXFTypes.h
+++ b/src/MXFTypes.h
@@ -320,7 +320,7 @@ namespace ASDCP
//
inline const char* EncodeString(char* str_buf, ui32_t buf_len) const {
- snprintf(str_buf, buf_len, "%lu/%lu", Numerator, Denominator);
+ snprintf(str_buf, buf_len, "%d/%d", Numerator, Denominator);
return str_buf;
}
diff --git a/src/WavFileWriter.h b/src/WavFileWriter.h
index b246f3c..048a7ec 100755
--- a/src/WavFileWriter.h
+++ b/src/WavFileWriter.h
@@ -72,7 +72,7 @@ class WavFileWriter
for ( ui32_t i = 0; i < file_count && ASDCP_SUCCESS(result); i++ )
{
- snprintf(filename, 256, "%s_%lu.wav", file_root, (i + 1));
+ snprintf(filename, 256, "%s_%u.wav", file_root, (i + 1));
m_OutFile.push_back(new Kumu::FileWriter);
result = m_OutFile.back()->OpenWrite(filename);
diff --git a/src/asdcp-test.cpp b/src/asdcp-test.cpp
index 381e5bd..5eaffe3 100755
--- a/src/asdcp-test.cpp
+++ b/src/asdcp-test.cpp
@@ -84,7 +84,7 @@ public:
ProductName = "asdcp-test";
char s_buf[128];
- snprintf(s_buf, 128, "%lu.%lu.%lu", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
+ snprintf(s_buf, 128, "%u.%u.%u", VERSION_MAJOR, VERSION_APIMINOR, VERSION_IMPMINOR);
ProductVersion = s_buf;
}
} s_MyInfo;
@@ -325,7 +325,7 @@ public:
if ( length != KeyLen )
{
- fprintf(stderr, "Unexpected key length: %lu, expecting %lu characters.\n", KeyLen, length);
+ fprintf(stderr, "Unexpected key length: %u, expecting %u characters.\n", KeyLen, length);
return;
}
}
@@ -339,7 +339,7 @@ public:
if ( length != UUIDlen )
{
- fprintf(stderr, "Unexpected key ID length: %lu, expecting %lu characters.\n", UUIDlen, length);
+ fprintf(stderr, "Unexpected key ID length: %u, expecting %u characters.\n", UUIDlen, length);
return;
}
}
@@ -371,7 +371,7 @@ public:
fb_size = atoi(argv[i]);
if ( verbose_flag )
- fprintf(stderr, "Frame Buffer size: %lu bytes.\n", fb_size);
+ fprintf(stderr, "Frame Buffer size: %u bytes.\n", fb_size);
break;
@@ -395,7 +395,7 @@ public:
if ( file_count >= MAX_IN_FILES )
{
- fprintf(stderr, "Filename lists exceeds maximum list size: %lu\n", MAX_IN_FILES);
+ fprintf(stderr, "Filename lists exceeds maximum list size: %u\n", MAX_IN_FILES);
return;
}
}
@@ -453,7 +453,7 @@ write_MPEG2_file(CommandOptions& Options)
{
fputs("MPEG-2 Pictures\n", stderr);
fputs("VideoDescriptor:\n", stderr);
- fprintf(stderr, "Frame Buffer size: %lu\n", Options.fb_size);
+ fprintf(stderr, "Frame Buffer size: %u\n", Options.fb_size);
MPEG2::VideoDescriptorDump(VDesc);
}
}
@@ -567,7 +567,7 @@ read_MPEG2_file(CommandOptions& Options)
if ( Options.verbose_flag )
{
- fprintf(stderr, "Frame Buffer size: %lu\n", Options.fb_size);
+ fprintf(stderr, "Frame Buffer size: %u\n", Options.fb_size);
MPEG2::VideoDescriptorDump(VDesc);
}
}
@@ -643,7 +643,7 @@ gop_start_test(CommandOptions& Options)
if ( Options.verbose_flag )
{
- fprintf(stderr, "Frame Buffer size: %lu\n", Options.fb_size);
+ fprintf(stderr, "Frame Buffer size: %u\n", Options.fb_size);
MPEG2::VideoDescriptorDump(VDesc);
}
}
@@ -664,7 +664,7 @@ gop_start_test(CommandOptions& Options)
if ( FrameBuffer.FrameType() != FRAME_I )
fprintf(stderr, "Expecting an I frame, got %c\n", FrameTypeChar(FrameBuffer.FrameType()));
- fprintf(stderr, "Requested frame %lu, got %lu\n", i, FrameBuffer.FrameNumber());
+ fprintf(stderr, "Requested frame %u, got %u\n", i, FrameBuffer.FrameNumber());
}
}
@@ -702,7 +702,7 @@ write_JP2K_file(CommandOptions& Options)
{
fprintf(stderr, "JPEG 2000 pictures\n");
fputs("PictureDescriptor:\n", stderr);
- fprintf(stderr, "Frame Buffer size: %lu\n", Options.fb_size);
+ fprintf(stderr, "Frame Buffer size: %u\n", Options.fb_size);
JP2K::PictureDescriptorDump(PDesc);
}
}
@@ -815,7 +815,7 @@ read_JP2K_file(CommandOptions& Options)
if ( Options.verbose_flag )
{
- fprintf(stderr, "Frame Buffer size: %lu\n", Options.fb_size);
+ fprintf(stderr, "Frame Buffer size: %u\n", Options.fb_size);
JP2K::PictureDescriptorDump(PDesc);
}
}
@@ -855,7 +855,7 @@ read_JP2K_file(CommandOptions& Options)
Kumu::FileWriter OutFile;
char filename[256];
ui32_t write_count;
- snprintf(filename, 256, "%s%06lu.j2c", Options.file_root, i);
+ snprintf(filename, 256, "%s%06u.j2c", Options.file_root, i);
result = OutFile.OpenWrite(filename);
if ( ASDCP_SUCCESS(result) )
@@ -902,7 +902,7 @@ write_PCM_file(CommandOptions& Options)
if ( Options.verbose_flag )
{
- fprintf(stderr, "48Khz PCM Audio, %s fps (%lu spf)\n",
+ fprintf(stderr, "48Khz PCM Audio, %s fps (%u spf)\n",
Options.szPictureRate(),
PCM::CalcSamplesPerFrame(ADesc));
fputs("AudioDescriptor:\n", stderr);
@@ -964,7 +964,7 @@ write_PCM_file(CommandOptions& Options)
if ( FrameBuffer.Size() != FrameBuffer.Capacity() )
{
fprintf(stderr, "WARNING: Last frame read was short, PCM input is possibly not frame aligned.\n");
- fprintf(stderr, "Expecting %lu bytes, got %lu.\n", FrameBuffer.Capacity(), FrameBuffer.Size());
+ fprintf(stderr, "Expecting %u bytes, got %u.\n", FrameBuffer.Capacity(), FrameBuffer.Size());
result = RESULT_ENDOFFILE;
continue;
}