Commit 0562366c authored by ipkiss's avatar ipkiss
Browse files

* compilation fix

 * all files are stored in dos mode, or Borland won't compile some of
   them...
parent 3fedb969
/*****************************************************************************
* about.cpp: The "About" dialog box
*****************************************************************************
* Copyright (C) 2002 VideoLAN
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <vcl.h>
#pragma hdrstop
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "about.h"
#include "misc.h"
#include "win32_common.h"
//---------------------------------------------------------------------------
//#pragma package(smart_init)
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
__fastcall TAboutDlg::TAboutDlg( TComponent* Owner, intf_thread_t *_p_intf )
: TForm( Owner )
{
p_intf = _p_intf;
Image1->Picture->Icon = p_intf->p_sys->p_window->Icon;
LabelVersion->Caption = "Version " VERSION;
Translate( this );
}
//---------------------------------------------------------------------------
/*****************************************************************************
* about.cpp: The "About" dialog box
*****************************************************************************
* Copyright (C) 2002 VideoLAN
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <vcl.h>
#pragma hdrstop
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "about.h"
#include "misc.h"
#include "win32_common.h"
//---------------------------------------------------------------------------
//#pragma package(smart_init)
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
__fastcall TAboutDlg::TAboutDlg( TComponent* Owner, intf_thread_t *_p_intf )
: TForm( Owner )
{
p_intf = _p_intf;
Image1->Picture->Icon = p_intf->p_sys->p_window->Icon;
LabelVersion->Caption = "Version " VERSION;
Translate( this );
}
//---------------------------------------------------------------------------
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* menu.h: prototypes for menu functions
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: menu.h,v 1.4 2003/01/23 03:33:34 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef menuH
#define menuH
//----------------------------------------------------------------------------
class TMenusGen : public TObject
{
private:
intf_thread_t *p_intf;
/* local pointers to main window menu items */
TMenuItem *MenuChannel;
TMenuItem *PopupChannel;
TMenuItem *MenuADevice;
TMenuItem *PopupADevice;
TMenuItem *MenuVDevice;
TMenuItem *PopupVDevice;
TMenuItem *MenuLanguage;
TMenuItem *PopupLanguage;
TMenuItem *MenuSubtitles;
TMenuItem *PopupSubtitles;
TMenuItem *MenuProgram;
TMenuItem *PopupProgram;
TMenuItem *MenuTitle;
TMenuItem *MenuChapter;
TMenuItem *PopupNavigation;
TMenuItem *MenuAddInterface;
/* Language information */
es_descriptor_t * p_audio_es_old;
es_descriptor_t * p_spu_es_old;
/* Helpful functions */
int Item2Index( TMenuItem *Root, TMenuItem *Item );
TMenuItem *Index2Item( TMenuItem *Root, int i_index, bool SingleColumn );
int __fastcall Data2Title( int data );
int __fastcall Data2Chapter( int data );
int __fastcall Pos2Data( int title, int chapter );
AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption );
void __fastcall VarChange( vlc_object_t *, const char *, TMenuItem *,
TMenuItem *, TMenuItem * );
void __fastcall LangChange( TMenuItem *, TMenuItem *, TMenuItem *, int );
void __fastcall ProgramChange( TMenuItem *, TMenuItem * );
void __fastcall SetupVarMenu( vlc_object_t *, const char *, TMenuItem *,
TNotifyEvent );
void __fastcall SetupModuleMenu( const char *, TMenuItem *, TNotifyEvent );
void __fastcall ProgramMenu( TMenuItem *, pgrm_descriptor_t *,
TNotifyEvent );
void __fastcall RadioMenu( TMenuItem *, AnsiString, int, int,
TNotifyEvent );
void __fastcall LanguageMenu( TMenuItem *, es_descriptor_t *, int,
TNotifyEvent );
void __fastcall NavigationMenu( TMenuItem *, TNotifyEvent );
public:
__fastcall TMenusGen( intf_thread_t *_p_intf );
/* menu generation */
void __fastcall SetupMenus();
/* callbacks for menuitems */
void __fastcall AoutVarClick( TObject *Sender );
void __fastcall VoutVarClick( TObject *Sender );
void __fastcall InterfaceModuleClick( TObject *Sender );
void __fastcall MenuLanguageClick( TObject *Sender );
void __fastcall PopupLanguageClick( TObject *Sender );
void __fastcall MenuSubtitleClick( TObject *Sender );
void __fastcall PopupSubtitleClick( TObject *Sender );
void __fastcall MenuProgramClick( TObject *Sender );
void __fastcall PopupProgramClick( TObject *Sender );
void __fastcall MenuTitleClick( TObject *Sender );
void __fastcall MenuChapterClick( TObject *Sender );
void __fastcall PopupNavigationClick( TObject *Sender );
};
//----------------------------------------------------------------------------
#endif
/*****************************************************************************
* menu.h: prototypes for menu functions
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: menu.h,v 1.5 2003/02/12 02:11:58 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef menuH
#define menuH
//----------------------------------------------------------------------------
class TMenusGen : public TObject
{
private:
intf_thread_t *p_intf;
/* local pointers to main window menu items */
TMenuItem *MenuChannel;
TMenuItem *PopupChannel;
TMenuItem *MenuADevice;
TMenuItem *PopupADevice;
TMenuItem *MenuVDevice;
TMenuItem *PopupVDevice;
TMenuItem *MenuLanguage;
TMenuItem *PopupLanguage;
TMenuItem *MenuSubtitles;
TMenuItem *PopupSubtitles;
TMenuItem *MenuProgram;
TMenuItem *PopupProgram;
TMenuItem *MenuTitle;
TMenuItem *MenuChapter;
TMenuItem *PopupNavigation;
TMenuItem *MenuAddInterface;
/* Language information */
es_descriptor_t * p_audio_es_old;
es_descriptor_t * p_spu_es_old;
/* Helpful functions */
int Item2Index( TMenuItem *Root, TMenuItem *Item );
TMenuItem *Index2Item( TMenuItem *Root, int i_index, bool SingleColumn );
int __fastcall Data2Title( int data );
int __fastcall Data2Chapter( int data );
int __fastcall Pos2Data( int title, int chapter );
AnsiString __fastcall TMenusGen::CleanCaption( AnsiString Caption );
void __fastcall VarChange( vlc_object_t *, const char *, TMenuItem *,
TMenuItem *, TMenuItem * );
void __fastcall LangChange( TMenuItem *, TMenuItem *, TMenuItem *, int );
void __fastcall ProgramChange( TMenuItem *, TMenuItem * );
void __fastcall SetupVarMenu( vlc_object_t *, const char *, TMenuItem *,
TNotifyEvent );
void __fastcall SetupModuleMenu( const char *, TMenuItem *, TNotifyEvent );
void __fastcall ProgramMenu( TMenuItem *, pgrm_descriptor_t *,
TNotifyEvent );
void __fastcall RadioMenu( TMenuItem *, AnsiString, int, int,
TNotifyEvent );
void __fastcall LanguageMenu( TMenuItem *, es_descriptor_t *, int,
TNotifyEvent );
void __fastcall NavigationMenu( TMenuItem *, TNotifyEvent );
public:
__fastcall TMenusGen( intf_thread_t *_p_intf );
/* menu generation */
void __fastcall SetupMenus();
/* callbacks for menuitems */
void __fastcall AoutVarClick( TObject *Sender );
void __fastcall VoutVarClick( TObject *Sender );
void __fastcall InterfaceModuleClick( TObject *Sender );
void __fastcall MenuLanguageClick( TObject *Sender );
void __fastcall PopupLanguageClick( TObject *Sender );
void __fastcall MenuSubtitleClick( TObject *Sender );
void __fastcall PopupSubtitleClick( TObject *Sender );
void __fastcall MenuProgramClick( TObject *Sender );
void __fastcall PopupProgramClick( TObject *Sender );
void __fastcall MenuTitleClick( TObject *Sender );
void __fastcall MenuChapterClick( TObject *Sender );
void __fastcall PopupNavigationClick( TObject *Sender );
};
//----------------------------------------------------------------------------
#endif
/*****************************************************************************
* sout.h: the stream ouput dialog box
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: sout.h,v 1.3 2003/01/26 03:55:36 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef soutH
#define soutH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "CSPIN.h"
#include <Dialogs.hpp>
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class TSoutDlg : public TForm
{
__published: // IDE-managed Components
TGroupBox *GroupBoxStreamOut;
TEdit *EditMrl;
TPanel *PanelAccess;
TRadioButton *RadioButtonFile;
TRadioButton *RadioButtonUDP;
TRadioButton *RadioButtonRTP;
TOpenDialog *OpenDialog1;
TButton *ButtonBrowse;
TEdit *EditFile;
TCSpinEdit *SpinEditPort;
TEdit *EditAddress;
TLabel *LabelPort;
TLabel *LabelAddress;
TPanel *PanelMux;
TRadioButton *RadioButtonPS;
TRadioButton *RadioButtonTS;
TButton *ButtonOK;
TButton *ButtonCancel;
void __fastcall ButtonBrowseClick( TObject *Sender );
void __fastcall CustomEditChange( TObject *Sender );
void __fastcall RadioButtonMuxClick( TObject *Sender );
void __fastcall RadioButtonAccessClick( TObject *Sender );
void __fastcall ButtonOKClick( TObject *Sender );
private: // User declarations
void __fastcall RebuildMrl();
intf_thread_t *p_intf;
public: // User declarations
__fastcall TSoutDlg( TComponent* Owner, intf_thread_t *_p_intf );
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* sout.h: the stream ouput dialog box
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: sout.h,v 1.4 2003/02/12 02:11:58 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef soutH
#define soutH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include "CSPIN.h"
#include <Dialogs.hpp>
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class TSoutDlg : public TForm
{
__published: // IDE-managed Components
TGroupBox *GroupBoxStreamOut;
TEdit *EditMrl;
TPanel *PanelAccess;
TRadioButton *RadioButtonFile;
TRadioButton *RadioButtonUDP;
TRadioButton *RadioButtonRTP;
TOpenDialog *OpenDialog1;
TButton *ButtonBrowse;
TEdit *EditFile;
TCSpinEdit *SpinEditPort;
TEdit *EditAddress;
TLabel *LabelPort;
TLabel *LabelAddress;
TPanel *PanelMux;
TRadioButton *RadioButtonPS;
TRadioButton *RadioButtonTS;
TButton *ButtonOK;
TButton *ButtonCancel;
void __fastcall ButtonBrowseClick( TObject *Sender );
void __fastcall CustomEditChange( TObject *Sender );
void __fastcall RadioButtonMuxClick( TObject *Sender );
void __fastcall RadioButtonAccessClick( TObject *Sender );
void __fastcall ButtonOKClick( TObject *Sender );
private: // User declarations
void __fastcall RebuildMrl();
intf_thread_t *p_intf;
public: // User declarations
__fastcall TSoutDlg( TComponent* Owner, intf_thread_t *_p_intf );
};
//---------------------------------------------------------------------------
#endif
/*****************************************************************************
* subtitles.cpp: Dialog box for divx subtitle selection
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: subtitles.cpp,v 1.2 2003/01/26 03:55:36 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <vcl.h>
#pragma hdrstop
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "subtitles.h"
#include "misc.h"
#include "win32_common.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
__fastcall TSubtitlesDlg::TSubtitlesDlg( TComponent* Owner,
intf_thread_t *_p_intf ) : TForm( Owner )
{
p_intf = _p_intf;
Constraints->MinWidth = Width;
Constraints->MinHeight = Height;
Translate( this );
}
//---------------------------------------------------------------------------
void __fastcall TSubtitlesDlg::ButtonBrowseClick( TObject *Sender )
{
if( OpenDialog1->Execute() )
{
EditFile->Text = OpenDialog1->FileName;
}
}
//---------------------------------------------------------------------------
void __fastcall TSubtitlesDlg::ButtonOKClick( TObject *Sender )
{
int delay = (int) (10 * atof( EditDelay->Text.c_str() ));
float fps = atof( EditFPS->Text.c_str() );
config_PutPsz( p_intf, "sub-file", EditFile->Text.c_str() );
config_PutInt( p_intf, "sub-delay", delay );
config_PutFloat( p_intf, "sub-fps", fps );
}
//---------------------------------------------------------------------------
/*****************************************************************************
* subtitles.cpp: Dialog box for divx subtitle selection
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: subtitles.cpp,v 1.3 2003/02/12 02:11:58 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <vcl.h>
#pragma hdrstop
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include "subtitles.h"
#include "misc.h"
#include "win32_common.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
__fastcall TSubtitlesDlg::TSubtitlesDlg( TComponent* Owner,
intf_thread_t *_p_intf ) : TForm( Owner )
{
p_intf = _p_intf;
Constraints->MinWidth = Width;
Constraints->MinHeight = Height;
Translate( this );
}
//---------------------------------------------------------------------------
void __fastcall TSubtitlesDlg::ButtonBrowseClick( TObject *Sender )
{
if( OpenDialog1->Execute() )
{
EditFile->Text = OpenDialog1->FileName;
}
}
//---------------------------------------------------------------------------
void __fastcall TSubtitlesDlg::ButtonOKClick( TObject *Sender )
{
int delay = (int) (10 * atof( EditDelay->Text.c_str() ));
float fps = atof( EditFPS->Text.c_str() );
config_PutPsz( p_intf, "sub-file", EditFile->Text.c_str() );
config_PutInt( p_intf, "sub-delay", delay );
config_PutFloat( p_intf, "sub-fps", fps );
}
//---------------------------------------------------------------------------
/*****************************************************************************
* subtitles.h: Dialog box for divx subtitle selection
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: subtitles.h,v 1.2 2003/01/26 03:55:36 ipkiss Exp $
*
* Authors: Olivier Teuliere <ipkiss@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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef subtitlesH
#define subtitlesH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Dialogs.hpp>
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class TSubtitlesDlg : public TForm
{
__published: // IDE-managed Components
TOpenDialog *OpenDialog1;
TGroupBox *GroupBoxSubtitles;
TEdit *EditDelay;
TEdit *EditFPS;
TEdit *EditFile;
TButton *ButtonBrowse;
TLabel *LabelDelay;
TLabel *LabelFPS;
TButton *ButtonOK;
TButton *ButtonCancel;
void __fastcall ButtonBrowseClick( TObject *Sender );