Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
84c6ecb2
Commit
84c6ecb2
authored
Aug 19, 2003
by
Mohammed Adnène Trojette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Video4Linux / PVR / KFIR unified panel
parent
aa5ceed9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
699 additions
and
24 deletions
+699
-24
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/open.cpp
+165
-5
modules/gui/wxwindows/v4l.cpp
modules/gui/wxwindows/v4l.cpp
+436
-0
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+98
-19
No files found.
modules/gui/wxwindows/open.cpp
View file @
84c6ecb2
...
...
@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.3
6 2003/08/10 09:22:07 gbazi
n Exp $
* $Id: open.cpp,v 1.3
7 2003/08/19 21:16:09 ad
n Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -79,6 +79,11 @@ enum
NetPort1_Event
,
NetPort2_Event
,
NetPort3_Event
,
NetAddr1_Event
,
NetAddr2_Event
,
NetAddr3_Event
,
VideoType_Event
,
VideoDevice_Event
,
VideoChannel_Event
,
V4LSettings_Event
,
SubsFileEnable_Event
,
SubsFileSettings_Event
,
...
...
@@ -97,7 +102,7 @@ BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
EVT_NOTEBOOK_PAGE_CHANGED
(
Notebook_Event
,
OpenDialog
::
OnPageChange
)
EVT_TEXT
(
MRL_Event
,
OpenDialog
::
OnMRLChange
)
EVT_TEXT
(
MRL_Event
,
OpenDialog
::
OnMRLChange
)
/* Events generated by the file panel */
EVT_TEXT
(
FileName_Event
,
OpenDialog
::
OnFilePanelChange
)
...
...
@@ -124,6 +129,12 @@ BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
EVT_TEXT
(
NetAddr2_Event
,
OpenDialog
::
OnNetPanelChange
)
EVT_TEXT
(
NetAddr3_Event
,
OpenDialog
::
OnNetPanelChange
)
/* Events generated by the v4l panel */
EVT_RADIOBOX
(
VideoType_Event
,
OpenDialog
::
OnV4LTypeChange
)
EVT_TEXT
(
VideoDevice_Event
,
OpenDialog
::
OnV4LPanelChange
)
EVT_SPINCTRL
(
VideoChannel_Event
,
OpenDialog
::
OnV4LPanelChange
)
EVT_BUTTON
(
V4LSettings_Event
,
OpenDialog
::
OnV4LSettingsChange
)
/* Events generated by the subtitle file buttons */
EVT_CHECKBOX
(
SubsFileEnable_Event
,
OpenDialog
::
OnSubsFileEnable
)
EVT_BUTTON
(
SubsFileSettings_Event
,
OpenDialog
::
OnSubsFileSettings
)
...
...
@@ -155,6 +166,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
p_parent
=
_p_parent
;
SetIcon
(
*
p_intf
->
p_sys
->
p_icon
);
file_dialog
=
NULL
;
v4l_dialog
=
NULL
;
sout_dialog
=
NULL
;
subsfile_dialog
=
NULL
;
demuxdump_dialog
=
NULL
;
...
...
@@ -261,6 +273,9 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
i_access_method
==
SAT_ACCESS
);
#endif
notebook
->
AddPage
(
V4LPanel
(
notebook
),
wxU
(
_
(
"Video For Linux"
)),
i_access_method
==
V4L_ACCESS
);
/* Update Disc panel */
wxCommandEvent
dummy_event
;
OnDiscTypeChange
(
dummy_event
);
...
...
@@ -269,6 +284,10 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
dummy_event
.
SetId
(
NetRadio1_Event
);
OnNetTypeChange
(
dummy_event
);
/* Update v4l panel */
dummy_event
.
SetId
(
VideoType_Event
);
OnV4LTypeChange
(
dummy_event
);
/* Update MRL */
wxNotebookEvent
event
(
wxEVT_NULL
,
0
,
i_access_method
);
OnPageChange
(
event
);
...
...
@@ -298,6 +317,7 @@ OpenDialog::~OpenDialog()
{
/* Clean up */
if
(
file_dialog
)
delete
file_dialog
;
if
(
v4l_dialog
)
delete
v4l_dialog
;
if
(
sout_dialog
)
delete
sout_dialog
;
if
(
subsfile_dialog
)
delete
subsfile_dialog
;
if
(
demuxdump_dialog
)
delete
demuxdump_dialog
;
...
...
@@ -513,6 +533,61 @@ wxPanel *OpenDialog::NetPanel( wxWindow* parent )
return
panel
;
}
wxPanel
*
OpenDialog
::
V4LPanel
(
wxWindow
*
parent
)
{
wxPanel
*
panel
=
new
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
200
,
200
)
);
wxBoxSizer
*
sizer_row
=
new
wxBoxSizer
(
wxVERTICAL
);
wxFlexGridSizer
*
sizer
=
new
wxFlexGridSizer
(
1
,
4
,
20
);
static
const
wxString
video_type_array
[]
=
{
wxU
(
_
(
"WebCam"
)),
wxU
(
_
(
"TV Card"
)),
wxU
(
_
(
"PVR"
)),
wxU
(
_
(
"Kfir"
)),
};
video_type
=
new
wxRadioBox
(
panel
,
VideoType_Event
,
wxU
(
_
(
"Video Device Type"
)),
wxDefaultPosition
,
wxDefaultSize
,
WXSIZEOF
(
video_type_array
),
video_type_array
,
WXSIZEOF
(
video_type_array
),
wxRA_SPECIFY_COLS
);
sizer_row
->
Add
(
video_type
,
0
,
wxEXPAND
|
wxALL
,
5
);
/* Video Options */
wxFlexGridSizer
*
video_sizer
=
new
wxFlexGridSizer
(
4
,
2
,
20
);
wxStaticText
*
label
=
new
wxStaticText
(
panel
,
-
1
,
wxU
(
_
(
"Video Device"
))
);
video_device
=
new
wxTextCtrl
(
panel
,
VideoDevice_Event
,
wxT
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
wxTE_PROCESS_ENTER
);
video_sizer
->
Add
(
label
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
);
video_sizer
->
Add
(
video_device
,
1
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
);
label
=
new
wxStaticText
(
panel
,
-
1
,
wxU
(
_
(
"Channel"
))
);
video_channel
=
new
wxSpinCtrl
(
panel
,
VideoChannel_Event
);
video_sizer
->
Add
(
label
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_HORIZONTAL
);
video_sizer
->
Add
(
video_channel
,
1
,
wxALIGN_LEFT
|
wxALIGN_CENTER_HORIZONTAL
);
sizer
->
Add
(
video_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
wxBoxSizer
*
v4lbutton_sizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
v4l_button
=
new
wxButton
(
panel
,
V4LSettings_Event
,
wxU
(
_
(
"Advanced Settings..."
))
);
v4lbutton_sizer
->
Add
(
v4l_button
,
0
,
wxALIGN_RIGHT
,
5
);
sizer_row
->
Add
(
sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
sizer_row
->
Add
(
v4lbutton_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel
->
SetSizerAndFit
(
sizer_row
);
return
panel
;
}
wxPanel
*
OpenDialog
::
SatPanel
(
wxWindow
*
parent
)
{
wxPanel
*
panel
=
new
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
...
...
@@ -576,7 +651,7 @@ void OpenDialog::UpdateMRL( int i_access_method )
break
;
case
2
:
/* http access */
/* http access */
mrltemp
=
wxT
(
"http"
)
+
demux
+
wxT
(
"://"
)
+
net_addrs
[
2
]
->
GetLineText
(
0
);
break
;
...
...
@@ -585,6 +660,28 @@ void OpenDialog::UpdateMRL( int i_access_method )
case
SAT_ACCESS
:
mrltemp
=
wxT
(
"satellite"
)
+
demux
+
wxT
(
"://"
);
break
;
case
V4L_ACCESS
:
mrltemp
=
(
video_type
->
GetSelection
()
==
0
?
wxT
(
"v4l"
)
:
video_type
->
GetSelection
()
==
1
?
wxT
(
"v4l"
)
:
video_type
->
GetSelection
()
==
2
?
wxT
(
"pvr"
)
:
wxT
(
"kfir"
)
)
+
demux
+
wxT
(
":"
)
+
video_device
->
GetLineText
(
0
);
if
(
video_type
->
GetSelection
()
==
1
)
{
mrltemp
+=
wxString
::
Format
(
wxT
(
":channel=%d"
),
video_channel
->
GetValue
()
);
}
if
(
/* v4l_dialog != NULL && */
!
v4l_mrl
.
IsEmpty
()
)
{
mrltemp
+=
v4l_mrl
[
0
];
}
break
;
default:
break
;
}
...
...
@@ -605,7 +702,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
/* Update the playlist */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
for
(
int
i
=
0
;
i
<
(
int
)
mrl
.
GetCount
();
i
++
)
...
...
@@ -629,7 +726,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
ppsz_options
[
j
]
=
strdup
(
mrl
[
i
+
j
+
1
].
mb_str
()
);
}
i_total_options
=
i_options
;
i_total_options
=
i_options
;
/* Get the options from the subtitles dialog */
if
(
subsfile_checkbox
->
IsChecked
()
&&
subsfile_mrl
.
GetCount
()
)
...
...
@@ -646,6 +743,22 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
i_total_options
+=
subsfile_mrl
.
GetCount
();
}
/* Get the options from the v4l dialog */
/* if( v4l_mrl.GetCount() )
{
ppsz_options = (char **)realloc( ppsz_options, sizeof(char *) *
(i_total_options + v4l_mrl.GetCount()) );
for( int j = 0; j < (int)v4l_mrl.GetCount(); j++ )
{
ppsz_options[i_total_options + j] =
strdup( v4l_mrl[j].mb_str() );
}
i_total_options += v4l_mrl.GetCount();
}
*/
/* Get the options from the stream output dialog */
if
(
sout_checkbox
->
IsChecked
()
&&
sout_mrl
.
GetCount
()
)
{
...
...
@@ -659,6 +772,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
}
i_total_options
+=
sout_mrl
.
GetCount
();
}
playlist_Add
(
p_playlist
,
(
const
char
*
)
mrl
[
i
].
mb_str
(),
...
...
@@ -813,6 +927,52 @@ void OpenDialog::OnNetTypeChange( wxCommandEvent& event )
UpdateMRL
(
NET_ACCESS
);
}
/*****************************************************************************
* v4l panel event methods.
*****************************************************************************/
void
OpenDialog
::
OnV4LPanelChange
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
UpdateMRL
(
V4L_ACCESS
);
}
void
OpenDialog
::
OnV4LTypeChange
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
video_device
->
SetValue
(
wxU
(
"/dev/video"
)
);
v4l_button
->
Enable
();
video_channel
->
Disable
();
switch
(
video_type
->
GetSelection
()
)
{
case
1
:
video_channel
->
Enable
();
video_channel
->
SetRange
(
0
,
255
);
video_channel
->
SetValue
(
0
);
break
;
case
3
:
v4l_button
->
Disable
();
break
;
default:
break
;
}
UpdateMRL
(
V4L_ACCESS
);
}
void
OpenDialog
::
OnV4LSettingsChange
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
/* Show/hide the open dialog */
if
(
v4l_dialog
==
NULL
)
v4l_dialog
=
new
V4LDialog
(
p_intf
,
this
);
if
(
v4l_dialog
&&
v4l_dialog
->
ShowModal
()
==
wxID_OK
)
{
v4l_mrl
=
v4l_dialog
->
GetOptions
();
}
UpdateMRL
(
V4L_ACCESS
);
}
/*****************************************************************************
* Subtitles file event methods.
*****************************************************************************/
...
...
modules/gui/wxwindows/v4l.cpp
0 → 100644
View file @
84c6ecb2
This diff is collapsed.
Click to expand it.
modules/gui/wxwindows/wxwindows.h
View file @
84c6ecb2
...
...
@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.5
3 2003/08/16 21:05:14 zorglub
Exp $
* $Id: wxwindows.h,v 1.5
4 2003/08/19 21:16:09 adn
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -33,15 +33,6 @@
DECLARE_LOCAL_EVENT_TYPE
(
wxEVT_DIALOG
,
0
);
enum
{
FILE_ACCESS
,
DISC_ACCESS
,
NET_ACCESS
,
SAT_ACCESS
,
FILE_SIMPLE_ACCESS
};
class
OpenDialog
;
class
Playlist
;
class
Messages
;
...
...
@@ -159,8 +150,13 @@ private:
void
OnExit
(
wxCommandEvent
&
event
);
void
OnAbout
(
wxCommandEvent
&
event
);
void
OnOpenFileSimple
(
wxCommandEvent
&
event
);
void
OnOpenFile
(
wxCommandEvent
&
event
);
void
OnOpenDisc
(
wxCommandEvent
&
event
);
void
OnOpenNet
(
wxCommandEvent
&
event
);
void
OnOpenSat
(
wxCommandEvent
&
event
);
void
OnOpenV4L
(
wxCommandEvent
&
event
);
void
OnShowDialog
(
wxCommandEvent
&
event
);
void
OnPlayStream
(
wxCommandEvent
&
event
);
void
OnStopStream
(
wxCommandEvent
&
event
);
void
OnSliderUpdate
(
wxScrollEvent
&
event
);
...
...
@@ -240,6 +236,7 @@ public:
};
/* Open Dialog */
class
V4LDialog
;
class
SoutDialog
;
class
SubsFileDialog
;
class
OpenDialog
:
public
wxFrame
...
...
@@ -260,6 +257,7 @@ private:
wxPanel
*
DiscPanel
(
wxWindow
*
parent
);
wxPanel
*
NetPanel
(
wxWindow
*
parent
);
wxPanel
*
SatPanel
(
wxWindow
*
parent
);
wxPanel
*
V4LPanel
(
wxWindow
*
parent
);
void
UpdateMRL
(
int
i_access_method
);
...
...
@@ -282,6 +280,11 @@ private:
void
OnNetPanelChange
(
wxCommandEvent
&
event
);
void
OnNetTypeChange
(
wxCommandEvent
&
event
);
/* Event handlers for the v4l page */
void
OnV4LPanelChange
(
wxCommandEvent
&
event
);
void
OnV4LTypeChange
(
wxCommandEvent
&
event
);
void
OnV4LSettingsChange
(
wxCommandEvent
&
event
);
/* Event handlers for the stream output */
void
OnSubsFileEnable
(
wxCommandEvent
&
event
);
void
OnSubsFileSettings
(
wxCommandEvent
&
WXUNUSED
(
event
)
);
...
...
@@ -325,6 +328,14 @@ private:
int
i_net_ports
[
4
];
wxTextCtrl
*
net_addrs
[
4
];
/* Controls for the v4l panel */
wxRadioBox
*
video_type
;
wxTextCtrl
*
video_device
;
wxSpinCtrl
*
video_channel
;
wxButton
*
v4l_button
;
V4LDialog
*
v4l_dialog
;
wxArrayString
v4l_mrl
;
/* Controls for the subtitles file */
wxButton
*
subsfile_button
;
wxCheckBox
*
subsfile_checkbox
;
...
...
@@ -344,6 +355,72 @@ private:
wxFileDialog
*
demuxdump_dialog
;
};
enum
{
FILE_ACCESS
=
0
,
DISC_ACCESS
,
NET_ACCESS
,
SAT_ACCESS
,
V4L_ACCESS
,
FILE_SIMPLE_ACCESS
};
/* V4L Dialog */
class
V4LDialog
:
public
wxDialog
{
public:
/* Constructor */
V4LDialog
(
intf_thread_t
*
p_intf
,
wxWindow
*
p_parent
);
virtual
~
V4LDialog
();
wxArrayString
GetOptions
();
private:
void
UpdateMRL
();
wxPanel
*
AudioPanel
(
wxWindow
*
parent
);
wxPanel
*
CommonPanel
(
wxWindow
*
parent
);
void
ParseMRL
();
/* Event handlers (these functions should _not_ be virtual) */
void
OnOk
(
wxCommandEvent
&
event
);
void
OnCancel
(
wxCommandEvent
&
event
);
void
OnMRLChange
(
wxCommandEvent
&
event
);
void
OnAudioEnable
(
wxCommandEvent
&
event
);
void
OnAudioChannel
(
wxCommandEvent
&
event
);
void
OnSizeEnable
(
wxCommandEvent
&
event
);
void
OnSize
(
wxCommandEvent
&
event
);
void
OnNormEnable
(
wxCommandEvent
&
event
);
void
OnNorm
(
wxCommandEvent
&
event
);
void
OnFrequencyEnable
(
wxCommandEvent
&
event
);
void
OnFrequency
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
();
intf_thread_t
*
p_intf
;
wxWindow
*
p_parent
;
wxComboBox
*
mrl_combo
;
int
i_access_type
;
/* Controls for the v4l advanced options */
wxPanel
*
common_subpanel
;
wxPanel
*
common_panel
;
wxCheckBox
*
size_checkbox
;
wxComboBox
*
size_combo
;
wxCheckBox
*
norm_checkbox
;
wxComboBox
*
norm_combo
;
wxCheckBox
*
frequency_checkbox
;
wxSpinCtrl
*
frequency
;
wxPanel
*
audio_subpanel
;
wxPanel
*
audio_panel
;
wxCheckBox
*
audio_checkbox
;
wxTextCtrl
*
audio_device
;
wxSpinCtrl
*
audio_channel
;
};
/* Stream output Dialog */
class
SoutDialog
:
public
wxDialog
{
...
...
@@ -375,9 +452,9 @@ private:
/* Event handlers for the net access output */
void
OnNetChange
(
wxCommandEvent
&
event
);
/* Event specific to the
sap
address */
void
On
SAP
AddrChange
(
wxCommandEvent
&
event
);
/* Event specific to the
announce
address */
void
On
Announce
AddrChange
(
wxCommandEvent
&
event
);
/* Event handlers for the encapsulation panel */
void
OnEncapsulationChange
(
wxCommandEvent
&
event
);
...
...
@@ -387,6 +464,7 @@ private:
/* Event handlers for the misc panel */
void
OnSAPMiscChange
(
wxCommandEvent
&
event
);
void
OnSLPMiscChange
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
();
...
...
@@ -408,8 +486,9 @@ private:
/* Controls for the SAP announces */
wxPanel
*
misc_subpanels
[
1
];
wxCheckBox
*
sap_checkbox
;
wxTextCtrl
*
sap_addr
;
wxCheckBox
*
slp_checkbox
;
wxTextCtrl
*
announce_addr
;
/* Controls for the encapsulation */
wxRadioButton
*
encapsulation_radios
[
5
];
int
i_encapsulation_type
;
...
...
@@ -500,7 +579,7 @@ private:
wxTextAttr
*
dbg_attr
;
wxFileDialog
*
save_log_dialog
;
vlc_bool_t
b_verbose
;
};
...
...
@@ -556,7 +635,7 @@ private:
void
OnClose
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
();
intf_thread_t
*
p_intf
;
wxTreeCtrl
*
fileinfo_tree
;
wxTreeItemId
fileinfo_root
;
...
...
@@ -674,5 +753,5 @@ static inline int ConvertHotkey( int i_hotkey )
default:
return
0
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment