summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
AgeCommit message (Collapse)Author
2020-02-16Potential fix for #1568; we calculate the remaining DCPTime butCarl Hetherington
then convert it back to resampled content frames using the DCP rate rather than the resampled content rate, which seems wrong. If we want to go from metric time to frames we surely have to use the frame rate of the thing we are working with (not the frame rate which that thing will be played back at). Backported from 26c62598730d1d32333bfab0d5f463b90d26ee4d in v2.15.x.
2020-02-16Fix deadlock during content examination.Carl Hetherington
Before this fix, the following situation could happen in threads A and B: A: Some DONE signal happens; this triggers setup_pieces which takes a lock on the player mutex. B: FFmpegContent::examine takes a lock on the content mutex. B: FFmpegContent::examine adds a stream B: That causes STREAMS PENDING to be emitted. B: This tries to take a lock on the player mutex so it can update _suspended A: setup_pieces tries to access some content information, hence tries to take a lock on the content mutex. Now B is holding the CL and awaiting the PL and A is holding the PL and awaiting the CL. It feels like the root cause of this is that while setup_pieces is happening another change (which would itself cause setup_pieces) is announced, and this isn't dealt with properly. There are two steps here; _suspended is protected with an atomic rather than using _mutex, and also it can cope with being updated recursively. Backported from df48c75c38dd788835a93540aea243a2dac4bb10 in v2.15.x
2020-02-06Fix crash with bitmapped subs that have zero width or height.Carl Hetherington
Back-ported from dec5ae11238495c64fffdab37f189d96aed7d636 in v2.15.x.
2020-01-07Extend the amount of allowed disagreement between the audioCarl Hetherington
coming from the content and the calculated periods of silence. It sees that there is some scope for disagreements here when trim start/end times are rounded to frame boundaries. Fixes #1708.
2019-11-11Fix comment.Carl Hetherington
2019-11-11Increase fudge factor at the boundary between audio signal and silence.Carl Hetherington
2019-09-20Add a warning log when an assertion gets hit.Carl Hetherington
2019-04-17Fix errors when adding reels containing audio after referenced reels (#1528).v2.13.147Carl Hetherington
2019-03-23Another attempt to fix build.v2.13.135Carl Hetherington
2019-03-23Try to fix Windows build.Carl Hetherington
2019-03-22Fix referencing of trimmed multi-reel DCPs (#1495).Carl Hetherington
2019-03-13Only mark _suspended as false at the appropriate times; previouslyv2.13.130Carl Hetherington
it was done too often, I think.
2019-02-07Bodge at the interface between DCPTime and samples; fixes #1461.Carl Hetherington
2019-01-10Only fill video gaps if they are at least half a frame in length.Carl Hetherington
Fixes lack of image (sometimes) when trimming drop-frame content.
2019-01-10Fix a crash due the assertion in emit_audio failing when applyingCarl Hetherington
trims which do not land precisely on a DCP audio sample boundary (at least, I think that's what triggers it).
2018-12-22Fix assumption of 48kHz DCP audio in AudioRingBuffers consistency check (#1436).Carl Hetherington
2018-11-21Tidy and fix logging.Carl Hetherington
2018-11-21Add and use new FrameRateChange constructors.Carl Hetherington
2018-11-21Put Film pointer into Decoder.Carl Hetherington
2018-11-21Take Film pointer out of Content.Carl Hetherington
2018-09-04Build Empty objects from the presence or absence of decoders inCarl Hetherington
Pieces, rather than the presence or absence of content. This seems better because of cases like encrypted DCPs without a a KDM: here we may have content but no decoder.
2018-09-02Remove unnecessary subtitle scale (I think).Carl Hetherington
2018-09-02Fix subtitle scaling when writing PNG subs.Carl Hetherington
2018-08-29Missing handling of CHANGE_TYPE_CANCELLED causing another hang.v2.13.46Carl Hetherington
2018-08-29Basics of splitting CCAP streams into different assets.Carl Hetherington
2018-08-23Remove TextType from various places as (I believe) it can be inferred from ↵Carl Hetherington
the content.
2018-08-22Fix hang due to incorrect signal ordering.Carl Hetherington
2018-08-22Fix build with multiple closed captions.Carl Hetherington
2018-08-20MIssing PENDING/CANCELLED for VIDEO_CONTAINER_SIZE. Fix 3D fill with 2D ↵Carl Hetherington
sources.
2018-08-19Similar pending/done for Film::Change.Carl Hetherington
2018-08-19Replace May/Done/NotDone signal sets with one signal and extendCarl Hetherington
this treatment to anything that caused Player::setup_pieces. This should fix out-of-sequence Player emissions caused by setup_pieces being called by one thread while the butler is calling pass().
2018-08-19Suspend butler on player may-change as otherwise there's a windowCarl Hetherington
between Player::_suspended being set to false and the the butler requesting a seek, during which the butler may call pass().
2018-08-14More fixes for errors / crashes / misbehaviour with content changesCarl Hetherington
and the butler. Here we signal both before and after a change in content. Before, the player disables itself so that any pass()/seek() will be no-ops. After, the player rebuilds its pieces and the butler re-seeks to get back to where it was before the change.
2018-08-10Use more direct route to fix hangs after calling some Player methods.Carl Hetherington
2018-08-10Try to fix Windows build.Carl Hetherington
2018-08-10Add some Changed() emissions so that when a butler is in controlCarl Hetherington
we always do a seek when we set _have_valid_pieces to false.
2018-08-09Fix writer assertion at the end of some 3D encodes; one too many fill frames ↵Carl Hetherington
were being emitted.
2018-08-09Rather dubious fix for crash due to the sequence:Carl Hetherington
- playlist change - _have_valid_pieces -> false - signal butler - but meanwhile, pass happens which calls setup_pieces and starts emitting data from time 0 - this new data is not in sync with what's already in the audio ring buffers
2018-08-05Get closed caption view data from the butler, rather than the player.Carl Hetherington
You can't introduce the butler (so that the player is ahead of time) and then ask the player what should be in the frame that is being displayed "now"; the player will already have moved on.
2018-08-04Some subtitle renaming.Carl Hetherington
2018-08-02A variety of changes to improve (but not entirely fix) behaviourCarl Hetherington
when moving content (or otherwise changing the playlist) while playing. This commit refills the butler when things change in certain ways, and improves locking to cope with Player methods being called from the GUI and butler threads at the same time.
2018-07-27Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomaticCarl Hetherington
2018-07-26Protect the public API of Player with a mutex, sinceCarl Hetherington
seek() and pass() may be called from the Butler thread ad the same time as other Player methods are called from the GUI thread (by FilmViewer and ClosedCaptionViewDialog).
2018-07-26Add support for ignoring everything except text in the player.Carl Hetherington
2018-07-24Fix uninitialised variable.Carl Hetherington
2018-07-23Tidy up after mass rename.Carl Hetherington
2018-07-23More automated renaming.Carl Hetherington
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
2018-07-23Get ccaps by asking the Player, rather than by listening to its emissions,Carl Hetherington
which is slightly cleaner and works when subtitles are emitted with an unknown end time. Also add CCAPs to the player.
2018-07-22On reflection showing CCAPs over the main picture doesn't make much sense.Carl Hetherington
2018-07-21Basics of multiple captions per content so that DCPContent canCarl Hetherington
hold subs and closed captions.