#include "dcp.h"
#include "exceptions.h"
#include "reel.h"
-#include "sound_mxf.h"
-#include "picture_mxf.h"
+#include "sound_asset.h"
+#include "picture_asset.h"
#include "subtitle_asset.h"
#include "reel_picture_asset.h"
#include "reel_sound_asset.h"
#include "reel_subtitle_asset.h"
#include "subtitle_string.h"
+#include "interop_subtitle_asset.h"
+#include "smpte_subtitle_asset.h"
#include "cpl.h"
#include "common.h"
#include <getopt.h>
using std::cout;
using std::list;
using boost::shared_ptr;
+using boost::dynamic_pointer_cast;
using namespace dcp;
static void
static void
main_picture (shared_ptr<Reel> reel)
{
- if (reel->main_picture() && reel->main_picture()->mxf()) {
+ if (reel->main_picture() && reel->main_picture()->asset()) {
cout << " Picture: "
- << reel->main_picture()->mxf()->size().width
+ << reel->main_picture()->asset()->size().width
<< "x"
- << reel->main_picture()->mxf()->size().height << "\n";
+ << reel->main_picture()->asset()->size().height << "\n";
}
}
static void
main_sound (shared_ptr<Reel> reel)
{
- if (reel->main_sound() && reel->main_sound()->mxf()) {
+ if (reel->main_sound() && reel->main_sound()->asset()) {
cout << " Sound: "
- << reel->main_sound()->mxf()->channels()
+ << reel->main_sound()->asset()->channels()
<< " channels at "
- << reel->main_sound()->mxf()->sampling_rate() << "Hz\n";
+ << reel->main_sound()->asset()->sampling_rate() << "Hz\n";
}
}
if (!reel->main_subtitle()) {
return;
}
-
+
list<SubtitleString> subs = reel->main_subtitle()->subtitle_asset()->subtitles ();
- cout << " Subtitle: " << subs.size() << " subtitles in " << reel->main_subtitle()->subtitle_asset()->language() << "\n";
+ cout << " Subtitle: " << subs.size() << " subtitles";
+ shared_ptr<InteropSubtitleAsset> iop = dynamic_pointer_cast<InteropSubtitleAsset> (reel->main_subtitle()->subtitle_asset());
+ if (iop) {
+ cout << " in " << iop->language() << "\n";
+ }
+ shared_ptr<SMPTESubtitleAsset> smpte = dynamic_pointer_cast<SMPTESubtitleAsset> (reel->main_subtitle()->subtitle_asset());
+ if (smpte && smpte->language ()) {
+ cout << " in " << smpte->language().get() << "\n";
+ }
if (list_subtitles) {
BOOST_FOREACH (SubtitleString const& k, subs) {
cout << k << "\n";
bool subtitles = false;
bool keep_going = false;
bool ignore_missing_assets = false;
-
+
int option_index = 0;
while (1) {
static struct option long_options[] = {
cerr << "Could not read DCP " << argv[optind] << "; " << e.what() << "\n";
exit (EXIT_FAILURE);
}
-
+
cout << "DCP: " << boost::filesystem::path(argv[optind]).filename().string() << "\n";
dcp::filter_errors (errors, ignore_missing_assets);
for (list<shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
cout << " CPL: " << (*i)->annotation_text() << "\n";
-
+
list<shared_ptr<Reel> > reels = (*i)->reels ();
int R = 1;