[Android] thumbnail: use display_cb to get the thumbnail

Thomas Guillem git at videolan.org
Mon Mar 7 16:43:51 CET 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Mar  7 16:04:05 2016 +0100| [8b4841a9b979192b0fe7689e56cf1a2be3d3b290] | committer: Thomas Guillem

thumbnail: use display_cb to get the thumbnail

> https://code.videolan.org/videolan/vlc-android/commit/8b4841a9b979192b0fe7689e56cf1a2be3d3b290
---

 libvlc/jni/thumbnailer.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libvlc/jni/thumbnailer.c b/libvlc/jni/thumbnailer.c
index 2a766b4..ee4b442 100644
--- a/libvlc/jni/thumbnailer.c
+++ b/libvlc/jni/thumbnailer.c
@@ -192,6 +192,13 @@ static void *thumbnailer_lock(void *opaque, void **pixels)
  **/
 static void thumbnailer_unlock(void *opaque, void *picture, void *const *pixels)
 {
+    (void) opaque;
+    (void) picture;
+    (void) pixels;
+}
+
+static void thumbnailer_display(void *opaque, void *picture)
+{
     thumbnailer_sys_t *sys = opaque;
 
     /* If we have already received a thumbnail, or we are still seeking,
@@ -269,7 +276,7 @@ Java_org_videolan_libvlc_util_VLCUtil_nativeGetThumbnail(JNIEnv *env,
     sys->frameHeight = frameHeight;
     /* Set the video format and the callbacks. */
     libvlc_video_set_callbacks(mp, thumbnailer_lock, thumbnailer_unlock,
-                               NULL, (void*)sys);
+                               thumbnailer_display, (void*)sys);
     libvlc_video_set_format_callbacks(mp, thumbnailer_setup, NULL);
 
     libvlc_event_attach(libvlc_media_player_event_manager(mp),



More information about the Android mailing list