]> git.sesse.net Git - vlc/commitdiff
* src/input/input.c: honor the --demux config option (will be overriden if demux...
authorGildas Bazin <gbazin@videolan.org>
Wed, 5 Nov 2003 17:57:29 +0000 (17:57 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 5 Nov 2003 17:57:29 +0000 (17:57 +0000)
   I'm not exactly sure this is wise as some users will surely fuck-up their preferences and force a specific demux...
   but this also allows me to specifiy the demuxdump demux with an input option (very handy to include the demuxdump option in the streamout gui dialogs).
* src/misc/modules.c: changed module_Need() to use var_Get() instead of config_Get.

* modules/gui/wxwindows/*: moved the demuxdump option from the open dialog to the streamout dialog.

modules/demux/demuxdump.c
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/streamout.cpp
modules/gui/wxwindows/wxwindows.h
src/input/input.c
src/misc/configuration.c
src/misc/modules.c
src/misc/variables.c

index c759a8698a71f9050b1359a91d92417a320d550d..ccf25bd85d65e80693dfad2dcee2829f2709f5b2 100644 (file)
@@ -2,7 +2,7 @@
  * demuxdump.c : Pseudo demux module for vlc (dump raw stream)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: demuxdump.c,v 1.10 2003/09/07 22:48:29 fenrir Exp $
+ * $Id: demuxdump.c,v 1.11 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -79,7 +79,7 @@ static int Activate( vlc_object_t * p_this )
 {
     input_thread_t      *p_input = (input_thread_t *)p_this;
     demux_sys_t         *p_demux;
-
+    vlc_value_t         val;
     char                *psz_name;
 
     /* Set the demux function */
@@ -93,7 +93,9 @@ static int Activate( vlc_object_t * p_this )
         p_input->i_bufsize = INPUT_DEFAULT_BUFSIZE;
     }
     
-    psz_name = config_GetPsz( p_input, "demuxdump-file" );
+    var_Create( p_input, "demuxdump-file", VLC_VAR_FILE|VLC_VAR_DOINHERIT );
+    var_Get( p_input, "demuxdump-file", &val );
+    psz_name = val.psz_string;
     if( !psz_name || !*psz_name )
     {
         msg_Warn( p_input, "no dump file name given" );
index 58df0838bb6f69955b8f77a871cf79687e364ba8..b7c243287c49c85e4b29c68b608451d053066592 100644 (file)
@@ -2,7 +2,7 @@
  * open.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.39 2003/10/29 17:32:54 zorglub Exp $
+ * $Id: open.cpp,v 1.40 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -91,10 +91,6 @@ enum
 
     SoutEnable_Event,
     SoutSettings_Event,
-
-    DemuxDump_Event,
-    DemuxDumpEnable_Event,
-    DemuxDumpBrowse_Event,
 };
 
 BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
@@ -147,11 +143,6 @@ BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
     EVT_CHECKBOX(SoutEnable_Event, OpenDialog::OnSoutEnable)
     EVT_BUTTON(SoutSettings_Event, OpenDialog::OnSoutSettings)
 
-    /* Events generated by the demux dump buttons */
-    EVT_CHECKBOX(DemuxDumpEnable_Event, OpenDialog::OnDemuxDumpEnable)
-    EVT_TEXT(DemuxDump_Event, OpenDialog::OnDemuxDumpChange)
-    EVT_BUTTON(DemuxDumpBrowse_Event, OpenDialog::OnDemuxDumpBrowse)
-
     /* Hide the window when the user closes the window */
     EVT_CLOSE(OpenDialog::OnCancel)
 
@@ -184,7 +175,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
 #endif
     sout_dialog = NULL;
     subsfile_dialog = NULL;
-    demuxdump_dialog = NULL;
 
     /* Create a panel to put everything in */
     wxPanel *panel = new wxPanel( this, -1 );
@@ -216,12 +206,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
               "following predefined targets:")) );
 
     wxFlexGridSizer *sout_sizer = NULL;
-    wxBoxSizer *demuxdump_sizer = NULL;
     wxStaticLine *static_line = NULL;
 
