This separates waiting on UTC deadline from waiting on monotonic clock.
That way, storing the reference clock in vlc_cond_t is no longer
necessary. There was only one single condition variable using the UTC
clock (in VLM), so vlc_cond_t.clock was rather wasteful.
Because having two differents events for the same objective is way too
confusing (libvlc_MediaParsedStatus was recently added by me).
libvlc_MediaParsedCharged is now always sent after a call to
libvlc_media_parse_*() (this was not the case if the pre-parsing was skipped).
The core vlc_InputItemPreparsedChanged event is now only attached from the
media player. This allows the libvlc_MediaParsedCharged event to be sent when a
media is parsed from a media player.
/!\ Behavior change in libvlc API /!\
The libvlc_event_t.u.media_parsed_changed.new_status value changed, this is now
a libvlc_media_parsed_status_t. Before this patch, this value was always set to
true, even in case of parse failure/skipped. Now this value can be skipped (1),
failed (2) or done (3). There should be no changes for users that were checking
if new_status was true, since this events was called for these 3 cases (that
are all > 0).
The logic for precise and inprecise seeking is the same with the
addition that precise seeking should use the exact desired timestamp
to use with ES_OUT_SET_NEXT_DISPLAY_TIME, whereas inprecise seeking will
use the timestamp associated with the closest index frame.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
There is sadly a trade-off between having "perfect" seeking for all
tracks (ie. the preroll should start at the latest possible location for
all tracks within the mkv), and having seeking which is fast.
This patch changes the functionality in SegmentSeeker so that it
optimizes seeking for the most important tracks. If, during the scan for
seekpoints for these tracks, we stumble upon seekpoints for other tracks
- use them, if not; simply yield appropriate seekpoints for the priority
tracks.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Fixed bug where a too big of an area would be returned from the
function, instead of just the area that is really not searched
(indexed).
This will, of course, speed up seeking since we will not rescan an area
where we already know everything there is to know.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
When seeking, we should prioritize tracks depending on what type of ES
they are; this patch addes a data-member to matroska_segment_c that will
keep track of which tracks are more important than other.
It also adds logic to ComputePriorityTracks that will initialize this
data-member with the appropriate track-ids.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Even though there are currently some type of cues that we cannot handle,
we should add the aprox. location denoted by such cues as a seekpoint to
optimize seeking.
Adding the location with Seekpoint::DISABLED means that we will never
seek directly to the position, but it can be used as a hint when looking
for an appropriate keyframe during the preparation for seeking.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Every cue in the matroska format is based on the location of the cluster
in which it is part of, as such we should add this information (cluster
position) to the code responsible for seeking.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This patch will fix the OSDEpg (triggered by the "position" hotkey.) not
showing text information because of transparent alpha value and invalid
font size.
The argument size of the vout_OSDEpgText function is already in pixels and
not relative, so p_style->i_font_size is the correct style option.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>