]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/mosaic_bridge.c
Simplify ConsoleWidth() and implement it for real on Win32
[vlc] / modules / stream_out / mosaic_bridge.c
index 5a9d705fdbb9b593ed4fbe5dbe479cb567acba9d..db1e8dc3e510319a954d204a3b127d72809d5b79 100644 (file)
  *****************************************************************************/
 #include <errno.h>                                                 /* ENOMEM */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include <vlc_sout.h>
 #include <vlc_block.h>
@@ -99,7 +103,7 @@ static int               Send( sout_stream_t *, sout_stream_id_t *, block_t * );
 
 inline static void video_del_buffer_decoder( decoder_t *, picture_t * );
 inline static void video_del_buffer_filter( filter_t *, picture_t * );
-static void video_del_buffer( vlc_object_t *, picture_t * );
+static void video_del_buffer( picture_t * );
 
 inline static picture_t *video_new_buffer_decoder( decoder_t * );
 inline static picture_t *video_new_buffer_filter( filter_t * );
@@ -130,12 +134,12 @@ static int MosaicBridgeCallback( vlc_object_t *, char const *,
 
 #define VFILTER_TEXT N_("Video filter")
 #define VFILTER_LONGTEXT N_( \
-    "Video filters will be applied to the video stream." );
+    "Video filters will be applied to the video stream." )
 
 #define CHROMA_TEXT N_("Image chroma")
 #define CHROMA_LONGTEXT N_( \
     "Force the use of a specific chroma. Use YUVA if you're planning " \
-    "to use the Alphamask or Bluescreen video filter." );
+    "to use the Alphamask or Bluescreen video filter." )
 
 #define CFG_PREFIX "sout-mosaic-bridge-"
 
@@ -173,7 +177,7 @@ static int Open( vlc_object_t *p_this )
 {
     sout_stream_t        *p_stream = (sout_stream_t *)p_this;
     sout_stream_sys_t    *p_sys;
-    vlc_object_t         *p_libvlc = p_this->p_libvlc;
+    vlc_object_t         *p_libvlc = VLC_OBJECT( p_this->p_libvlc );
     vlc_value_t           val;
 
     config_ChainParse( p_stream, CFG_PREFIX, ppsz_sout_options,
@@ -314,7 +318,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     p_bridge = GetBridge( p_stream );
     if ( p_bridge == NULL )
     {
-        vlc_object_t *p_libvlc = p_stream->p_libvlc;
+        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
         vlc_value_t val;
 
         p_bridge = malloc( sizeof( bridge_t ) );
@@ -424,6 +428,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 {
+    VLC_UNUSED(id);
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     bridge_t *p_bridge;
     bridged_es_t *p_es;
@@ -493,7 +498,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
 
     if ( b_last_es )
     {
-        vlc_object_t *p_libvlc = p_stream->p_libvlc;
+        vlc_object_t *p_libvlc = VLC_OBJECT( p_stream->p_libvlc );
         for ( i = 0; i < p_bridge->i_es_num; i++ )
             free( p_bridge->pp_es[i] );
         free( p_bridge->pp_es );
@@ -806,16 +811,18 @@ static picture_t *video_new_buffer( vlc_object_t *p_this,
 inline static void video_del_buffer_decoder( decoder_t *p_this,
                                              picture_t *p_pic )
 {
-    video_del_buffer( VLC_OBJECT( p_this ), p_pic );
+    VLC_UNUSED(p_this);
+    video_del_buffer( p_pic );
 }
 
 inline static void video_del_buffer_filter( filter_t *p_this,
                                             picture_t *p_pic )
 {
-    video_del_buffer( VLC_OBJECT( p_this ), p_pic );
+    VLC_UNUSED(p_this);
+    video_del_buffer( p_pic );
 }
 
-static void video_del_buffer( vlc_object_t *p_this, picture_t *p_pic )
+static void video_del_buffer( picture_t *p_pic )
 {
     p_pic->i_refcount = 0;
     p_pic->i_status = DESTROYED_PICTURE;
@@ -830,11 +837,13 @@ static void video_del_buffer( vlc_object_t *p_this, picture_t *p_pic )
 
 static void video_link_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
 {
+    VLC_UNUSED(p_dec);
     p_pic->i_refcount++;
 }
 
 static void video_unlink_picture_decoder( decoder_t *p_dec, picture_t *p_pic )
 {
+    VLC_UNUSED(p_dec);
     video_release_buffer_decoder( p_pic );
 }
 
@@ -846,6 +855,7 @@ static int MosaicBridgeCallback( vlc_object_t *p_this, char const *psz_var,
                                  vlc_value_t oldval, vlc_value_t newval,
                                  void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(oldval);
     sout_stream_t *p_stream = (sout_stream_t *)p_data;
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     int i_ret = VLC_SUCCESS;