]> git.sesse.net Git - vlc/blobdiff - plugins/filter/transform.c
Some heavy changes today:
[vlc] / plugins / filter / transform.c
index fa9e6e77c3730f94ce7a4837f5c556208351d5ea..9b08b83c2b5ee023d89477a471945f2a014434f7 100644 (file)
@@ -2,7 +2,7 @@
  * transform.c : transform image plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: transform.c,v 1.1 2001/12/19 03:50:22 sam Exp $
+ * $Id: transform.c,v 1.2 2001/12/30 07:09:55 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME filter_transform
-#include "modules_inner.h"
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #include "video.h"
 #include "video_output.h"
 
 #include "filter_common.h"
 
-#include "modules.h"
-#include "modules_export.h"
-
 #define TRANSFORM_MODE_HFLIP   1
 #define TRANSFORM_MODE_VFLIP   2
 #define TRANSFORM_MODE_90      3
@@ -62,14 +50,14 @@ static void vout_getfunctions( function_list_t * p_function_list );
  * Build configuration tree.
  *****************************************************************************/
 MODULE_CONFIG_START
-ADD_WINDOW( "Configuration for transform module" )
-    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
 MODULE_CONFIG_STOP
 
 MODULE_INIT_START
-    p_module->i_capabilities = MODULE_CAPABILITY_NULL
-                                | MODULE_CAPABILITY_VOUT;
-    p_module->psz_longname = "image transformation module";
+    SET_DESCRIPTION( "image transformation module" )
+    /* Capability score set to 0 because we don't want to be spawned
+     * as a video output unless explicitly requested to */
+    ADD_CAPABILITY( VOUT, 0 )
+    ADD_SHORTCUT( "transform" )
 MODULE_INIT_STOP
 
 MODULE_ACTIVATE_START
@@ -125,12 +113,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int vout_Probe( probedata_t *p_data )
 {
-    if( TestMethod( VOUT_FILTER_VAR, "transform" ) )
-    {
-        return( 999 );
-    }
-
-    /* If we weren't asked to filter, don't filter. */
     return( 0 );
 }
 
@@ -406,8 +388,8 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
                 for( ; p_in < p_in_end ; )
                 {
                     p_in_end -= p_pic->planes[ i_index ].i_line_bytes;
-                    p_main->fast_memcpy( p_out, p_in_end,
-                                     p_pic->planes[ i_index ].i_line_bytes );
+                    FAST_MEMCPY( p_out, p_in_end,
+                                 p_pic->planes[ i_index ].i_line_bytes );
                     p_out += p_pic->planes[ i_index ].i_line_bytes;
                 }
             }