/*
-Copyright (c) 2003-2008, John Hurst
+Copyright (c) 2003-2009, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
-#include <iostream>
+#include <iosfwd>
#include <string>
+#include <cstring>
#include <list>
//--------------------------------------------------------------------------------
// All library components are defined in the namespace ASDCP
//
namespace ASDCP {
- // The version number consists of three segments: major, API minor, and
- // implementation minor. Whenever a change is made to AS_DCP.h, the API minor
- // version will increment. Changes made to the internal implementation will
- // result in the incrementing of the implementation minor version.
-
- // For example, if asdcplib version 1.0.0 were modified to accomodate changes
- // in file format, and if no changes were made to AS_DCP.h, the new version would be
- // 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
- const ui32_t VERSION_MAJOR = 1;
- const ui32_t VERSION_APIMINOR = 3;
- const ui32_t VERSION_IMPMINOR = 18;
+ //
+ // The version number declaration and explanation have moved to ../configure.ac
const char* Version();
// UUIDs are passed around as strings of UUIDlen bytes
}
};
+ // Print WriterInfo to std::ostream
+ std::ostream& operator << (std::ostream& strm, const WriterInfo& winfo);
// Print WriterInfo to stream, stderr by default.
void WriterInfoDump(const WriterInfo&, FILE* = 0);
ui32_t ContainerDuration; //
};
+ // Print VideoDescriptor to std::ostream
+ std::ostream& operator << (std::ostream& strm, const VideoDescriptor& vdesc);
// Print VideoDescriptor to stream, stderr by default.
void VideoDescriptorDump(const VideoDescriptor&, FILE* = 0);
};
} // namespace MPEG2
+ //---------------------------------------------------------------------------------
//
namespace PCM
{
+ // The channel format will normally be CF_NONE. Unless you have read and understand
+ // SMPTE 429-2-2009 Annex A you should leave it as-is. If you want to label your channel
+ // format and it is one of the fomats given in 429-2, select the appropriate value
+ // from this enum and use it in the ChannelFormat element of the AudioDescriptor struct.
+ //
+ enum ChannelFormat_t {
+ CF_NONE,
+ CF_CFG_1, // 5.1 with optional HI/VI
+ CF_CFG_2, // 6.1 (5.1 + center surround) with optional HI/VI
+ CF_CFG_3, // 7.1 with optional HI/VI
+ };
+
struct AudioDescriptor
{
Rational SampleRate; // rate of frame wrapping
ui32_t AvgBps; //
ui32_t LinkedTrackID; //
ui32_t ContainerDuration; // number of frames
+ ChannelFormat_t ChannelFormat; // audio channel arrangement
};
+ // Print AudioDescriptor to std::ostream
+ std::ostream& operator << (std::ostream& strm, const AudioDescriptor& adesc);
// Print debugging information to stream (stderr default)
void AudioDescriptorDump(const AudioDescriptor&, FILE* = 0);
};
} // namespace PCM
+ //---------------------------------------------------------------------------------
//
namespace JP2K
{
QuantizationDefault_t QuantizationDefault;
};
+ // Print debugging information to std::ostream
+ std::ostream& operator << (std::ostream& strm, const PictureDescriptor& pdesc);
// Print debugging information to stream (stderr default)
void PictureDescriptorDump(const PictureDescriptor&, FILE* = 0);
};
} // namespace JP2K
+ //---------------------------------------------------------------------------------
//
namespace TimedText
{
TimedTextDescriptor() : ContainerDuration(0), EncodingName("UTF-8") {} // D-Cinema format is always UTF-8
};
+ // Print debugging information to std::ostream
+ std::ostream& operator << (std::ostream& strm, const TimedTextDescriptor& tinfo);
// Print debugging information to stream (stderr default)
void DescriptorDump(const TimedTextDescriptor&, FILE* = 0);