-    demuxdump_checkbox = NULL;
-    demuxdump_textctrl = NULL;
-
     if( i_method == OPEN_NORMAL )
     {
         /* Create Stream Output checkox */
@@ -249,33 +235,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
         sout_sizer->Add( sout_button, 1, wxALIGN_LEFT |
                          wxALIGN_CENTER_VERTICAL );
 
-        /* Create Demux Dump checkox */
-        demuxdump_sizer = new wxBoxSizer( wxHORIZONTAL );
-        demuxdump_checkbox = new wxCheckBox( panel, DemuxDumpEnable_Event,
-                                   wxU(_("Capture input stream")) );
-        demuxdump_checkbox->SetToolTip(
-             wxU(_("Capture the stream you are playing to a file")) );
-        demuxdump_textctrl = new wxTextCtrl( panel, DemuxDump_Event, wxT(""),
-                                             wxDefaultPosition, wxDefaultSize,
-                                             wxTE_PROCESS_ENTER );
-       demuxdump_button = new wxButton( panel, DemuxDumpBrowse_Event,
-                                         wxU(_("Browse...")) );
-
-        char *psz_demuxdump = config_GetPsz( p_intf, "demuxdump-file" );
-        if( psz_demuxdump && *psz_demuxdump )
-        {
-            demuxdump_textctrl->SetValue( wxU(psz_demuxdump) );
-        }
-        if( psz_demuxdump ) free( psz_demuxdump );
-
-        demuxdump_textctrl->Disable();
-        demuxdump_button->Disable();
-        demuxdump_sizer->Add( demuxdump_checkbox, 0,
-                               wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
-        demuxdump_sizer->Add( demuxdump_button, 0,
-                              wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, 10 );
-        demuxdump_sizer->Add( demuxdump_textctrl, 1, wxRIGHT, 10 );
-
         /* Separation */
         static_line = new wxStaticLine( panel, wxID_OK );
     }
@@ -335,8 +294,6 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
     if( i_method == OPEN_NORMAL)
     {
         panel_sizer->Add( sout_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
-        panel_sizer->Add( demuxdump_sizer, 0, wxEXPAND | wxALIGN_LEFT
-                          | wxALL, 5 );
         panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
     }
     panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
@@ -356,7 +313,6 @@ OpenDialog::~OpenDialog()
 #endif
     if( sout_dialog ) delete sout_dialog;
     if( subsfile_dialog ) delete subsfile_dialog;
-    if( demuxdump_dialog ) delete demuxdump_dialog;
 }
 
 int OpenDialog::Show( int i_access_method, int i_arg )
@@ -639,14 +595,6 @@ void OpenDialog::UpdateMRL( int i_access_method )
 
     i_current_access_method = i_access_method;
 
-    /* Check if the user asked for demuxdump */
-    if( demuxdump_checkbox )
-    {
-        if( demuxdump_checkbox->GetValue() )
-        {
-            demux = wxT("/demuxdump");
-        }
-    }
     switch( i_access_method )
     {
     case FILE_ACCESS:
@@ -1013,16 +961,6 @@ void OpenDialog::OnV4LSettingsChange( wxCommandEvent& WXUNUSED(event) )
 void OpenDialog::OnSubsFileEnable( wxCommandEvent& event )
 {
     subsfile_button->Enable( event.GetInt() != 0 );
-    if( demuxdump_checkbox )
-    {
-        if( event.GetInt() && demuxdump_checkbox->IsChecked() )
-        {
-            demuxdump_checkbox->SetValue( 0 );
-            wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
-            event.SetInt( 0 );
-            OnDemuxDumpEnable( event );
-        }
-    }
 }
 
 void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
@@ -1052,13 +990,6 @@ void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
 void OpenDialog::OnSoutEnable( wxCommandEvent& event )
 {
     sout_button->Enable( event.GetInt() != 0 );
-    if( event.GetInt() && demuxdump_checkbox->IsChecked() )
-    {
-        demuxdump_checkbox->SetValue( 0 );
-        wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
-        event.SetInt( 0 );
-        OnDemuxDumpEnable( event );
-    }
 }
 
 void OpenDialog::OnSoutSettings( wxCommandEvent& WXUNUSED(event) )
@@ -1073,47 +1004,6 @@ void OpenDialog::OnSoutSettings( wxCommandEvent& WXUNUSED(event) )
     }
 }
 
