]> git.sesse.net Git - vlc/blobdiff - plugins/yuvmmx/yuvmmx.c
. autod�tection des plugins
[vlc] / plugins / yuvmmx / yuvmmx.c
index 19fbb21e4278c1d3e81c6df85d19431a98fdbcff..955ef4a91a2b6b77e9c844036f71afc0c9be4b85 100644 (file)
@@ -31,6 +31,7 @@
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
+#include "tests.h"                                              /* TestMMX() */
 #include "plugins.h"
 
 #include "interface.h"
 #include "video.h"
 #include "video_output.h"
 
-#include "plugins_export.h"
-
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-void yuv_GetPlugin( p_vout_thread_t p_vout );
+static void yuv_GetPlugin( p_vout_thread_t p_vout );
+
+/* YUV transformations */
+int     yuv_MMXInit          ( p_vout_thread_t p_vout );
+int     yuv_MMXReset         ( p_vout_thread_t p_vout );
+void    yuv_MMXEnd           ( p_vout_thread_t p_vout );
 
 /*****************************************************************************
  * GetConfig: get the plugin structure and configuration
@@ -61,25 +65,32 @@ plugin_info_t * GetConfig( void )
     p_info->intf_GetPlugin = NULL;
     p_info->yuv_GetPlugin  = yuv_GetPlugin;
 
-    return( p_info );
-}
+    if( TestMMX() )
+    {
+        p_info->i_score = 0x200;
+    }
+    else
+    {
+        p_info->i_score = 0x0;
+    }
 
-/*****************************************************************************
- * Test: tests if the plugin can be launched
- *****************************************************************************/
-int Test( void )
-{
-    return( 1 );
+    /* If this plugin was requested, score it higher */
+    if( TestMethod( YUV_METHOD_VAR, "mmx" ) )
+    {
+        p_info->i_score += 0x200;
+    }
+
+    return( p_info );
 }
 
 /*****************************************************************************
  * Following functions are only called through the p_info structure
  *****************************************************************************/
 
-void yuv_GetPlugin( p_vout_thread_t p_vout )
+static void yuv_GetPlugin( p_vout_thread_t p_vout )
 {
-    p_vout->p_yuv_init   = yuv_SysInit;
-    p_vout->p_yuv_reset  = yuv_SysReset;
-    p_vout->p_yuv_end    = yuv_SysEnd;
+    p_vout->p_yuv_init   = yuv_MMXInit;
+    p_vout->p_yuv_reset  = yuv_MMXReset;
+    p_vout->p_yuv_end    = yuv_MMXEnd;
 }