[vlc-commits] lib: disable decoding hardware acceleration with vmem
Rémi Denis-Courmont
git at videolan.org
Sat Oct 11 13:41:16 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 11 14:37:52 2014 +0300| [86796e2a57adcf5daea9d182c4378e49b40a7f47] | committer: Rémi Denis-Courmont
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86796e2a57adcf5daea9d182c4378e49b40a7f47
---
lib/media_player.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/media_player.c b/lib/media_player.c
index f234b57..64240aa 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -510,6 +510,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
var_Create (mp, "vmem-width", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "vmem-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
var_Create (mp, "vmem-pitch", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
+ var_Create (mp, "avcodec-hw", VLC_VAR_STRING);
var_Create (mp, "drawable-xid", VLC_VAR_INTEGER);
#if defined (_WIN32) || defined (__OS2__)
var_Create (mp, "drawable-hwnd", VLC_VAR_INTEGER);
@@ -975,6 +976,7 @@ void libvlc_video_set_callbacks( libvlc_media_player_t *mp,
var_SetAddress( mp, "vmem-display", display_cb );
var_SetAddress( mp, "vmem-data", opaque );
var_SetString( mp, "vout", "vmem" );
+ var_SetString( mp, "avcodec-hw", "none" );
}
void libvlc_video_set_format_callbacks( libvlc_media_player_t *mp,
@@ -1055,6 +1057,7 @@ void libvlc_media_player_set_xwindow( libvlc_media_player_t *p_mi,
{
assert (p_mi != NULL);
+ var_SetString (p_mi, "avcodec-hw", "");
var_SetString (p_mi, "vout", drawable ? "xid" : "any");
var_SetString (p_mi, "window", drawable ? "embed-xid,any" : "any");
var_SetInteger (p_mi, "drawable-xid", drawable);
More information about the vlc-commits
mailing list