projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
std::shared_ptr
[dcpomatic.git]
/
src
/
lib
/
video_mxf_content.cc
diff --git
a/src/lib/video_mxf_content.cc
b/src/lib/video_mxf_content.cc
index 4f69cb2e2301ed1fb76d2395b25b058934638dbd..a8a301f221bf9b68040a95dec78e079a9df01a9b 100644
(file)
--- a/
src/lib/video_mxf_content.cc
+++ b/
src/lib/video_mxf_content.cc
@@
-34,7
+34,8
@@
using std::list;
using std::string;
using std::list;
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
+using namespace dcpomatic;
VideoMXFContent::VideoMXFContent (boost::filesystem::path path)
: Content (path)
VideoMXFContent::VideoMXFContent (boost::filesystem::path path)
: Content (path)
@@
-58,7
+59,7
@@
VideoMXFContent::valid_mxf (boost::filesystem::path path)
return true;
} catch (dcp::MXFFileError& e) {
return true;
} catch (dcp::MXFFileError& e) {
- } catch (dcp::
DCP
ReadError& e) {
+ } catch (dcp::ReadError& e) {
}
}
@@
-68,7
+69,7
@@
VideoMXFContent::valid_mxf (boost::filesystem::path path)
return true;
} catch (dcp::MXFFileError& e) {
return true;
} catch (dcp::MXFFileError& e) {
- } catch (dcp::
DCP
ReadError& e) {
+ } catch (dcp::ReadError& e) {
}
}
@@
-119,12
+120,19
@@
VideoMXFContent::as_xml (xmlpp::Node* node, bool with_paths) const
DCPTime
VideoMXFContent::full_length (shared_ptr<const Film> film) const
{
DCPTime
VideoMXFContent::full_length (shared_ptr<const Film> film) const
{
- FrameRateChange const frc (
active_video_frame_rate(film), film->video_frame_rate
());
+ FrameRateChange const frc (
film, shared_from_this
());
return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor()), film->video_frame_rate());
}
return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor()), film->video_frame_rate());
}
+DCPTime
+VideoMXFContent::approximate_length () const
+{
+ return DCPTime::from_frames (video->length_after_3d_combine(), 24);
+}
+
void
void
-VideoMXFContent::add_properties (list<UserProperty>& p) const
+VideoMXFContent::add_properties (
shared_ptr<const Film> film,
list<UserProperty>& p) const
{
{
+ Content::add_properties (film, p);
video->add_properties (p);
}
video->add_properties (p);
}