-/*****************************************************************************
- * Demux dump event methods.
- *****************************************************************************/
-void OpenDialog::OnDemuxDumpEnable( wxCommandEvent& event )
-{
-    demuxdump_textctrl->Enable( event.GetInt() != 0 );
-    demuxdump_button->Enable( event.GetInt() != 0 );
-
-    if( event.GetInt() )
-    {
-        sout_checkbox->SetValue( 0 );
-        subsfile_checkbox->SetValue( 0 );
-        wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
-        event.SetInt( 0 );
-        OnSoutEnable( event );
-        OnSubsFileEnable( event );
-    }
-
-    UpdateMRL( i_current_access_method );
-}
-
-void OpenDialog::OnDemuxDumpBrowse( wxCommandEvent& WXUNUSED(event) )
-{
-    if( demuxdump_dialog == NULL )
-        demuxdump_dialog = new wxFileDialog( this, wxU(_("Save file")),
-                               wxT(""), wxT(""), wxT("*"), wxSAVE );
-
-    if( demuxdump_dialog && demuxdump_dialog->ShowModal() == wxID_OK )
-    {
-        demuxdump_textctrl->SetValue( demuxdump_dialog->GetPath() );
-        wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
-        OnDemuxDumpChange( event );
-    }
-}
-
-void OpenDialog::OnDemuxDumpChange( wxCommandEvent& WXUNUSED(event) )
-{
-    config_PutPsz( p_intf, "demuxdump-file",
-                   demuxdump_textctrl->GetValue().mb_str() );
-}
-
 /*****************************************************************************
  * Utility functions.
  *****************************************************************************/
index b0e80c39b5e59ad3f34d8a08f51bcf488da2d93b..accd45d245e234c6e42480a6e9dd6568a9cfa224 100644 (file)
@@ -2,7 +2,7 @@
  * streamout.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.33 2003/10/27 22:13:36 gbazin Exp $
+ * $Id: streamout.cpp,v 1.34 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -55,6 +55,7 @@ enum
 
     FileBrowse_Event,
     FileName_Event,
+    FileDump_Event,
 
     AccessType1_Event, AccessType2_Event, AccessType3_Event,
     AccessType4_Event, AccessType5_Event, AccessType6_Event,
@@ -87,6 +88,7 @@ BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
     EVT_CHECKBOX(AccessType6_Event, SoutDialog::OnAccessTypeChange)
     EVT_TEXT(FileName_Event, SoutDialog::OnFileChange)
     EVT_BUTTON(FileBrowse_Event, SoutDialog::OnFileBrowse)
+    EVT_CHECKBOX(FileDump_Event, SoutDialog::OnFileDump)
 
     EVT_TEXT(NetPort1_Event, SoutDialog::OnNetChange)
     EVT_TEXT(NetAddr1_Event, SoutDialog::OnNetChange)
@@ -136,6 +138,33 @@ BEGIN_EVENT_TABLE(SoutDialog, wxDialog)
 
 END_EVENT_TABLE()
 
+#if 0
+/*****************************************************************************
+ * Demux dump event methods.
+ *****************************************************************************/
+void OpenDialog::OnDemuxDumpEnable( wxCommandEvent& event )
+{
+    demuxdump_textctrl->Enable( event.GetInt() != 0 );
+    demuxdump_button->Enable( event.GetInt() != 0 );
+
+    if( event.GetInt() )
+    {
+        sout_checkbox->SetValue( 0 );
+        subsfile_checkbox->SetValue( 0 );
+        wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
+        event.SetInt( 0 );
+        OnSoutEnable( event );
+        OnSubsFileEnable( event );
+    }
+
+    UpdateMRL( i_current_access_method );
+}
+
+void OpenDialog::OnDemuxDumpChange( wxCommandEvent& WXUNUSED(event) )
+{
+}
+#endif
+
 /*****************************************************************************
  * Constructor.
  *****************************************************************************/
@@ -171,16 +200,16 @@ SoutDialog::SoutDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
     mrl_sizer_sizer->Add( mrl_sizer, 1, wxEXPAND | wxALL, 5 );
 
     /* Create the output encapsulation panel */
-    wxPanel *encapsulation_panel = EncapsulationPanel( panel );
+    encapsulation_panel = EncapsulationPanel( panel );
 
     /* Create the access output panel */
-    wxPanel *access_panel = AccessPanel( panel );
+    access_panel = AccessPanel( panel );
 
     /* Create the transcoding panel */
-    wxPanel *transcoding_panel = TranscodingPanel( panel );
+    transcoding_panel = TranscodingPanel( panel );
 
     /* Create the Misc panel */
-    wxPanel *misc_panel = MiscPanel( panel );
+    misc_panel = MiscPanel( panel );
 
     /* Separation */
     wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
