]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/transform.c
YUV 422 Packed motion detect (still kind of broken).
[vlc] / modules / video_filter / transform.c
index e8377454da4c21900ab50bee222c2ba0c5d84f0f..40eab9db004f89a6dfb51a95acbd4f3e87abe5b6 100644 (file)
@@ -29,7 +29,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"
@@ -64,29 +65,29 @@ static int  SendEvents( vlc_object_t *, char const *,
 #define TYPE_TEXT N_("Transform type")
 #define TYPE_LONGTEXT N_("One of '90', '180', '270', 'hflip' and 'vflip'")
 
-static const char *type_list[] = { "90", "180", "270", "hflip", "vflip" };
-static const char *type_list_text[] = { N_("Rotate by 90 degrees"),
+static const char *const type_list[] = { "90", "180", "270", "hflip", "vflip" };
+static const char *const type_list_text[] = { N_("Rotate by 90 degrees"),
   N_("Rotate by 180 degrees"), N_("Rotate by 270 degrees"),
   N_("Flip horizontally"), N_("Flip vertically") };
 
 #define CFG_PREFIX "transform-"
 
 vlc_module_begin();
-    set_description( _("Video transformation filter") );
-    set_shortname( _("Transformation"));
+    set_description( N_("Video transformation filter") );
+    set_shortname( N_("Transformation"));
     set_capability( "video filter", 0 );
     set_category( CAT_VIDEO );
     set_subcategory( SUBCAT_VIDEO_VFILTER );
 
     add_string( CFG_PREFIX "type", "90", NULL,
-                          TYPE_TEXT, TYPE_LONGTEXT, VLC_FALSE);
+                          TYPE_TEXT, TYPE_LONGTEXT, false);
         change_string_list( type_list, type_list_text, 0);
 
     add_shortcut( "transform" );
     set_callbacks( Create, Destroy );
 vlc_module_end();
 
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
     "type", NULL
 };
 
@@ -99,7 +100,7 @@ static const char *ppsz_filter_options[] = {
 struct vout_sys_t
 {
     int i_mode;
-    vlc_bool_t b_rotation;
+    bool b_rotation;
     vout_thread_t *p_vout;
 
     void (*pf_filter)( vout_thread_t *, const picture_t *, picture_t * );
@@ -299,7 +300,7 @@ static void Destroy( vlc_object_t *p_this )
     {
         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 );
@@ -521,8 +522,8 @@ static void FilterPlanar( vout_thread_t *p_vout,
                 for( ; p_in < p_in_end ; )
                 {
                     p_in_end -= p_pic->p[i_index].i_pitch;
-                    p_vout->p_libvlc->pf_memcpy( p_out, p_in_end,
-                                           p_pic->p[i_index].i_visible_pitch );
+                    vlc_memcpy( p_out, p_in_end,
+                                p_pic->p[i_index].i_visible_pitch );
                     p_out += p_pic->p[i_index].i_pitch;
                 }
             }