]> git.sesse.net Git - vlc/commitdiff
snapshot: replace vout_snapshottaken with snapshot-file
authorErwan Tulou <erwan10@videolan.org>
Sat, 29 Aug 2009 18:20:16 +0000 (20:20 +0200)
committerErwan Tulou <erwan10@videolan.org>
Sat, 29 Aug 2009 18:52:51 +0000 (20:52 +0200)
src/control/media_player.c
src/video_output/event.h
src/video_output/vout_intf.c

index 2fec2ae9a476f968b9f7c43226d80f5cbe6a218a..5c5674c37d0d19213084e01e1b512aa3aa04f5a0 100644 (file)
@@ -348,9 +348,7 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
         vout_thread that generates the event and media_player that re-emits it
         with its own event manager
     */
-    var_Create( p_libvlc_instance->p_libvlc_int, "vout-snapshottaken",
-                VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
-    var_AddCallback( p_libvlc_instance->p_libvlc_int, "vout-snapshottaken",
+    var_AddCallback( p_libvlc_instance->p_libvlc_int, "snapshot-file",
                      SnapshotTakenCallback, p_mi );
 
     return p_mi;
@@ -387,7 +385,7 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
 
     /* Detach Callback from the main libvlc object */
     var_DelCallback( p_mi->p_libvlc_instance->p_libvlc_int,
-                     "vout-snapshottaken", SnapshotTakenCallback, p_mi );
+                     "snapshot-file", SnapshotTakenCallback, p_mi );
 
     /* Release the input thread */
     release_input_thread( p_mi, true );
index fff6f2642d172ede4e02872e8c3d8de653e5d362..37eb390707e9023d08daefc2a8f62de82868c1e8 100644 (file)
@@ -220,10 +220,8 @@ static inline void vout_SendEventSourceCrop(vout_thread_t *vout,
 #if 0
 static inline void vout_SendEventSnapshot(vout_thread_t *vout, const char *filename)
 {
-    /* Generate a media player event  - Right now just trigger a global libvlc var
-        CHECK: Could not find a more local object. The goal is to communicate
-        vout_thread with libvlc_media_player or its input_thread */
-    var_SetString(vout->p_libvlc, "vout-snapshottaken", filename);
+    /* signal creation of a new snapshot file */
+    var_SetString(vout->p_libvlc, "snapshot-file", filename);
 }
 
 #warning "FIXME clean up postproc event"
index f8e7db6fbdf38739c331e89b2a1ddaf6eff08d2a..d267a4a5e58e53653f5b8ca3573342e9e7d5c122 100644 (file)
@@ -504,10 +504,9 @@ static void VoutSaveSnapshot( vout_thread_t *p_vout )
 
     VoutOsdSnapshot( p_vout, p_picture, psz_filename );
 
-    /* Generate a media player event  - Right now just trigger a global libvlc var
-        CHECK: Could not find a more local object. The goal is to communicate
-        vout_thread with libvlc_media_player or its input_thread */
-    var_SetString( p_vout->p_libvlc, "vout-snapshottaken", psz_filename );
+    /* signal creation of a new snapshot file */
+    var_SetString( p_vout->p_libvlc, "snapshot-file", psz_filename );
+
     free( psz_filename );
 
 exit: