#include "safe_stringstream.h"
#include <dcp/util.h>
#include <dcp/signer.h>
-#include <dcp/picture_mxf.h>
-#include <dcp/sound_mxf.h>
-#include <dcp/subtitle_content.h>
+#include <dcp/picture_asset.h>
+#include <dcp/sound_asset.h>
+#include <dcp/subtitle_asset.h>
#include <glib.h>
#include <pangomm/init.h>
#include <boost/algorithm/string.hpp>
}
setlocale (LC_ALL, "");
- textdomain ("libdcpomatic");
+ textdomain ("libdcpomatic2");
#if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX)
- bindtextdomain ("libdcpomatic", mo_path().string().c_str());
- bind_textdomain_codeset ("libdcpomatic", "UTF8");
+ bindtextdomain ("libdcpomatic2", mo_path().string().c_str());
+ bind_textdomain_codeset ("libdcpomatic2", "UTF8");
#endif
#ifdef DCPOMATIC_LINUX
- bindtextdomain ("libdcpomatic", LINUX_LOCALE_PREFIX);
+ bindtextdomain ("libdcpomatic2", LINUX_LOCALE_PREFIX);
#endif
}
return (
ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" ||
ext == ".png" || ext == ".bmp" || ext == ".tga" || ext == ".dpx" ||
- ext == ".j2c" || ext == ".j2k"
+ ext == ".j2c" || ext == ".j2k" || ext == ".jp2"
);
}
{
string ext = f.extension().string();
transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
- return (ext == ".j2k" || ext == ".j2c");
+ return (ext == ".j2k" || ext == ".j2c" || ext == ".jp2");
}
string
return r;
}
-long
-frame_info_position (int frame, Eyes eyes)
-{
- static int const info_size = 48;
-
- switch (eyes) {
- case EYES_BOTH:
- return frame * info_size;
- case EYES_LEFT:
- return frame * info_size * 2;
- case EYES_RIGHT:
- return frame * info_size * 2 + info_size;
- default:
- DCPOMATIC_ASSERT (false);
- }
-
- DCPOMATIC_ASSERT (false);
-}
-
-dcp::FrameInfo
-read_frame_info (FILE* file, int frame, Eyes eyes)
-{
- dcp::FrameInfo info;
- dcpomatic_fseek (file, frame_info_position (frame, eyes), SEEK_SET);
- fread (&info.offset, sizeof (info.offset), 1, file);
- fread (&info.size, sizeof (info.size), 1, file);
-
- char hash_buffer[33];
- fread (hash_buffer, 1, 32, file);
- hash_buffer[32] = '\0';
- info.hash = hash_buffer;
-
- return info;
-}
-
-void
-write_frame_info (FILE* file, int frame, Eyes eyes, dcp::FrameInfo info)
-{
- dcpomatic_fseek (file, frame_info_position (frame, eyes), SEEK_SET);
- fwrite (&info.offset, sizeof (info.offset), 1, file);
- fwrite (&info.size, sizeof (info.size), 1, file);
- fwrite (info.hash.c_str(), 1, info.hash.size(), file);
-}
-
-string
-video_mxf_filename (shared_ptr<dcp::PictureMXF> mxf)
-{
- return "j2c_" + mxf->id() + ".mxf";
-}
-
string
-audio_mxf_filename (shared_ptr<dcp::SoundMXF> mxf)
+video_asset_filename (shared_ptr<dcp::PictureAsset> asset)
{
- return "pcm_" + mxf->id() + ".mxf";
+ return "j2c_" + asset->id() + ".mxf";
}
string
-subtitle_content_filename (shared_ptr<dcp::SubtitleContent> content)
+audio_asset_filename (shared_ptr<dcp::SoundAsset> asset)
{
- return "sub_" + content->id() + ".xml";
+ return "pcm_" + asset->id() + ".mxf";
}