projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change MagickImageProxy to FFmpegImageProxy and make it use FFmpeg
[dcpomatic.git]
/
src
/
lib
/
decoder_factory.cc
diff --git
a/src/lib/decoder_factory.cc
b/src/lib/decoder_factory.cc
index 3d4ce8a7bff21ba66dd73579f8ca357dc8459cc0..df23ef6f604cb5d476a90f90231a4f9cdeea5c76 100644
(file)
--- a/
src/lib/decoder_factory.cc
+++ b/
src/lib/decoder_factory.cc
@@
-24,10
+24,10
@@
#include "dcp_decoder.h"
#include "image_content.h"
#include "image_decoder.h"
#include "dcp_decoder.h"
#include "image_content.h"
#include "image_decoder.h"
-#include "
text_caption
_file_content.h"
-#include "
text_caption
_file_decoder.h"
-#include "dcp_
text
_content.h"
-#include "dcp_
text
_decoder.h"
+#include "
string_text
_file_content.h"
+#include "
string_text
_file_decoder.h"
+#include "dcp_
subtitle
_content.h"
+#include "dcp_
subtitle
_decoder.h"
#include "video_mxf_content.h"
#include "video_mxf_decoder.h"
#include <boost/foreach.hpp>
#include "video_mxf_content.h"
#include "video_mxf_decoder.h"
#include <boost/foreach.hpp>
@@
-46,7
+46,12
@@
decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log, bool fa
shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (content);
if (dc) {
shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (content);
if (dc) {
- return shared_ptr<Decoder> (new DCPDecoder (dc, log, fast));
+ try {
+ return shared_ptr<Decoder> (new DCPDecoder (dc, log, fast));
+ } catch (KDMError& e) {
+ /* This will be found and reported to the user when the content is examined */
+ return shared_ptr<Decoder>();
+ }
}
shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);
}
shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (content);
@@
-54,14
+59,14
@@
decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log, bool fa
return shared_ptr<Decoder> (new ImageDecoder (ic, log));
}
return shared_ptr<Decoder> (new ImageDecoder (ic, log));
}
- shared_ptr<const
TextCaptionFileContent> rc = dynamic_pointer_cast<const TextCaption
FileContent> (content);
+ shared_ptr<const
StringTextFileContent> rc = dynamic_pointer_cast<const StringText
FileContent> (content);
if (rc) {
if (rc) {
- return shared_ptr<Decoder> (new
TextCaption
FileDecoder (rc, log));
+ return shared_ptr<Decoder> (new
StringText
FileDecoder (rc, log));
}
}
- shared_ptr<const DCP
TextContent> dsc = dynamic_pointer_cast<const DCPText
Content> (content);
+ shared_ptr<const DCP
SubtitleContent> dsc = dynamic_pointer_cast<const DCPSubtitle
Content> (content);
if (dsc) {
if (dsc) {
- return shared_ptr<Decoder> (new DCP
Text
Decoder (dsc, log));
+ return shared_ptr<Decoder> (new DCP
Subtitle
Decoder (dsc, log));
}
shared_ptr<const VideoMXFContent> vmc = dynamic_pointer_cast<const VideoMXFContent> (content);
}
shared_ptr<const VideoMXFContent> vmc = dynamic_pointer_cast<const VideoMXFContent> (content);