/*
Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of libdcp.
+
+ libdcp is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ libdcp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+ along with libdcp. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBDCP_MXF_H
namespace ASDCP {
class AESDecContext;
- class WriterInfo;
+ struct WriterInfo;
}
/* Undefine some stuff that the OS X 10.5 SDK defines */
{
class MXFMetadata;
-class PictureAssetWriter;
+class PictureAssetWriter;
/** @class MXF
- * @brief Parent class for classes which represent MXF files.
+ * @brief Parent for classes which represent MXF files.
*/
class MXF
{
public:
- MXF ();
- virtual ~MXF ();
+ virtual ~MXF () {}
/** @return true if the data is encrypted */
bool encrypted () const {
- return _key_id;
+ return static_cast<bool>(_key_id);
}
/** Set the ID of the key that is used for encryption/decryption.
MXFMetadata metadata () const {
return _metadata;
}
-
+
protected:
template <class P, class Q>
friend void start (PictureAssetWriter* writer, boost::shared_ptr<P> state, Standard standard, Q* mxf, uint8_t* data, int size);
* @param w struct to fill in.
* @param standard INTEROP or SMPTE.
*/
- void fill_writer_info (ASDCP::WriterInfo* w, std::string id, Standard standard);
+ void fill_writer_info (ASDCP::WriterInfo* w, std::string id, Standard standard) const;
- ASDCP::AESDecContext* _decryption_context;
/** ID of the key used for encryption/decryption, if there is one */
boost::optional<std::string> _key_id;
/** Key used for encryption/decryption, if there is one */