summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
AgeCommit message (Collapse)Author
2018-04-26Signal when streams change and rebuild player pieces when it happens.Carl Hetherington
2018-04-19Fix crash on make-dcp after trimming end of text subtitles (#1275).Carl Hetherington
2018-04-17When seeking to the start of some content, take trim into accountCarl Hetherington
so that we don't have to run through the whole of the trimmed portion to get to the data we want.
2018-03-27Remove believed-misleading comment.v2.13.6Carl Hetherington
2018-03-27Fix order of calculations to make subtitle centering work after scaling ↵Carl Hetherington
(related to #1246).
2018-03-24Fix crash when changing DCP audio channel count.Carl Hetherington
Without this we ask the AudioMerger to merge new buffers with N channels with old buffers with M channels, which it can't do. I'm not convinced this is the best solution but I think it will do for now.
2018-02-24Speed some operations by re-using the last PlayerVideo but withCarl Hetherington
updated metadata (where possible). Helps with #1194.
2018-02-23Another subtitle fix.Carl Hetherington
2018-02-23Fix thinko in previous.Carl Hetherington
2018-02-23Fix implementation of delay in 7758260; it needs to apply toCarl Hetherington
anything passed to emit_video(), not just things that come from decoders.
2018-02-20Add a 2-frame `delay' on content arriving at the player to giveCarl Hetherington
subtitle content the chance to catch up. Fixes problems observed when overlaying a DCP subtitle onto an existing DCP and then seeking into the first subtitle. After the seek the decoder positions were: DCP: 0. subtitle: first subtitle time. This causes the DCP decoder to be pass()ed first and so the subtitle for the video frame has not arrived yet. I hope this does not cause unpredicted side effects...
2018-02-16Add log for assertion failure.Carl Hetherington
2018-02-07Fix ignore/referencing logic.Carl Hetherington
2018-02-02Whitespace.Carl Hetherington
2018-02-02Prior to 2537a2d Decoder::position() was not updated if a decoder emittedCarl Hetherington
data which were ignored by the Player. 2537a2d changed this so that Decoder::position() is always updated, as it could not see the point of the previous behaviour. It now seems that the behaviour prior to 2537a2d fixed problems with cases like remake_with_subtitle_test. With this test the FFmpeg content happens to emit a final frame just after its end point with a gap before it. Code prior to 2537a2d handled this by making sure that FFmpegDecoder::flush() filled the gap (it reads VideoDecoder::position and fills the gap at the end of content accordingly). This no longer works if VideoDecoder::position is updated to take into account the emitted (and ignored) frame just after the end of the content. This commit re-fixes that problem by a different means; Player::video now fills the gaps in this case by more careful handling of received data which is off the end of the content.
2018-01-31Fix missing subtitles when they start just after the start of a frame.Carl Hetherington
2018-01-31Fix sequencing failure in some very specific circumstances.Carl Hetherington
2018-01-30Fix assertion failure in emit_audio.Carl Hetherington
2018-01-16In general the player assumes that it won't receive out of order video.Carl Hetherington
This clearly can happen with separate L/R sources. A pass in L might emit two frames which means the arrivals can't possibly be in order. This commit fixes this by introducing a Shuffler which all alternate-3D sources send their video to. The Shuffler re-orders things before they arrive at the player. It also fixes the code which inserts video frames before one that arrives after a gap. This didn't cope with 3D right before. The audio code solves a similar (perhaps the same?) problem with the AudioMerger; perhaps we should have a similar thing for video and make the player emit complete 3D frames. Should help with #976.
2018-01-15Fix incorrect reel lengths when start-trimmed movie content followsCarl Hetherington
image-only content (e.g. crash1.xml in dcpomatic-test). We must consider the _silent "source" to be like an audio stream when deciding when to pull up to.
2018-01-14Only put subtitles in a frame if they overlap more than half of thatCarl Hetherington
frame; may help with #1166.
2018-01-13Use an enum for the effect in SubtitleContent.Carl Hetherington
2018-01-04Recreate player pieces when changing FFmpeg filters (#1019).Carl Hetherington
2018-01-02Mark pieces as done when we're past the end of them; fixes #1154.Carl Hetherington
2018-01-02A previous commit took care to make Decoder::position() not be updatedCarl Hetherington
if the data that was emitted from the decoder was not taken by the player. This means that when the decoder moves into its end trim the position will stay where it is (since the player does not take the data). I can't see the point of doing this; the only use of Decoder::position() is to decide what to pass() next (I think). It is also inconvenient because we would like to check Decoder::position() to decide whether to stop passing a decoder since it's in its end trim (not doing this causes #1154).
2017-12-11Fix various problems caused by non-integer-frame start trims,Carl Hetherington
and also by the inability of content_video_to_dcp to return negative values. The latter is necessary for tests on "is this content too early" to work.
2017-12-10Clear out _stream_states before re-filling it.Carl Hetherington
2017-10-10Further fixes to audio decoder positioning logic.Carl Hetherington
2017-10-09Fix logic of audio decoder positioning.Carl Hetherington
2017-09-03Restore correct setup of fast resampler when the player is set to fast.Carl Hetherington
2017-08-30Fix incorrect reel lengths in some cases; account for emitted data being ↵Carl Hetherington
rejected by the player, and for initial audio not to be at time 0.
2017-08-14Basics of forced reduction of JPEG2000 decode resolution.Carl Hetherington
2017-08-14Remove Film dependency from Empty.Carl Hetherington
2017-07-28Do repeat in the player rather than trying to do it in VideoDecoder.Carl Hetherington
Trying to repeat in VideoDecoder is the wrong side of the distinction between content and DCP time; the repeat is for the DCP and VideoDecoder should be emitting in terms of the source.
2017-07-27Fix heavy fingers in previous commit.Carl Hetherington
2017-07-27Fix SNAFU with silence/black.Carl Hetherington
2017-07-12Don't emit black to fill up to a frame that we're not going to emit.Carl Hetherington
2017-07-12Add some tests; fix failure to make DCP when there is a bit of audio right ↵Carl Hetherington
at the end of the film (with no corresponding video).
2017-07-11Remove unused Player::_ignore_audio. Ignore positionCarl Hetherington
of things that we are ignoring; this fixes strange behaviour (delays) when analysing audio as it used to keep pass()ing decoders to get data that would never come.
2017-07-11Fix missing subtitle when it is at the same time as some video in different ↵Carl Hetherington
content.
2017-06-29Fixes for silence in projects, various cleanups.Carl Hetherington
2017-06-23Add a OV/VF test; tidy up a bit.Carl Hetherington
2017-06-23Remove debug code.Carl Hetherington
2017-06-23Attempts to simplify black-filling logic in Player.Carl Hetherington
2017-06-18Add a note to be fixed in #1073.Carl Hetherington
2017-06-18Small optimisation.Carl Hetherington
2017-06-18Remove spurious fills of audio data.Carl Hetherington
With a 29.97 source I had problems because the earliest decoder position was one DCPTime quantum ahead of the last audio time; this looks like it was due to the content-to-DCP time conversion using 1.001 as the ratio for 30/29.97 rather than 1.001001; I haven't investigated why. This all needs more careful consideration...
2017-06-01Stop old frames appearing in the preview after seeks.Carl Hetherington
2017-06-01Re-add missing audio mapping in butler for preview.Carl Hetherington
2017-05-30Remove call to fill_audio which goes wrong with multi-audio-stream content.Carl Hetherington
This call just doesn't take multi-stream into account. Removing it does not trip any tests so I think it may be superfluous...