using namespace dcpomatic;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
using namespace dcpomatic;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
/** Minimum video readahead in frames */
#define MINIMUM_VIDEO_READAHEAD 10
/** Maximum video readahead in frames; should never be exceeded (by much) unless there are bugs in Player */
/** Minimum video readahead in frames */
#define MINIMUM_VIDEO_READAHEAD 10
/** Maximum video readahead in frames; should never be exceeded (by much) unless there are bugs in Player */
/** Maximum audio readahead in frames; should never be exceeded (by much) unless there are bugs in Player */
#define MAXIMUM_AUDIO_READAHEAD (48000 * MAXIMUM_VIDEO_READAHEAD / 24)
/** Maximum audio readahead in frames; should never be exceeded (by much) unless there are bugs in Player */
#define MAXIMUM_AUDIO_READAHEAD (48000 * MAXIMUM_VIDEO_READAHEAD / 24)
/** @param pixel_format Pixel format functor that will be used when calling ::image on PlayerVideos coming out of this
* butler. This will be used (where possible) to prepare the PlayerVideos so that calling image() on them is quick.
* @param aligned Same as above for the `aligned' flag.
/** @param pixel_format Pixel format functor that will be used when calling ::image on PlayerVideos coming out of this
* butler. This will be used (where possible) to prepare the PlayerVideos so that calling image() on them is quick.
* @param aligned Same as above for the `aligned' flag.
/** @param blocking true if we should block until video is available. If blocking is false
* and no video is immediately available the method will return a 0 PlayerVideo and the error AGAIN.
* @param e if non-0 this is filled with an error code (if an error occurs) or is untouched if no error occurs.
/** @param blocking true if we should block until video is available. If blocking is false
* and no video is immediately available the method will return a 0 PlayerVideo and the error AGAIN.
* @param e if non-0 this is filled with an error code (if an error occurs) or is untouched if no error occurs.
- if (e) {
- if (_died) {
- e->code = Error::DIED;
- e->message = _died_message;
- } else if (_finished) {
- e->code = Error::FINISHED;
- } else {
- e->code = Error::NONE;
- }
- }
+ setup_error (e, Error::NONE);
/* If the weak_ptr cannot be locked the video obviously no longer requires any work */
if (video) {
LOG_TIMING("start-prepare in %1", thread_id());
/* If the weak_ptr cannot be locked the video obviously no longer requires any work */
if (video) {
LOG_TIMING("start-prepare in %1", thread_id());
- _audio.put (remap (audio, _audio_channels, _audio_mapping), time, frame_rate);
+ _audio.put (remap(audio, _audio_channels, _audio_mapping), time, frame_rate);
/** Try to get `frames' frames of audio and copy it into `out'. Silence
* will be filled if no audio is available.
* @return time of this audio, or unset if there was a buffer underrun.
/** Try to get `frames' frames of audio and copy it into `out'. Silence
* will be filled if no audio is available.
* @return time of this audio, or unset if there was a buffer underrun.
void
Butler::player_change (ChangeType type, int property)
{
if (property == VideoContentProperty::CROP) {
void
Butler::player_change (ChangeType type, int property)
{
if (property == VideoContentProperty::CROP) {
if (_awaiting && _awaiting > next) {
/* We have recently done a player_changed seek and our buffers haven't been refilled yet,
so assume that we're seeking to the same place as last time.
if (_awaiting && _awaiting > next) {
/* We have recently done a player_changed seek and our buffers haven't been refilled yet,
so assume that we're seeking to the same place as last time.
void
Butler::text (PlayerText pt, TextType type, optional<DCPTextTrack> track, DCPTimePeriod period)
{
void
Butler::text (PlayerText pt, TextType type, optional<DCPTextTrack> track, DCPTimePeriod period)
{