]> git.sesse.net Git - vlc/blobdiff - src/control/mediacontrol_audio_video.c
implemented the display device selector.
[vlc] / src / control / mediacontrol_audio_video.c
index 212dc274be182a941bc7866538bc3137abc74973..ef6ead3f3f47ea3a6816285619f6895af978e1f0 100644 (file)
@@ -21,6 +21,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 #include "mediacontrol_internal.h"
 
 #include <vlc/mediacontrol.h>
@@ -78,22 +81,23 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
     var_SetString( p_vout, "snapshot-path", path );
     var_SetString( p_vout, "snapshot-format", "png" );
 
-    vlc_mutex_lock( &p_cache->object_lock );
+    vlc_object_lock( p_cache );
     vout_Control( p_vout, VOUT_SNAPSHOT );
-    vlc_cond_wait( &p_cache->object_wait, &p_cache->object_lock );
+    vlc_object_wait( p_cache );
     vlc_object_release( p_vout );
 
     p_snapshot = ( snapshot_t* ) p_cache->p_private;
-    vlc_object_destroy( p_cache );
+    vlc_object_unlock( p_cache );
+    vlc_object_release( p_cache );
 
     if( p_snapshot )
     {
         p_pic = private_mediacontrol_createRGBPicture( p_snapshot->i_width,
-                                                      p_snapshot->i_height,
-                                                      VLC_FOURCC( 'p','n','g',' ' ),
-                                                      p_snapshot->date,
-                                                      p_snapshot->p_data,
-                                                      p_snapshot->i_datasize );
+                               p_snapshot->i_height,
+                               VLC_FOURCC( 'p','n','g',' ' ),
+                               p_snapshot->date,
+                               p_snapshot->p_data,
+                               p_snapshot->i_datasize );
         if( !p_pic )
         {
             free( p_snapshot->p_data );
@@ -281,7 +285,7 @@ vlc_bool_t mediacontrol_set_visual( mediacontrol_Instance *self,
 
 int
 mediacontrol_get_rate( mediacontrol_Instance *self,
-                      mediacontrol_Exception *exception )
+               mediacontrol_Exception *exception )
 {
     libvlc_exception_t ex;
     libvlc_media_instance_t* p_mi;
@@ -302,8 +306,8 @@ mediacontrol_get_rate( mediacontrol_Instance *self,
 
 void
 mediacontrol_set_rate( mediacontrol_Instance *self,
-                      const int rate,
-                      mediacontrol_Exception *exception )
+               const int rate,
+               mediacontrol_Exception *exception )
 {
     libvlc_exception_t ex;
     libvlc_media_instance_t* p_mi;
@@ -321,7 +325,7 @@ mediacontrol_set_rate( mediacontrol_Instance *self,
 
 int
 mediacontrol_get_fullscreen( mediacontrol_Instance *self,
-                            mediacontrol_Exception *exception )
+                 mediacontrol_Exception *exception )
 {
     libvlc_exception_t ex;
     libvlc_media_instance_t* p_mi;
@@ -342,8 +346,8 @@ mediacontrol_get_fullscreen( mediacontrol_Instance *self,
 
 void
 mediacontrol_set_fullscreen( mediacontrol_Instance *self,
-                            const int b_fullscreen,
-                            mediacontrol_Exception *exception )
+                 const int b_fullscreen,
+                 mediacontrol_Exception *exception )
 {
     libvlc_exception_t ex;
     libvlc_media_instance_t* p_mi;