- shared_ptr<Content> c = content_factory (film, argv[i]);
- shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c);
- if (vc) {
- vc->set_scale (VideoContentScale (content_ratio));
+ boost::filesystem::path const can = boost::filesystem::canonical (argv[i]);
+ list<shared_ptr<Content> > content;
+ try {
+ content.push_back (shared_ptr<DCPContent> (new DCPContent (film, can)));
+ } catch (dcp::DCPReadError) {
+ /* I guess it's not a DCP */
+ content = content_factory (film, can);
+ } catch (boost::filesystem::filesystem_error) {
+ /* I guess it's not a DCP */
+ content = content_factory (film, can);
+ }
+
+ BOOST_FOREACH (shared_ptr<Content> j, content) {
+ if (j->video) {
+ j->video->set_scale (VideoContentScale (content_ratio));
+ }
+ film->examine_and_add_content (j);