Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c42ecca2
Commit
c42ecca2
authored
Aug 20, 2003
by
Mohammed Adnène Trojette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Bitrate options for PVR
* fix for win32 compilation
parent
7dcd22ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
156 additions
and
47 deletions
+156
-47
modules/gui/wxwindows/v4l.cpp
modules/gui/wxwindows/v4l.cpp
+143
-46
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+13
-1
No files found.
modules/gui/wxwindows/v4l.cpp
View file @
c42ecca2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* v4l.cpp : wxWindows plugin for vlc
* v4l.cpp : wxWindows plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* Copyright (C) 2000-2001 VideoLAN
* $Id: v4l.cpp,v 1.
1 2003/08/19 21:16:0
9 adn Exp $
* $Id: v4l.cpp,v 1.
2 2003/08/20 19:17:2
9 adn Exp $
*
*
* Authors: Mohammed Adnne Trojette <adn@via.ecp.fr>
* Authors: Mohammed Adnne Trojette <adn@via.ecp.fr>
*
*
...
@@ -55,15 +55,6 @@
...
@@ -55,15 +55,6 @@
# define wxRB_SINGLE 0
# define wxRB_SINGLE 0
#endif
#endif
enum
{
AUDIO_DEV
=
0
,
AUDIO_CHAN
,
SIZE
,
NORM
,
FREQUENCY
};
/*****************************************************************************
/*****************************************************************************
* Event Table.
* Event Table.
*****************************************************************************/
*****************************************************************************/
...
@@ -73,11 +64,13 @@ enum
...
@@ -73,11 +64,13 @@ enum
{
{
MRL_Event
,
MRL_Event
,
AudioDevice_Event
,
ADevLocation
,
AudioChannel_Event
,
Size_Event
,
Size_Event
,
Norm_Event
,
Norm_Event
,
Frequency_Event
Frequency_Event
,
AudioDevice_Event
,
ADevLocation
,
AudioChannel_Event
,
Bitrate_Event
,
MaxBitrate_Event
};
};
BEGIN_EVENT_TABLE
(
V4LDialog
,
wxDialog
)
BEGIN_EVENT_TABLE
(
V4LDialog
,
wxDialog
)
...
@@ -85,12 +78,7 @@ BEGIN_EVENT_TABLE(V4LDialog, wxDialog)
...
@@ -85,12 +78,7 @@ BEGIN_EVENT_TABLE(V4LDialog, wxDialog)
EVT_BUTTON
(
wxID_OK
,
V4LDialog
::
OnOk
)
EVT_BUTTON
(
wxID_OK
,
V4LDialog
::
OnOk
)
EVT_BUTTON
(
wxID_CANCEL
,
V4LDialog
::
OnCancel
)
EVT_BUTTON
(
wxID_CANCEL
,
V4LDialog
::
OnCancel
)
/* Events generated by the audio panel */
/* Events generated by the common panel */
EVT_CHECKBOX
(
AudioDevice_Event
,
V4LDialog
::
OnAudioEnable
)
EVT_TEXT
(
ADevLocation
,
V4LDialog
::
OnAudioEnable
)
EVT_SPINCTRL
(
AudioChannel_Event
,
V4LDialog
::
OnAudioChannel
)
/* Events generated by the audio panel */
EVT_CHECKBOX
(
Size_Event
,
V4LDialog
::
OnSizeEnable
)
EVT_CHECKBOX
(
Size_Event
,
V4LDialog
::
OnSizeEnable
)
EVT_COMBOBOX
(
Size_Event
,
V4LDialog
::
OnSize
)
EVT_COMBOBOX
(
Size_Event
,
V4LDialog
::
OnSize
)
EVT_CHECKBOX
(
Norm_Event
,
V4LDialog
::
OnNormEnable
)
EVT_CHECKBOX
(
Norm_Event
,
V4LDialog
::
OnNormEnable
)
...
@@ -98,6 +86,17 @@ BEGIN_EVENT_TABLE(V4LDialog, wxDialog)
...
@@ -98,6 +86,17 @@ BEGIN_EVENT_TABLE(V4LDialog, wxDialog)
EVT_CHECKBOX
(
Frequency_Event
,
V4LDialog
::
OnFrequencyEnable
)
EVT_CHECKBOX
(
Frequency_Event
,
V4LDialog
::
OnFrequencyEnable
)
EVT_COMBOBOX
(
Frequency_Event
,
V4LDialog
::
OnFrequency
)
EVT_COMBOBOX
(
Frequency_Event
,
V4LDialog
::
OnFrequency
)
/* Events generated by the audio panel */
EVT_CHECKBOX
(
AudioDevice_Event
,
V4LDialog
::
OnAudioEnable
)
EVT_TEXT
(
ADevLocation
,
V4LDialog
::
OnAudioEnable
)
EVT_SPINCTRL
(
AudioChannel_Event
,
V4LDialog
::
OnAudioChannel
)
/* Events generated by the bitrate panel */
EVT_CHECKBOX
(
Bitrate_Event
,
V4LDialog
::
OnBitrateEnable
)
EVT_SPINCTRL
(
Bitrate_Event
,
V4LDialog
::
OnBitrate
)
EVT_CHECKBOX
(
MaxBitrate_Event
,
V4LDialog
::
OnMaxBitrateEnable
)
EVT_SPINCTRL
(
MaxBitrate_Event
,
V4LDialog
::
OnMaxBitrate
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
/*****************************************************************************
/*****************************************************************************
...
@@ -134,11 +133,14 @@ V4LDialog::V4LDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -134,11 +133,14 @@ V4LDialog::V4LDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
mrl_sizer
->
Add
(
mrl_combo
,
1
,
wxALL
|
wxALIGN_CENTER
,
5
);
mrl_sizer
->
Add
(
mrl_combo
,
1
,
wxALL
|
wxALIGN_CENTER
,
5
);
mrl_sizer_sizer
->
Add
(
mrl_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
mrl_sizer_sizer
->
Add
(
mrl_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
/* Create the common panel */
wxPanel
*
common_panel
=
CommonPanel
(
panel
);
/* Create the audio panel */
/* Create the audio panel */
wxPanel
*
audio_panel
=
AudioPanel
(
panel
);
wxPanel
*
audio_panel
=
AudioPanel
(
panel
);
/* Create the
siz
e panel */
/* Create the
bitrat
e panel */
wxPanel
*
common_panel
=
Common
Panel
(
panel
);
wxPanel
*
bitrate_panel
=
Bitrate
Panel
(
panel
);
/* Separation */
/* Separation */
wxStaticLine
*
static_line
=
new
wxStaticLine
(
panel
,
wxID_OK
);
wxStaticLine
*
static_line
=
new
wxStaticLine
(
panel
,
wxID_OK
);
...
@@ -159,6 +161,7 @@ V4LDialog::V4LDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -159,6 +161,7 @@ V4LDialog::V4LDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
panel_sizer
->
Add
(
mrl_sizer_sizer
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Add
(
mrl_sizer_sizer
,
0
,
wxEXPAND
,
5
);
panel_sizer
->
Add
(
common_panel
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
common_panel
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
audio_panel
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
audio_panel
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
bitrate_panel
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
static_line
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
static_line
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
button_sizer
,
0
,
wxALIGN_LEFT
|
wxALIGN_BOTTOM
|
panel_sizer
->
Add
(
button_sizer
,
0
,
wxALIGN_LEFT
|
wxALIGN_BOTTOM
|
wxALL
,
5
);
wxALL
,
5
);
...
@@ -214,8 +217,23 @@ void V4LDialog::UpdateMRL()
...
@@ -214,8 +217,23 @@ void V4LDialog::UpdateMRL()
}
}
if
(
!
audio
.
IsEmpty
()
||
!
common
.
IsEmpty
()
)
wxString
rate
;
mrl_combo
->
SetValue
(
audio
+
common
);
{
if
(
bitrate_checkbox
->
IsChecked
()
)
{
rate
+=
wxString
::
Format
(
wxT
(
":bitrate=%d"
),
bitrate
->
GetValue
()
);
}
if
(
maxbitrate_checkbox
->
IsChecked
()
)
{
rate
+=
wxString
::
Format
(
wxT
(
":maxbitrate=%d"
),
maxbitrate
->
GetValue
()
);
}
}
if
(
!
audio
.
IsEmpty
()
||
!
common
.
IsEmpty
()
||
!
rate
.
IsEmpty
()
)
mrl_combo
->
SetValue
(
audio
+
common
+
rate
);
else
else
mrl_combo
->
SetValue
(
wxT
(
""
)
);
mrl_combo
->
SetValue
(
wxT
(
""
)
);
}
}
...
@@ -243,7 +261,7 @@ wxPanel *V4LDialog::CommonPanel( wxWindow* parent )
...
@@ -243,7 +261,7 @@ wxPanel *V4LDialog::CommonPanel( wxWindow* parent )
wxT
(
"qcif"
),
wxT
(
"qcif"
),
wxT
(
"sif"
),
wxT
(
"sif"
),
wxT
(
"cif"
),
wxT
(
"cif"
),
wxT
(
"vga"
)
wxT
(
"vga"
)
,
};
};
size_checkbox
=
new
wxCheckBox
(
common_subpanel
,
size_checkbox
=
new
wxCheckBox
(
common_subpanel
,
...
@@ -357,6 +375,57 @@ wxPanel *V4LDialog::AudioPanel( wxWindow* parent )
...
@@ -357,6 +375,57 @@ wxPanel *V4LDialog::AudioPanel( wxWindow* parent )
return
panel
;
return
panel
;
}
}
wxPanel
*
V4LDialog
::
BitratePanel
(
wxWindow
*
parent
)
{
wxPanel
*
panel
=
new
wxPanel
(
parent
,
-
1
,
wxDefaultPosition
,
wxSize
(
200
,
200
)
);
wxStaticBox
*
panel_box
=
new
wxStaticBox
(
panel
,
-
1
,
wxU
(
_
(
"Bitrate Options"
))
);
wxStaticBoxSizer
*
panel_sizer
=
new
wxStaticBoxSizer
(
panel_box
,
wxVERTICAL
);
wxFlexGridSizer
*
subpanel_sizer
;
bitrate_subpanel
=
new
wxPanel
(
panel
,
-
1
);
subpanel_sizer
=
new
wxFlexGridSizer
(
2
,
2
,
20
);
bitrate_checkbox
=
new
wxCheckBox
(
bitrate_subpanel
,
Bitrate_Event
,
wxU
(
_
(
"Bitrate"
))
);
bitrate
=
new
wxSpinCtrl
(
bitrate_subpanel
,
Bitrate_Event
);
subpanel_sizer
->
Add
(
bitrate_checkbox
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
);
subpanel_sizer
->
Add
(
bitrate
,
0
,
wxALIGN_RIGHT
|
wxALIGN_CENTER_VERTICAL
);
maxbitrate_checkbox
=
new
wxCheckBox
(
bitrate_subpanel
,
MaxBitrate_Event
,
wxU
(
_
(
"Maximum Bitrate"
))
);
maxbitrate
=
new
wxSpinCtrl
(
bitrate_subpanel
,
MaxBitrate_Event
);
subpanel_sizer
->
Add
(
maxbitrate_checkbox
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
);
subpanel_sizer
->
Add
(
maxbitrate
,
0
,
wxALIGN_RIGHT
|
wxALIGN_CENTER_VERTICAL
);
bitrate_subpanel
->
SetSizerAndFit
(
subpanel_sizer
);
/* Stuff everything into the main panel */
panel_sizer
->
Add
(
bitrate_subpanel
,
1
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
panel
->
SetSizerAndFit
(
panel_sizer
);
/* Update panel */
bitrate
->
Disable
();
maxbitrate
->
Disable
();
return
panel
;
}
/*****************************************************************************
/*****************************************************************************
* Events methods.
* Events methods.
...
@@ -377,25 +446,6 @@ void V4LDialog::OnMRLChange( wxCommandEvent& event )
...
@@ -377,25 +446,6 @@ void V4LDialog::OnMRLChange( wxCommandEvent& event )
//mrl = event.GetString();
//mrl = event.GetString();
}
}
/*****************************************************************************
* Audio panel event methods.
*****************************************************************************/
void
V4LDialog
::
OnAudioEnable
(
wxCommandEvent
&
event
)
{
audio_device
->
SetValue
(
wxU
(
"/dev/dsp"
)
);
audio_channel
->
SetRange
(
0
,
255
);
audio_channel
->
SetValue
(
0
);
audio_device
->
Enable
(
event
.
GetInt
()
);
audio_channel
->
Enable
(
event
.
GetInt
()
);
UpdateMRL
();
}
void
V4LDialog
::
OnAudioChannel
(
wxCommandEvent
&
event
)
{
UpdateMRL
();
}
/******************************************************************************
/******************************************************************************
* Common panel event methods.
* Common panel event methods.
******************************************************************************/
******************************************************************************/
...
@@ -423,8 +473,8 @@ void V4LDialog::OnNorm( wxCommandEvent& event )
...
@@ -423,8 +473,8 @@ void V4LDialog::OnNorm( wxCommandEvent& event )
void
V4LDialog
::
OnFrequencyEnable
(
wxCommandEvent
&
event
)
void
V4LDialog
::
OnFrequencyEnable
(
wxCommandEvent
&
event
)
{
{
frequency
->
SetRange
(
0
,
42
000
);
frequency
->
SetRange
(
0
,
1200
000
);
frequency
->
SetValue
(
7668
);
frequency
->
SetValue
(
479250
);
frequency
->
Enable
(
event
.
GetInt
()
);
frequency
->
Enable
(
event
.
GetInt
()
);
UpdateMRL
();
UpdateMRL
();
}
}
...
@@ -434,3 +484,50 @@ void V4LDialog::OnFrequency( wxCommandEvent& event )
...
@@ -434,3 +484,50 @@ void V4LDialog::OnFrequency( wxCommandEvent& event )
UpdateMRL
();
UpdateMRL
();
}
}
/*****************************************************************************
* Audio panel event methods.
*****************************************************************************/
void
V4LDialog
::
OnAudioEnable
(
wxCommandEvent
&
event
)
{
audio_device
->
SetValue
(
wxU
(
"/dev/dsp"
)
);
audio_channel
->
SetRange
(
0
,
255
);
audio_channel
->
SetValue
(
0
);
audio_device
->
Enable
(
event
.
GetInt
()
);
audio_channel
->
Enable
(
event
.
GetInt
()
);
UpdateMRL
();
}
void
V4LDialog
::
OnAudioChannel
(
wxCommandEvent
&
event
)
{
UpdateMRL
();
}
/******************************************************************************
* Bitrate panel event methods.
******************************************************************************/
void
V4LDialog
::
OnBitrateEnable
(
wxCommandEvent
&
event
)
{
bitrate
->
SetRange
(
0
,
10000
);
bitrate
->
SetValue
(
3000
);
bitrate
->
Enable
(
event
.
GetInt
()
);
UpdateMRL
();
}
void
V4LDialog
::
OnBitrate
(
wxCommandEvent
&
event
)
{
UpdateMRL
();
}
void
V4LDialog
::
OnMaxBitrateEnable
(
wxCommandEvent
&
event
)
{
maxbitrate
->
SetRange
(
0
,
10000
);
maxbitrate
->
SetValue
(
3000
);
maxbitrate
->
Enable
(
event
.
GetInt
()
);
UpdateMRL
();
}
void
V4LDialog
::
OnMaxBitrate
(
wxCommandEvent
&
event
)
{
UpdateMRL
();
}
modules/gui/wxwindows/wxwindows.h
View file @
c42ecca2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
* wxwindows.h: private wxWindows interface description
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.5
4 2003/08/19 21:16:0
9 adn Exp $
* $Id: wxwindows.h,v 1.5
5 2003/08/20 19:17:2
9 adn Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -379,6 +379,7 @@ private:
...
@@ -379,6 +379,7 @@ private:
void
UpdateMRL
();
void
UpdateMRL
();
wxPanel
*
AudioPanel
(
wxWindow
*
parent
);
wxPanel
*
AudioPanel
(
wxWindow
*
parent
);
wxPanel
*
CommonPanel
(
wxWindow
*
parent
);
wxPanel
*
CommonPanel
(
wxWindow
*
parent
);
wxPanel
*
BitratePanel
(
wxWindow
*
parent
);
void
ParseMRL
();
void
ParseMRL
();
/* Event handlers (these functions should _not_ be virtual) */
/* Event handlers (these functions should _not_ be virtual) */
...
@@ -393,6 +394,10 @@ private:
...
@@ -393,6 +394,10 @@ private:
void
OnNorm
(
wxCommandEvent
&
event
);
void
OnNorm
(
wxCommandEvent
&
event
);
void
OnFrequencyEnable
(
wxCommandEvent
&
event
);
void
OnFrequencyEnable
(
wxCommandEvent
&
event
);
void
OnFrequency
(
wxCommandEvent
&
event
);
void
OnFrequency
(
wxCommandEvent
&
event
);
void
OnBitrateEnable
(
wxCommandEvent
&
event
);
void
OnBitrate
(
wxCommandEvent
&
event
);
void
OnMaxBitrateEnable
(
wxCommandEvent
&
event
);
void
OnMaxBitrate
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
...
@@ -419,6 +424,13 @@ private:
...
@@ -419,6 +424,13 @@ private:
wxTextCtrl
*
audio_device
;
wxTextCtrl
*
audio_device
;
wxSpinCtrl
*
audio_channel
;
wxSpinCtrl
*
audio_channel
;
wxPanel
*
bitrate_subpanel
;
wxPanel
*
bitrate_panel
;
wxCheckBox
*
bitrate_checkbox
;
wxSpinCtrl
*
bitrate
;
wxCheckBox
*
maxbitrate_checkbox
;
wxSpinCtrl
*
maxbitrate
;
};
};
/* Stream output Dialog */
/* Stream output Dialog */
...
...
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