]> git.sesse.net Git - vlc/blobdiff - plugins/yuv/yuv.c
* Fixed the BeOS compile typo.
[vlc] / plugins / yuv / yuv.c
index 712266250803cf7f1b9abd3f7246de5349e87cfd..2284824c70cccfa2bf2fa1b483b487a48221492c 100644 (file)
@@ -1,9 +1,10 @@
 /*****************************************************************************
- * yuv.c : C YUV functions for vlc
+ * yuv.c : C YUV module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
+ * $Id: yuv.c,v 1.7 2001/05/30 17:03:12 sam Exp $
  *
- * Authors:
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,6 +21,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+#define MODULE_NAME yuv
+#include "modules_inner.h"
+
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include "common.h"                                     /* boolean_t, byte_t */
 #include "threads.h"
 #include "mtime.h"
-#include "tests.h"
-#include "plugins.h"
 
-#include "interface.h"
-#include "audio_output.h"
 #include "video.h"
 #include "video_output.h"
 
+#include "modules.h"
+
 /*****************************************************************************
- * Exported prototypes
+ * Local and extern prototypes.
  *****************************************************************************/
-static void yuv_GetPlugin( p_vout_thread_t p_vout );
-
-/* YUV transformations */
-int     yuv_CInit          ( p_vout_thread_t p_vout );
-int     yuv_CReset         ( p_vout_thread_t p_vout );
-void    yuv_CEnd           ( p_vout_thread_t p_vout );
+void _M( yuv_getfunctions )( function_list_t * p_function_list );
 
 /*****************************************************************************
- * GetConfig: get the plugin structure and configuration
+ * Build configuration tree.
  *****************************************************************************/
-plugin_info_t * GetConfig( void )
-{
-    plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) );
-
-    p_info->psz_name    = "C YUV to RGB transformations";
-    p_info->psz_version = VERSION;
-    p_info->psz_author  = "the VideoLAN team <vlc@videolan.org>";
-
-    p_info->aout_GetPlugin = NULL;
-    p_info->vout_GetPlugin = NULL;
-    p_info->intf_GetPlugin = NULL;
-    p_info->yuv_GetPlugin  = yuv_GetPlugin;
+MODULE_CONFIG_START
+ADD_WINDOW( "Configuration for YUV module" )
+    ADD_COMMENT( "Ha, ha -- nothing to configure yet" )
+MODULE_CONFIG_STOP
 
-    /* The C YUV functions should always work */
-    p_info->i_score = 0x100;
+MODULE_INIT_START
+    p_module->i_capabilities = MODULE_CAPABILITY_NULL
+                                | MODULE_CAPABILITY_YUV;
+    p_module->psz_longname = "YUV transformations module";
+MODULE_INIT_STOP
 
-    /* If this plugin was requested, score it higher */
-    if( TestMethod( YUV_METHOD_VAR, "nommx" ) )
-    {
-        p_info->i_score += 0x200;
-    }
-
-    return( p_info );
-}
-
-/*****************************************************************************
- * Following functions are only called through the p_info structure
- *****************************************************************************/
+MODULE_ACTIVATE_START
+    _M( yuv_getfunctions )( &p_module->p_functions->yuv );
+MODULE_ACTIVATE_STOP
 
-static void yuv_GetPlugin( p_vout_thread_t p_vout )
-{
-    p_vout->p_yuv_init   = yuv_CInit;
-    p_vout->p_yuv_reset  = yuv_CReset;
-    p_vout->p_yuv_end    = yuv_CEnd;
-}
+MODULE_DEACTIVATE_START
+MODULE_DEACTIVATE_STOP