@@ -227,6 +256,19 @@ wxArrayString SoutDialog::GetOptions()
  *****************************************************************************/
 void SoutDialog::UpdateMRL()
 {
+    /* Check the demux dump option */
+    if( dump_checkbox->IsChecked() )
+    {
+        wxString dumpfile;
+
+        if( file_combo->GetValue().size() )
+            dumpfile = wxT(" :demuxdump-file=\"") +
+                       file_combo->GetValue() + wxT("\"");
+        mrl_combo->SetValue( wxT(":demux=demuxdump") + dumpfile );
+
+        return;
+    }
+
     /* Let's start with the transcode options */
     wxString transcode;
     if( video_transc_checkbox->IsChecked() ||
@@ -404,7 +446,7 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent )
     access_subpanels[0]->Hide();
 
     /* File row */
-    subpanel_sizer = new wxFlexGridSizer( 3, 1, 20 );
+    subpanel_sizer = new wxFlexGridSizer( 3, 2, 20 );
     label = new wxStaticText( access_subpanels[1], -1, wxU(_("Filename")) );
     file_combo = new wxComboBox( access_subpanels[1], FileName_Event, wxT(""),
                                  wxPoint(20,25), wxSize(200, -1), 0, NULL );
@@ -415,6 +457,14 @@ wxPanel *SoutDialog::AccessPanel( wxWindow* parent )
                          wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
     subpanel_sizer->Add( browse_button, 0,
                          wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
+    subpanel_sizer->Add( new wxPanel(access_subpanels[1], -1), 0,
+                         wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+    subpanel_sizer->Add( new wxPanel(access_subpanels[1], -1), 0,
+                         wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
+    dump_checkbox = new wxCheckBox( access_subpanels[1], FileDump_Event,
+                                    wxU(_("Dump raw input")) );
+    subpanel_sizer->Add( dump_checkbox, 0,
+                         wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, 5 );
 
     access_subpanels[1]->SetSizerAndFit( subpanel_sizer );
 
@@ -817,6 +867,24 @@ void SoutDialog::OnFileBrowse( wxCommandEvent& WXUNUSED(event) )
     }
 }
 
+void SoutDialog::OnFileDump( wxCommandEvent& event )
+{
+    misc_panel->Enable( !event.GetInt() );
+    encapsulation_panel->Enable( !event.GetInt() );
+    transcoding_panel->Enable( !event.GetInt() );
+
+    for( int i = 0; i < ACCESS_OUT_NUM; i++ )
+    {
+        if( i != FILE_ACCESS_OUT )
+        {
+            access_subpanels[i]->Enable( !event.GetInt() );
+            access_checkboxes[i]->Enable( !event.GetInt() );
+        }
+    }
+
+    UpdateMRL();
+}
+
 /*****************************************************************************
  * Net access output event methods.
  *****************************************************************************/
index ddecc9c94a580f1b431146d04d43205cc77ea917..dacb1debdcdef5cfb3eef9a73e4490594349f2b4 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.66 2003/10/29 17:32:54 zorglub Exp $
+ * $Id: wxwindows.h,v 1.67 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -351,11 +351,6 @@ private:
     void OnSoutEnable( wxCommandEvent& event );
     void OnSoutSettings( wxCommandEvent& WXUNUSED(event) );
 
-    /* Event handlers for the demux dump */
-    void OnDemuxDumpEnable( wxCommandEvent& event );
-    void OnDemuxDumpBrowse( wxCommandEvent& event );
-    void OnDemuxDumpChange( wxCommandEvent& event );
-
     DECLARE_EVENT_TABLE();
 
     intf_thread_t *p_intf;
@@ -406,12 +401,6 @@ private:
     wxCheckBox *sout_checkbox;
     SoutDialog *sout_dialog;
     wxArrayString sout_mrl;
-
-    /* Controls for the demux dump */
-    wxTextCtrl *demuxdump_textctrl;
-    wxButton *demuxdump_button;
-    wxCheckBox *demuxdump_checkbox;
-    wxFileDialog *demuxdump_dialog;
 };
 
 enum
@@ -549,6 +538,7 @@ private:
     /* Event handlers for the file access output */
     void OnFileChange( wxCommandEvent& event );
     void OnFileBrowse( wxCommandEvent& event );
+    void OnFileDump( wxCommandEvent& event );
 
     /* Event handlers for the net access output */
     void OnNetChange( wxCommandEvent& event );
@@ -575,26 +565,31 @@ private:
     wxComboBox *mrl_combo;
 
     /* Controls for the access outputs */
+    wxPanel *access_panel;
     wxPanel *access_subpanels[ACCESS_OUT_NUM];
     wxCheckBox *access_checkboxes[ACCESS_OUT_NUM];
 
     int i_access_type;
 
     wxComboBox *file_combo;
+    wxCheckBox *dump_checkbox;
     wxSpinCtrl *net_ports[ACCESS_OUT_NUM];
     wxTextCtrl *net_addrs[ACCESS_OUT_NUM];
 
     /* Controls for the SAP announces */
+    wxPanel *misc_panel;
     wxPanel *misc_subpanels[MISC_SOUT_NUM];
     wxCheckBox *sap_checkbox;
     wxCheckBox *slp_checkbox;
     wxTextCtrl *announce_addr;
 
     /* Controls for the encapsulation */
+    wxPanel *encapsulation_panel;
     wxRadioButton *encapsulation_radios[ENCAPS_NUM];
     int i_encapsulation_type;
 
     /* Controls for transcoding */
+    wxPanel *transcoding_panel;
     wxCheckBox *video_transc_checkbox;
     wxComboBox *video_codec_combo;
     wxComboBox *audio_codec_combo;
index a1a8966f92e00ea402891ca64c34ea8b0271d994..7b22f909b0c10ca5aa61e3808ffed36a2f9b8ccd 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: input.c,v 1.251 2003/11/04 02:23:11 fenrir Exp $
+ * $Id: input.c,v 1.252 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -706,8 +706,10 @@ static int InitThread( input_thread_t * p_input )
     }
 
     /* Find and open appropriate demux module */
