summaryrefslogtreecommitdiff
path: root/src/lib/player.h
AgeCommit message (Collapse)Author
2020-06-19Make Atmos content work more like other content. Now its MXFsv2.15.82Carl Hetherington
are re-written, meaning that they can be encrypted. This (along with the libdcp update) also fixes assorted Atmos bugs.
2020-05-11Change video content scaling so that it either:Carl Hetherington
1. scales the content up to fit the DCP container, preserving aspect ratio, or 2. stretches the content to a custom aspect ratio, or 3. scales the content to some custom size.
2020-04-23Nicer fix for 86102d30bf0aad89115bbeb3d8aaa2a27a0aa432Carl Hetherington
2020-04-23Add accessor for _playlist.Carl Hetherington
2020-04-23Fix complete failure of preview/playback introduced inv2.15.53Carl Hetherington
4219d4b76c5cd5690b1f4fa0c248d93ced26d05a.
2020-04-15Fix length of player output so it can be either the film's length or ↵Carl Hetherington
playlist's length, as appropriate.
2020-01-28Missing #include for previous.Carl Hetherington
2020-01-28Fix 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.
2020-01-25Cache film length for Player::pass.Carl Hetherington
2019-10-13Fix failure to load OV after adding a VF to a project.Carl Hetherington
This has the same cause as 19f51503621a57794bd79bac053c9e6549a69f46 i.e. the DCPDecoder re-use optimisation. This commit tries to re-fix 19f515 in a more general way which also takes into account the OV/VF bug. It also adds a unit test.
2019-08-30Make player more tolerant of some DCP errors.Carl Hetherington
2019-05-10Put Font and Screen into dcpomatic namespace.Carl Hetherington
2019-05-10Put Time types in dcpomatic namespace.Carl Hetherington
2018-12-22Fix assumption of 48kHz DCP audio in AudioRingBuffers consistency check (#1436).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-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-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-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-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-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-23Commenting.v2.13.37Carl Hetherington
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.
2018-07-20Key ActiveCaptions on a CaptionContent rather than a Piece.Carl Hetherington
2018-07-20Untested; allow viewing of subtitles or closed captions in the preview.Carl Hetherington
2018-07-19Clean up after previous commit.Carl Hetherington
2018-07-19Reword again: Text -> Caption and Plain -> Text.Carl Hetherington
sed -i "s/ActiveText/ActiveCaptions/g" src/lib/*.{cc,h} sed -i "s/active_text.h/active_captions.h/g" src/lib/*.{cc,h} sed -i "s/active_text.cc/active_captions.cc/g" src/lib/wscript mv src/lib/active_text.cc src/lib/active_captions.cc mv src/lib/active_text.h src/lib/active_captions.h sed -i "s/PlainTextFileContent/TextCaptionFileContent/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/PlainTextFile/TextCaptionFile/g" src/lib/*.{cc,h} src/wx/*.cc sed -i "s/plain_text_file_content/text_caption_file_content/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} test/*.cc mv src/lib/plain_text_file_content.cc src/lib/text_caption_file_content.cc mv src/lib/plain_text_file_content.h src/lib/text_caption_file_content.h sed -i "s/PlainTextFileDecoder/TextCaptionFileDecoder/g" src/lib/*.{cc,h} sed -i "s/plain_text_file_decoder/text_caption_file_decoder/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} mv src/lib/plain_text_file_decoder.cc src/lib/text_caption_file_decoder.cc mv src/lib/plain_text_file_decoder.h src/lib/text_caption_file_decoder.h sed -i "s/PlayerText/PlayerCaption/g" src/lib/*.{cc,h} sed -i "s/player_text.cc/player_caption.cc/g" src/lib/wscript sed -i "s/player_text.h/player_caption.h/g" src/lib/*.{cc,h} mv src/lib/player_text.cc src/lib/player_caption.cc mv src/lib/player_text.h src/lib/player_caption.h sed -i "s/ContentPlainText/ContentTextCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/ContentBitmapText/ContentBitmapCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h} sed -i "s/PlainText/TextCaption/g" src/lib/*.{cc,h} test/*.cc sed -i "s/plain_text.h/text_caption.h/g" src/lib/*.{cc,h} mv src/lib/plain_text.h src/lib/text_caption.h
2018-07-19Get types into ReelWriter.Carl Hetherington
2018-07-19Text to player with types.Carl Hetherington
2018-07-19Partial conversion of PlayerSubtitles -> PlayerText and SubtitleString -> ↵Carl Hetherington
PlainText.
2018-07-19Remove old content_subtitle.Carl Hetherington
2018-07-19More renaming.Carl Hetherington
sed -i "s/emit_text/emit_plain/g" src/lib/*.cc src/lib/*.h sed -i "s/emit_image_start/emit_bitmap_start/g" src/lib/*.cc src/lib/*.h sed -i "s/emit_text_start/emit_plain_start/g" src/lib/*.cc src/lib/*.h sed -i "s/render_subtitles/render_text/g" src/lib/*.cc src/lib/*.h src/lib/wscript test/*.cc sed -i "s/ImageStart/BitmapStart/g" src/lib/*.cc src/lib/*.h sed -i "s/TextStart/PlainStart/g" src/lib/*.cc src/lib/*.h test/*.cc src/wx/*.cc sed -i "s/ImageSubtitle/BitmapText/g" src/lib/*.cc src/lib/*.h sed -i "s/text_subtitle/plain_text/g" src/lib/*.cc src/lib/*.h src/lib/wscript src/wx/*.cc src/wx/*.h test/*.cc sed -i "s/image_subtitle/bitmap_text/g" src/lib/*.cc src/lib/*.h mv src/lib/render_subtitles.cc src/lib/render_text.cc mv src/lib/render_subtitles.h src/lib/render_text.h mv src/lib/text_subtitle.cc src/lib/plain_text.cc mv src/lib/text_subtitle.h src/lib/plain_text.h
2018-06-29Basic jump to selected subtitle (#1200).Carl Hetherington
2018-02-24Speed some operations by re-using the last PlayerVideo but withCarl Hetherington
updated metadata (where possible). Helps with #1194.
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-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-15Add comment.Carl Hetherington