]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/panoramix.c
s/vout_Destroy/vlc_object_release/ - A cat is a cat
[vlc] / modules / video_filter / panoramix.c
index d160eb875d94b9f477676f02f77a1e0a15d2db64..7a08fe68ad787b79ab17506a60ba21d9dd4e5fd4 100644 (file)
@@ -30,7 +30,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
 
 #include "filter_common.h"
@@ -39,7 +40,7 @@
 #define OVERLAP        2350
 #ifdef OVERLAP
     #include <math.h>
-    // OS CODE DEPENDANT to get display dimensions
+    // OS CODE DEPENDENT to get display dimensions
     #ifdef SYS_MINGW32
         #include <windows.h>
     #else
@@ -93,7 +94,7 @@ static int  SendEvents( vlc_object_t *, char const *,
 
 vlc_module_begin();
     set_description( N_("Panoramix: wall with overlap video filter") );
-    set_shortname( _("Panoramix" ));
+    set_shortname( N_("Panoramix" ));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
@@ -200,7 +201,7 @@ vlc_module_begin();
     set_callbacks( Create, Destroy );
 vlc_module_end();
 
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
     "cols", "rows", "offset-x", "bz-length", "bz-height", "attenuate",
     "bz-begin", "bz-middle", "bz-end", "bz-middle-pos", "bz-gamma-red",
     "bz-gamma-green", "bz-gamma-blue", "bz-blackcrush-red",
@@ -359,7 +360,7 @@ case VLC_FOURCC('c','y','u','v'):    // packed by 2
     p_vout->p_sys->i_col = var_CreateGetInteger( p_vout, CFG_PREFIX "cols" );
     p_vout->p_sys->i_row = var_CreateGetInteger( p_vout, CFG_PREFIX "rows" );
 
-// OS dependant code :  Autodetect number of displays in wall
+// OS dependent code :  Autodetect number of displays in wall
 #ifdef SYS_MINGW32
     if ((p_vout->p_sys->i_col < 0) || (p_vout->p_sys->i_row < 0) )
     {
@@ -551,7 +552,7 @@ static int AdjustHeight( vout_thread_t *p_vout )
     double d_halfLength_calculated;
     int    i_offset = 0;
 
-// OS DEPENDANT CODE to get display dimensions
+// OS DEPENDENT CODE to get display dimensions
         if (b_fullscreen)
         {
 #ifdef SYS_MINGW32
@@ -899,7 +900,7 @@ static void Destroy( vlc_object_t *p_this )
 #ifdef GLOBAL_OUTPUT
     DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents);
     vlc_object_detach( p_vout->p_sys->p_vout );
-    vout_Destroy( p_vout->p_sys->p_vout );
+    vlc_object_release( p_vout->p_sys->p_vout );
     DEL_PARENT_CALLBACKS( SendEventsToChild);
 #endif
 
@@ -1047,17 +1048,17 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic )
             while( p_in < p_in_end )
             {
 #ifndef OVERLAP
-                p_vout->p_libvlc->pf_memcpy( p_out , p_in, i_copy_pitch);
+                vlc_memcpy( p_out, p_in, i_copy_pitch);
 #else
                 if (p_vout->p_sys->i_col > 2)
                 {
                     length /= 2;
                     if (i_col == 0)
-                        p_vout->p_libvlc->pf_memcpy( p_out + length , p_in, i_copy_pitch - length);
+                        vlc_memcpy( p_out + length , p_in, i_copy_pitch - length);
                     else if (i_col + 1 == p_vout->p_sys->i_col)
-                            p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch - length);
-                         else
-                            p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch);
+                        vlc_memcpy( p_out, p_in - length, i_copy_pitch - length);
+                    else
+                        vlc_memcpy( p_out, p_in - length, i_copy_pitch);
 
                     if ((i_col == 0))
                     // black bar
@@ -1078,7 +1079,7 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic )
                     length *= 2;
                 }
                 else
-                    p_vout->p_libvlc->pf_memcpy( p_out , p_in, i_copy_pitch);
+                    vlc_memcpy( p_out , p_in, i_copy_pitch);
 
               if (p_vout->p_sys->b_attenuate)
             {
@@ -1390,18 +1391,18 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic )
             while( p_in < p_in_end )
             {
 #ifndef OVERLAP
-                p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch);
+                vlc_memcpy( p_out, p_in, i_copy_pitch );
 #else
                 if (p_vout->p_sys->i_col > 2)
                 {
                     // vertical blend
                     length /= 2;
                     if (i_col == 0)
-                        p_vout->p_libvlc->pf_memcpy( p_out + length, p_in, i_copy_pitch - length);
+                        vlc_memcpy( p_out + length, p_in, i_copy_pitch - length);
                     else if (i_col + 1 == p_vout->p_sys->i_col)
-                            p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch - length);
-                         else
-                            p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch);
+                        vlc_memcpy( p_out, p_in - length, i_copy_pitch - length);
+                    else
+                        vlc_memcpy( p_out, p_in - length, i_copy_pitch);
 
                     if ((i_col == 0))
                     // black bar
@@ -1428,7 +1429,7 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic )
                     length *= 2;
                 }
                 else
-                    p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch);
+                    vlc_memcpy( p_out, p_in, i_copy_pitch);
 
 // vertical blend
 // first blended zone
@@ -1768,9 +1769,9 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
             while( p_in < p_in_end )
             {
 #ifndef OVERLAP
-                p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch);
+                vlc_memcpy( p_out, p_in, i_copy_pitch);
 #else
-                p_vout->p_libvlc->pf_memcpy( p_out + i_col * length, p_in + i_col * length, i_copy_pitch - length);
+                vlc_memcpy( p_out + i_col * length, p_in + i_col * length, i_copy_pitch - length);
                 p_out += LeftOffset;
                 p_in += LeftOffset;
 #ifndef GAMMA
@@ -1913,7 +1914,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
                  SendEvents );
              vlc_object_detach(
                  p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
-             vout_Destroy(
+             vlc_object_release(
                  p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout );
          }
     }