-    p_input->p_demux = module_Need( p_input, "demux",
-                                    p_input->psz_demux );
+    p_input->p_demux =
+        module_Need( p_input, "demux",
+                     (p_input->psz_demux && *p_input->psz_demux) ?
+                     p_input->psz_demux : "$demux" );
 
     if( p_input->p_demux == NULL )
     {
@@ -944,6 +946,7 @@ static void ParseOption( input_thread_t *p_input, const char *psz_option )
         break;
 
     case VLC_VAR_STRING:
+    case VLC_VAR_MODULE:
     case VLC_VAR_FILE:
     case VLC_VAR_DIRECTORY:
         val.psz_string = psz_value;
index 441834f2635e241fb5531ecd64eff8649c207f73..8f153257f8b1d46dda3ebf7ae3e2fd5fe2ba4f48 100644 (file)
@@ -2,7 +2,7 @@
  * configuration.c management of the modules configuration
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.67 2003/11/05 00:39:17 gbazin Exp $
+ * $Id: configuration.c,v 1.68 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -95,6 +95,9 @@ int __config_GetType( vlc_object_t *p_this, const char *psz_name )
         break;
 
     case CONFIG_ITEM_MODULE:
+        i_type = VLC_VAR_MODULE;
+        break;
+
     case CONFIG_ITEM_STRING:
         i_type = VLC_VAR_STRING;
         break;
index 1e9d04f14a73c6dc2ae481ecd0d952b567e33273..8ba1e410c85a40a40b8bf0f53251463ccdaefefe 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Builtin and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.137 2003/10/07 09:32:48 gbazin Exp $
+ * $Id: modules.c,v 1.138 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Sam Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -288,7 +288,10 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
     /* Deal with variables */
     if( psz_name && psz_name[0] == '$' )
     {
-        psz_var = config_GetPsz( p_this, psz_name + 1 );
+        vlc_value_t val;
+        var_Create( p_this, psz_name + 1, VLC_VAR_MODULE | VLC_VAR_DOINHERIT );
+        var_Get( p_this, psz_name + 1, &val );
+        psz_var = val.psz_string;
         psz_name = psz_var;
     }
 
index 49ecd73f63a4d4c1ca9d8b8a5de938f2dc0bfd95..59d6b9a94c6f1c3b3cef38258c0a6ee0ad97bd28 100644 (file)
@@ -2,7 +2,7 @@
  * variables.c: routines for object variables handling
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: variables.c,v 1.33 2003/10/29 01:33:27 gbazin Exp $
+ * $Id: variables.c,v 1.34 2003/11/05 17:57:29 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -1156,6 +1156,7 @@ static int InheritValue( vlc_object_t *p_this, const char *psz_name,
         case VLC_VAR_FILE:
         case VLC_VAR_DIRECTORY:
         case VLC_VAR_STRING:
+        case VLC_VAR_MODULE:
             p_val->psz_string = config_GetPsz( p_this, psz_name );
             if( !p_val->psz_string ) p_val->psz_string = strdup("");
             break;