#include "KM_util.h"
#include "asset.h"
#include "util.h"
-#include "tags.h"
+#include "metadata.h"
using namespace std;
using namespace boost;
void
Asset::fill_writer_info (ASDCP::WriterInfo* writer_info) const
{
- writer_info->ProductVersion = Tags::instance()->product_version;
- writer_info->CompanyName = Tags::instance()->company_name;
- writer_info->ProductName = Tags::instance()->product_name.c_str();
+ writer_info->ProductVersion = Metadata::instance()->product_version;
+ writer_info->CompanyName = Metadata::instance()->company_name;
+ writer_info->ProductName = Metadata::instance()->product_name.c_str();
writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
unsigned int c;
#include "sound_asset.h"
#include "picture_asset.h"
#include "util.h"
-#include "tags.h"
+#include "metadata.h"
using namespace std;
using namespace boost;
<< "<CompositionPlaylist xmlns=\"http://www.smpte-ra.org/schemas/429-7/2006/CPL\">\n"
<< " <Id>urn:uuid:" << cpl_uuid << "</Id>\n"
<< " <AnnotationText>" << _name << "</AnnotationText>\n"
- << " <IssueDate>" << Tags::instance()->issue_date << "</IssueDate>\n"
- << " <Creator>" << Tags::instance()->creator << "</Creator>\n"
+ << " <IssueDate>" << Metadata::instance()->issue_date << "</IssueDate>\n"
+ << " <Creator>" << Metadata::instance()->creator << "</Creator>\n"
<< " <ContentTitleText>" << _name << "</ContentTitleText>\n"
<< " <ContentKind>" << content_type_string (_content_type) << "</ContentKind>\n"
<< " <ContentVersion>\n"
- << " <Id>urn:uri:" << cpl_uuid << "_" << Tags::instance()->issue_date << "</Id>\n"
- << " <LabelText>" << cpl_uuid << "_" << Tags::instance()->issue_date << "</LabelText>\n"
+ << " <Id>urn:uri:" << cpl_uuid << "_" << Metadata::instance()->issue_date << "</Id>\n"
+ << " <LabelText>" << cpl_uuid << "_" << Metadata::instance()->issue_date << "</LabelText>\n"
<< " </ContentVersion>\n"
<< " <RatingList/>\n"
<< " <ReelList>\n";
<< "<PackingList xmlns=\"http://www.smpte-ra.org/schemas/429-8/2007/PKL\">\n"
<< " <Id>urn:uuid:" << pkl_uuid << "</Id>\n"
<< " <AnnotationText>" << _name << "</AnnotationText>\n"
- << " <IssueDate>" << Tags::instance()->issue_date << "</IssueDate>\n"
- << " <Issuer>" << Tags::instance()->issuer << "</Issuer>\n"
- << " <Creator>" << Tags::instance()->creator << "</Creator>\n"
+ << " <IssueDate>" << Metadata::instance()->issue_date << "</IssueDate>\n"
+ << " <Issuer>" << Metadata::instance()->issuer << "</Issuer>\n"
+ << " <Creator>" << Metadata::instance()->creator << "</Creator>\n"
<< " <AssetList>\n";
for (list<shared_ptr<Asset> >::const_iterator i = _assets.begin(); i != _assets.end(); ++i) {
am << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<AssetMap xmlns=\"http://www.smpte-ra.org/schemas/429-9/2007/AM\">\n"
<< " <Id>urn:uuid:" << make_uuid() << "</Id>\n"
- << " <Creator>" << Tags::instance()->creator << "</Creator>\n"
+ << " <Creator>" << Metadata::instance()->creator << "</Creator>\n"
<< " <VolumeCount>1</VolumeCount>\n"
- << " <IssueDate>" << Tags::instance()->issue_date << "</IssueDate>\n"
- << " <Issuer>" << Tags::instance()->issuer << "</Issuer>\n"
+ << " <IssueDate>" << Metadata::instance()->issue_date << "</IssueDate>\n"
+ << " <Issuer>" << Metadata::instance()->issuer << "</Issuer>\n"
<< " <AssetList>\n";
am << " <Asset>\n"
--- /dev/null
+/*
+ Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+ This program 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,
+ 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.
+
+*/
+
+#include "metadata.h"
+
+using namespace std;
+using namespace libdcp;
+
+Metadata* Metadata::_instance = 0;
+
+/** Construct a Metadata object with some default values */
+Metadata::Metadata ()
+ : company_name ("libdcp")
+ , product_name ("libdcp")
+ , product_version (LIBDCP_VERSION)
+ , issuer ("libdcp" LIBDCP_VERSION)
+ , creator ("libdcp" LIBDCP_VERSION)
+{
+ char buffer[64];
+ time_t now;
+ time (&now);
+ struct tm* tm = localtime (&now);
+ strftime (buffer, 64, "%Y-%m-%dT%I:%M:%S+00:00", tm);
+ issue_date = string (buffer);
+}
+
+/** @return Singleton Metadata instance */
+Metadata *
+Metadata::instance ()
+{
+ if (_instance == 0) {
+ _instance = new Metadata;
+ }
+
+ return _instance;
+}
+
--- /dev/null
+/*
+ Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+
+ This program 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,
+ 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.
+
+*/
+
+#include <string>
+
+namespace libdcp
+{
+
+/** A class to hold various metadata that will be written
+ * to the DCP. The values are initialised, and can be modified
+ * if desired.
+ */
+class Metadata
+{
+public:
+ static Metadata* instance ();
+
+ std::string company_name;
+ std::string product_name;
+ std::string product_version;
+ std::string issuer;
+ std::string creator;
+ std::string issue_date;
+
+private:
+ Metadata ();
+
+ /** Singleton instance of Metadata */
+ static Metadata* _instance;
+};
+
+}
+++ /dev/null
-/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
-
- This program 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,
- 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.
-
-*/
-
-#include "tags.h"
-
-using namespace std;
-using namespace libdcp;
-
-Tags* Tags::_instance = 0;
-
-/** Construct a Tags object with some default values */
-Tags::Tags ()
- : company_name ("libdcp")
- , product_name ("libdcp")
- , product_version (LIBDCP_VERSION)
- , issuer ("libdcp" LIBDCP_VERSION)
- , creator ("libdcp" LIBDCP_VERSION)
-{
- char buffer[64];
- time_t now;
- time (&now);
- struct tm* tm = localtime (&now);
- strftime (buffer, 64, "%Y-%m-%dT%I:%M:%S+00:00", tm);
- issue_date = string (buffer);
-}
-
-/** @return Singleton Tags instance */
-Tags *
-Tags::instance ()
-{
- if (_instance == 0) {
- _instance = new Tags;
- }
-
- return _instance;
-}
-
+++ /dev/null
-/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
-
- This program 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,
- 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.
-
-*/
-
-#include <string>
-
-namespace libdcp
-{
-
-/** A class to hold various metadata that will be written
- * to the DCP. The values are initialised, and can be modified
- * if desired.
- */
-class Tags
-{
-public:
- static Tags* instance ();
-
- std::string company_name;
- std::string product_name;
- std::string product_version;
- std::string issuer;
- std::string creator;
- std::string issue_date;
-
-private:
- Tags ();
-
- /** Singleton instance of Tags */
- static Tags* _instance;
-};
-
-}
sound_asset.cc
picture_asset.cc
util.cc
- tags.cc
+ metadata.cc
"""
headers = """
dcp.h
+ metadata.h
"""
bld.install_files('${PREFIX}/include/libdcp', headers)
#include "KM_prng.h"
#include "dcp.h"
#include "util.h"
-#include "tags.h"
+#include "metadata.h"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE libdcp_test
{
Kumu::libdcp_test = true;
- libdcp::Tags* t = libdcp::Tags::instance ();
+ libdcp::Metadata* t = libdcp::Metadata::instance ();
t->issuer = "OpenDCP 0.0.25";
t->creator = "OpenDCP 0.0.25";
t->company_name = "OpenDCP";