Thomas Guillem [Fri, 10 Oct 2014 07:45:57 +0000 (09:45 +0200)]
android: fix monotonic cond_timedwait on newer versions
android-L drops support for pthread_cond_timedwait_monotonic_np and adds
support for pthread_condattr_setclock. So, use the good function depending on
configure detection.
lib: disable decoding hardware acceleration with vmem
This ensures that subpictures blending works, and avoids copying back
video frames from GPU to CPU. For proper hardware acceleration,
use libvlc_media_player_set_xwindow() instead.
Julian Scheel [Fri, 10 Oct 2014 09:19:57 +0000 (11:19 +0200)]
codec/zvbi: Do not follow dead color-links
If a color-key is requested check the stored nav-link to be in the valid page
range before following it. This avoids unexpected disappearance of the
teletext overlay if a color-link does not exist or is not yet loaded.
Julian Scheel [Fri, 10 Oct 2014 09:21:07 +0000 (11:21 +0200)]
codec/zvbi: Only reset subpicture in text mode
The subpicture reset, as stated in the comment, is only required when
rendering text-subtitles. In fact it causes an invalid image to be generated
and possibly output in non-text mode. Hence disable the picture recreation for
non-text mode.
Julian Scheel [Fri, 10 Oct 2014 08:39:14 +0000 (10:39 +0200)]
mmal/vout: Use framerate from pictures
The framerate of pictures might change without a change of the general input
format information. So to ensure that we always handle the correct refreshrate
we compare the refreshrate of each picture with the currently configured one.
Julian Scheel [Thu, 9 Oct 2014 12:49:39 +0000 (14:49 +0200)]
mmal: Fix buffer size computation
The buffer sizes in opaque case were computed by a mixture of hardcoded values
and mmal defaults. This caused breakage due to changes of the default values
in recent mmal versions. To avoid this in the future, the buffer sizes are
completely hardcoded now. As we have a shared header for mmal now, move the
required define for shared values into that header.
Using this new computation we can reduce the buffer size for opaque case by 2,
which saves some memory.
Julian Scheel [Thu, 9 Oct 2014 10:08:57 +0000 (12:08 +0200)]
mmal/vout: Apply phase offset to match vsync period
As the latency target alone is not ensuring that we start with a sane phase
shift between vsync and drawing, we read back the phase shift provided by the
mmal rendering statistics and use it to compute a phase offset which we apply
to the picture date, so that the core shifts the display call accordingly.
Doing this frequently allows us to resync if a distortion or display reset
caused the offset to break.
This is only enabled if mmal-adjust-refreshrate is enabled, because the whole
vsync synchronisation makes only sense if display and videorate match.
Julian Scheel [Thu, 9 Oct 2014 10:08:56 +0000 (12:08 +0200)]
mmal/vout: Configure latency target
The mmal video_render element allows to configure a latency target. Although
the parameter is named AUDIO_LATENCY_TARGET it is not actually related to
audio but synchronizes frame draws with hdmi vsync. It tries to match the hdmi
vsync rate to the picture render rate by slightly varying the hdmi pixel
clock. This makes only sense if the actual display refresh rate matches the
video frame rate, so that only minimal drift compensation is required. Thus
enable it only when mmal-adjust-refreshrate is activated.
lib: Fire libvlc_MediaListPlayerPlayed at end of playlist
The "libvlc_MediaListPlayerPlayed" event was defined but unused.
It is now fired when libvlc_media_list_player is played until last item in the playlist
Signed-off-by: Igor Prokopenkov <cmyk777@gmail.com> Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
XCB/XVideo: do not fallback to YUYV output for RGB inputs
If the XVideo driver does not provide any RGB image format, then we
are definitely better off with GLX than XVideo. Consider:
- GLX supports proper subpicture blending - not XVideo,
- GLX does not need chroma conversion - XVideo does in this case.
This change makes no difference if the XVideo driver supports RGB.
XCB/XVideo: reject hardware surfaces for the time being
The core cannot blend subpictures to hardware surfaces. In principles,
blending could be performed post chroma conversion, but this is not
supported by the video output wrapper so far.
wayland/shm: use wl_scaler for A/R, crop and zoom (where available)
Note: The wl_scaler object is retained after Open() even though it is
not currently used afterwards. It will probably be needed for scaling
subpictures going forward.
That should help failing safe to software decoding if the graphic card
has too little free memory. Old cards with only 256 MiB are commonly
affected by that problem.