#include "frame_rate_change.h"
#include "dcpomatic_assert.h"
#include <boost/optional.hpp>
#include "frame_rate_change.h"
#include "dcpomatic_assert.h"
#include <boost/optional.hpp>
* @param r Sampling rate.
*/
Time<S, O> ceil (double r) const {
* @param r Sampling rate.
*/
Time<S, O> ceil (double r) const {
static Time<S, O> from_seconds (double s) {
return Time<S, O> (llrint (s * HZ));
}
static Time<S, O> from_seconds (double s) {
return Time<S, O> (llrint (s * HZ));
}
template<>
Time<DCPTimeDifferentiator, ContentTimeDifferentiator>::Time (Time<ContentTimeDifferentiator, DCPTimeDifferentiator> d, FrameRateChange f);
template<>
Time<DCPTimeDifferentiator, ContentTimeDifferentiator>::Time (Time<ContentTimeDifferentiator, DCPTimeDifferentiator> d, FrameRateChange f);
/** Time relative to the start or position of a piece of content in its native frame rate */
typedef Time<ContentTimeDifferentiator, DCPTimeDifferentiator> ContentTime;
/** Time relative to the start of the output DCP in its frame rate */
/** Time relative to the start or position of a piece of content in its native frame rate */
typedef Time<ContentTimeDifferentiator, DCPTimeDifferentiator> ContentTime;
/** Time relative to the start of the output DCP in its frame rate */
T const max_from = std::max (from, other.from);
T const min_to = std::min (to, other.to);
if (max_from >= min_to) {
T const max_from = std::max (from, other.from);
T const min_to = std::min (to, other.to);
if (max_from >= min_to) {
/** @param A Period which is subtracted from.
* @param B Periods to subtract from `A', must be in ascending order of start time and must not overlap.
*/
template <class T>
/** @param A Period which is subtracted from.
* @param B Periods to subtract from `A', must be in ascending order of start time and must not overlap.
*/
template <class T>
}
} else if (*ov == j) {
/* B contains all of A */
} else if (i.from < j.from) {
/* B overlaps start of A */
}
} else if (*ov == j) {
/* B contains all of A */
} else if (i.from < j.from) {
/* B overlaps start of A */
DCPTime min (DCPTime a, DCPTime b);
DCPTime max (DCPTime a, DCPTime b);
ContentTime min (ContentTime a, ContentTime b);
DCPTime min (DCPTime a, DCPTime b);
DCPTime max (DCPTime a, DCPTime b);
ContentTime min (ContentTime a, ContentTime b);