* modules/misc/freetype.c: bail out if no font has been specified.
* modules/demux/util/sub.h: don't forget to detach the demuxsub object.
* sub.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: sub.h,v 1.5 2003/07/23 23:05:25 gbazin Exp $
+ * $Id: sub.h,v 1.6 2003/07/24 21:50:28 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
else
{
msg_Warn( p_input, "failed to start subtitle demux" );
+ vlc_object_detach( p_sub );
if( p_sub->p_module )
{
module_Unneed( p_sub, p_sub->p_module );
static inline void subtitle_Close( subtitle_demux_t *p_sub )
{
msg_Info( p_sub, "subtitle stopped" );
- if( p_sub->p_module )
- {
- module_Unneed( p_sub, p_sub->p_module );
- }
if( p_sub )
{
+ vlc_object_detach( p_sub );
+ if( p_sub->p_module )
+ {
+ module_Unneed( p_sub, p_sub->p_module );
+ }
vlc_object_destroy( p_sub );
}
}
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.31 2003/07/24 17:31:59 gbazin Exp $
+ * $Id: open.cpp,v 1.32 2003/07/24 21:50:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
mrl_combo->SetValue( mrltemp );
}
-wxArrayString OpenDialog::SeparateEntries( wxString entries )
-{
- vlc_bool_t b_quotes_mode = VLC_FALSE;
-
- wxArrayString entries_array;
- wxString entry;
-
- wxStringTokenizer token( entries, wxT(" \t\r\n\""), wxTOKEN_RET_DELIMS );
-
- while( token.HasMoreTokens() )
- {
- entry += token.GetNextToken();
-
- if( entry.IsEmpty() ) continue;
-
- if( !b_quotes_mode && entry.Last() == wxT('\"') )
- {
- /* Enters quotes mode */
- entry.RemoveLast();
- b_quotes_mode = VLC_TRUE;
- }
- else if( b_quotes_mode && entry.Last() == wxT('\"') )
- {
- /* Finished the quotes mode */
- entry.RemoveLast();
- if( !entry.IsEmpty() ) entries_array.Add( entry );
- entry.Empty();
- b_quotes_mode = VLC_FALSE;
- }
- else if( !b_quotes_mode && entry.Last() != wxT('\"') )
- {
- /* we found a non-quoted standalone string */
- if( token.HasMoreTokens() ||
- entry.Last() == wxT(' ') || entry.Last() == wxT('\t') ||
- entry.Last() == wxT('\r') || entry.Last() == wxT('\n') )
- entry.RemoveLast();
- if( !entry.IsEmpty() ) entries_array.Add( entry );
- entry.Empty();
- }
- else
- {;}
- }
-
- if( !entry.IsEmpty() ) entries_array.Add( entry );
-
- return entries_array;
-}
-
/*****************************************************************************
* Events methods.
*****************************************************************************/
if( sout_dialog && sout_dialog->ShowModal() == wxID_OK )
{
- sout_mrl.Empty();
- sout_mrl.Add( wxString(wxT("sout=")) + sout_dialog->mrl );
+ sout_mrl = sout_dialog->GetOptions();
}
}
config_PutPsz( p_intf, "demuxdump-file",
demuxdump_textctrl->GetValue().mb_str() );
}
+
+/*****************************************************************************
+ * Utility functions.
+ *****************************************************************************/
+wxArrayString SeparateEntries( wxString entries )
+{
+ vlc_bool_t b_quotes_mode = VLC_FALSE;
+
+ wxArrayString entries_array;
+ wxString entry;
+
+ wxStringTokenizer token( entries, wxT(" \t\r\n\""), wxTOKEN_RET_DELIMS );
+
+ while( token.HasMoreTokens() )
+ {
+ entry += token.GetNextToken();
+
+ if( entry.IsEmpty() ) continue;
+
+ if( !b_quotes_mode && entry.Last() == wxT('\"') )
+ {
+ /* Enters quotes mode */
+ entry.RemoveLast();
+ b_quotes_mode = VLC_TRUE;
+ }
+ else if( b_quotes_mode && entry.Last() == wxT('\"') )
+ {
+ /* Finished the quotes mode */
+ entry.RemoveLast();
+ if( !entry.IsEmpty() ) entries_array.Add( entry );
+ entry.Empty();
+ b_quotes_mode = VLC_FALSE;
+ }
+ else if( !b_quotes_mode && entry.Last() != wxT('\"') )
+ {
+ /* we found a non-quoted standalone string */
+ if( token.HasMoreTokens() ||
+ entry.Last() == wxT(' ') || entry.Last() == wxT('\t') ||
+ entry.Last() == wxT('\r') || entry.Last() == wxT('\n') )
+ entry.RemoveLast();
+ if( !entry.IsEmpty() ) entries_array.Add( entry );
+ entry.Empty();
+ }
+ else
+ {;}
+ }
+
+ if( !entry.IsEmpty() ) entries_array.Add( entry );
+
+ return entries_array;
+}
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.26 2003/07/20 21:28:52 gbazin Exp $
+ * $Id: streamout.cpp,v 1.27 2003/07/24 21:50:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#include <vlc/intf.h>
-#if defined MODULE_NAME_IS_skins
-# include "../skins/src/skin_common.h"
-#endif
-
#include "wxwindows.h"
#ifndef wxRB_SINGLE
{
}
+wxArrayString SoutDialog::GetOptions()
+{
+ return SeparateEntries( mrl_combo->GetValue() );
+}
+
/*****************************************************************************
* Private methods.
*****************************************************************************/
}
if( !transcode.IsEmpty() || !duplicate.IsEmpty() )
- mrl_combo->SetValue( wxT("#") + transcode + duplicate );
+ mrl_combo->SetValue( wxT(":sout=#") + transcode + duplicate );
else
mrl_combo->SetValue( wxT("") );
}
void SoutDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
{
mrl_combo->Append( mrl_combo->GetValue() );
- mrl = mrl_combo->GetValue();
EndModal( wxID_OK );
-
}
void SoutDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.48 2003/07/24 16:07:10 gbazin Exp $
+ * $Id: wxwindows.h,v 1.49 2003/07/24 21:50:28 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
#endif
-#if !defined(MODULE_NAME_IS_skins)
+wxArrayString SeparateEntries( wxString );
+
/*****************************************************************************
* intf_sys_t: description and status of wxwindows interface
*****************************************************************************/
wxMenu *p_popup_menu;
};
-#endif /* !defined(MODULE_NAME_IS_skins) */
/*****************************************************************************
* Prototypes
wxPanel *SatPanel( wxWindow* parent );
void UpdateMRL( int i_access_method );
- wxArrayString SeparateEntries( wxString );
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
SoutDialog( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~SoutDialog();
- wxString mrl;
+ wxArrayString GetOptions();
private:
void UpdateMRL();
* freetype.c : Put text on the video, using freetype2
*****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN
- * $Id: freetype.c,v 1.12 2003/07/24 19:30:27 sigmunau Exp $
+ * $Id: freetype.c,v 1.13 2003/07/24 21:50:28 gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
strcat( psz_fontfile, "\\fonts\\arial.ttf" );
#elif SYS_DARWIN
strcpy( psz_fontfile, DEFAULT_FONT );
+#else
+ msg_Err( p_vout, "user didn't specify a font" );
+ free( p_vout->p_text_renderer_data );
+ return VLC_EGENERIC;
#endif
}