Changeset 264a446cdf82baafb2ee7514f9567b9a35852ac3

Show
Ignore:
Timestamp:
14/04/07 21:00:42 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1176577242 +0000
git-parent:

[a1e8379fef3609a6ab791d1acc1d597962968ccf]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1176577242 +0000
Message:

Include modules.h whenever needed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/decoder.c

    r6bbeeca r264a446  
    172172                               i_priority, VLC_FALSE ) ) 
    173173        { 
    174             msg_Err( p_dec, "cannot spawn decoder thread \"%s\"", 
    175                              p_dec->p_module->psz_object_name ); 
     174            msg_Err( p_dec, "cannot spawn decoder thread" ); 
    176175            module_Unneed( p_dec, p_dec->p_module ); 
    177176            DeleteDecoder( p_dec ); 
  • src/interface/interface.c

    r0e39834 r264a446  
    4343 
    4444#include "vlc_interface.h" 
     45#include "modules/modules.h" // Gruik! 
    4546 
    4647#ifdef __APPLE__ 
  • src/libvlc-common.c

    r2eeecb4 r264a446  
    288288 
    289289    /* Hack: insert the help module here */ 
    290     p_help_module = vlc_object_create( p_libvlc, VLC_OBJECT_MODULE ); 
     290    p_help_module = vlc_module_create( p_libvlc ); 
    291291    if( p_help_module == NULL ) 
    292292    { 
  • src/misc/objects.c

    r0e39834 r264a446  
    221221            i_size = sizeof(libvlc_int_t); 
    222222            psz_type = "libvlc"; 
    223             break; 
    224         case VLC_OBJECT_MODULE: 
    225             i_size = sizeof(module_t); 
    226             psz_type = "module"; 
    227223            break; 
    228224        case VLC_OBJECT_INTF: 
  • src/modules/configuration.c

    r2eeecb4 r264a446  
    6565 
    6666#include "configuration.h" 
     67#include "modules/modules.h" 
    6768 
    6869static int ConfigStringToKey( const char * ); 
  • src/modules/entry.c

    ra1e8379 r264a446  
    2222#include <assert.h> 
    2323 
     24#include "modules/modules.h" 
     25#include "libvlc.h" 
     26 
    2427static const char default_name[] = "unnamed"; 
    2528 
    2629module_t *vlc_module_create (vlc_object_t *obj) 
    2730{ 
    28     module_t *module = vlc_object_create (obj, VLC_OBJECT_MODULE); 
     31    module_t *module = 
     32        (module_t *)vlc_custom_create (obj, sizeof (module_t), 
     33                                       VLC_OBJECT_MODULE, "module"); 
    2934    if (module == NULL) 
    3035        return NULL; 
     
    4954 
    5055    module_t *submodule = 
    51             (module_t *)vlc_object_create (module, VLC_OBJECT_MODULE); 
     56        (module_t *)vlc_custom_create (VLC_OBJECT (module), sizeof (module_t), 
     57                                       VLC_OBJECT_MODULE, "submodule"); 
    5258    if (submodule == NULL) 
    5359        return NULL; 
  • src/modules/modules.h

    r2eeecb4 r264a446  
    7171}; 
    7272 
     73 
     74#define MODULE_SHORTCUT_MAX 50 
     75 
     76/* The module handle type. */ 
     77#if defined(HAVE_DL_DYLD) 
     78#   if defined (HAVE_MACH_O_DYLD_H) 
     79#       include <mach-o/dyld.h> 
     80#   endif 
     81typedef NSModule module_handle_t; 
     82#elif defined(HAVE_IMAGE_H) 
     83typedef int module_handle_t; 
     84#elif defined(WIN32) || defined(UNDER_CE) 
     85typedef void * module_handle_t; 
     86#elif defined(HAVE_DL_DLOPEN) 
     87typedef void * module_handle_t; 
     88#elif defined(HAVE_DL_SHL_LOAD) 
     89typedef shl_t module_handle_t; 
     90#endif 
     91 
     92/** 
     93 * Internal module descriptor 
     94 */ 
     95struct module_t 
     96{ 
     97    VLC_COMMON_MEMBERS 
     98 
     99    /* 
     100     * Variables set by the module to identify itself 
     101     */ 
     102    const char *psz_shortname;                              /**< Module name */ 
     103    const char *psz_longname;                   /**< Module descriptive name */ 
     104    const char *psz_help;        /**< Long help string for "special" modules */ 
     105 
     106    /* 
     107     * Variables set by the module to tell us what it can do 
     108     */ 
     109    const char *psz_program; /**< Program name which will activate the module */ 
     110 
     111    /** Shortcuts to the module */ 
     112    const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ]; 
     113 
     114    const char    *psz_capability;                           /**< Capability */ 
     115    int      i_score;                          /**< Score for the capability */ 
     116    uint32_t i_cpu;                           /**< Required CPU capabilities */ 
     117 
     118    vlc_bool_t b_unloadable;                        /**< Can we be dlclosed? */ 
     119    vlc_bool_t b_reentrant;                           /**< Are we reentrant? */ 
     120    vlc_bool_t b_submodule;                        /**< Is this a submodule? */ 
     121 
     122    /* Callbacks */ 
     123    int  ( * pf_activate )   ( vlc_object_t * ); 
     124    void ( * pf_deactivate ) ( vlc_object_t * ); 
     125 
     126    /* 
     127     * Variables set by the module to store its config options 
     128     */ 
     129    module_config_t *p_config;             /* Module configuration structure */ 
     130    size_t           confsize;            /* Number of module_config_t items */ 
     131    unsigned int     i_config_items;        /* number of configuration items */ 
     132    unsigned int     i_bool_items;            /* number of bool config items */ 
     133 
     134    /* 
     135     * Variables used internally by the module manager 
     136     */ 
     137    /* Plugin-specific stuff */ 
     138    module_handle_t     handle;                             /* Unique handle */ 
     139    char *              psz_filename;                     /* Module filename */ 
     140 
     141    vlc_bool_t          b_builtin;  /* Set to true if the module is built in */ 
     142    vlc_bool_t          b_loaded;        /* Set to true if the dll is loaded */ 
     143 
     144#ifndef HAVE_SHARED_LIBVLC 
     145    /* Legacy symbols table */ 
     146    module_symbols_t *p_symbols; 
     147#endif 
     148}; 
     149 
     150 
    73151#define module_InitBank(a)     __module_InitBank(VLC_OBJECT(a)) 
    74152void  __module_InitBank        ( vlc_object_t * ); 
  • src/video_output/video_output.c

    r0e39834 r264a446  
    5454#include "input/input_internal.h" 
    5555 
     56#include "modules/modules.h" 
     57 
    5658/***************************************************************************** 
    5759 * Local prototypes