Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e93bed1a
Commit
e93bed1a
authored
Dec 15, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - VLM: simplifications.
parent
270d869d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
46 deletions
+36
-46
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs/vlm.cpp
+28
-33
modules/gui/qt4/dialogs/vlm.hpp
modules/gui/qt4/dialogs/vlm.hpp
+8
-13
No files found.
modules/gui/qt4/dialogs/vlm.cpp
View file @
e93bed1a
...
@@ -47,13 +47,15 @@ static const char *psz_type[] = { "Broadcast", "Schedule", "VOD" };
...
@@ -47,13 +47,15 @@ static const char *psz_type[] = { "Broadcast", "Schedule", "VOD" };
VLMDialog
*
VLMDialog
::
instance
=
NULL
;
VLMDialog
*
VLMDialog
::
instance
=
NULL
;
VLMDialog
::
VLMDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
VLMDialog
::
VLMDialog
(
intf_thread_t
*
_p_intf
)
:
QVLCFrame
(
_p_intf
)
{
{
vlmWrapper
=
new
VLMWrapper
(
p_intf
);
p_vlm
=
vlm_New
(
p_intf
);
if
(
!
vlmWrapper
->
AttachVLM
()
)
if
(
!
p_vlm
)
{
{
msg_Warn
(
p_intf
,
"Couldn't build VLM object "
);
msg_Warn
(
p_intf
,
"Couldn't build VLM object "
);
return
;
return
;
}
}
vlmWrapper
=
new
VLMWrapper
(
p_vlm
);
// UI stuff
// UI stuff
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
...
@@ -137,7 +139,10 @@ VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
...
@@ -137,7 +139,10 @@ VLMDialog::VLMDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
VLMDialog
::~
VLMDialog
()
VLMDialog
::~
VLMDialog
()
{
{
delete
vlmWrapper
;
/* FIXME :you have to destroy vlm here to close
* but we shouldn't destroy vlm here in case somebody else wants it */
if
(
p_vlm
)
vlm_Delete
(
p_vlm
);
}
}
void
VLMDialog
::
showScheduleWidget
(
int
i
)
void
VLMDialog
::
showScheduleWidget
(
int
i
)
...
@@ -190,13 +195,13 @@ void VLMDialog::addVLMItem()
...
@@ -190,13 +195,13 @@ void VLMDialog::addVLMItem()
typeShortName
=
"Bcast"
;
typeShortName
=
"Bcast"
;
vlmAwidget
=
new
VLMBroadcast
(
name
,
inputText
,
outputText
,
vlmAwidget
=
new
VLMBroadcast
(
name
,
inputText
,
outputText
,
b_checked
,
b_looped
,
this
);
b_checked
,
b_looped
,
this
);
VLMWrapper
::
AddBroadcast
(
vlmWrapper
->
GetVLM
()
,
name
,
inputText
,
outputText
,
b_checked
,
b_looped
);
//VLMWrapper::AddBroadcast( vlmWrapper->p_vlc
, name, inputText, outputText, b_checked, b_looped );
break
;
break
;
case
QVLM_VOD
:
case
QVLM_VOD
:
typeShortName
=
"VOD"
;
typeShortName
=
"VOD"
;
vlmAwidget
=
new
VLMVod
(
name
,
inputText
,
outputText
,
vlmAwidget
=
new
VLMVod
(
name
,
inputText
,
outputText
,
b_checked
,
ui
.
muxLedit
->
text
(),
this
);
b_checked
,
ui
.
muxLedit
->
text
(),
this
);
VLMWrapper
::
AddVod
(
vlmWrapper
->
GetVLM
(),
name
,
inputText
,
outputText
,
b_checked
);
///
VLMWrapper::AddVod( vlmWrapper->GetVLM(), name, inputText, outputText, b_checked );
break
;
break
;
case
QVLM_Schedule
:
case
QVLM_Schedule
:
typeShortName
=
"Sched"
;
typeShortName
=
"Sched"
;
...
@@ -398,7 +403,7 @@ VLMBroadcast::VLMBroadcast( QString _name, QString _input, QString _output,
...
@@ -398,7 +403,7 @@ VLMBroadcast::VLMBroadcast( QString _name, QString _input, QString _output,
void
VLMBroadcast
::
update
()
void
VLMBroadcast
::
update
()
{
{
VLMWrapper
::
EditBroadcast
(
THEVLM
,
name
,
input
,
output
,
b_enabled
,
b_looped
);
//VLMWrapper::EditBroadcast( VLMWrapper::p_vlm
, name, input, output, b_enabled, b_looped );
if
(
b_looped
)
if
(
b_looped
)
loopButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/playlist_repeat_all.png"
)
)
);
loopButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/playlist_repeat_all.png"
)
)
);
else
else
...
@@ -409,12 +414,12 @@ void VLMBroadcast::togglePlayPause()
...
@@ -409,12 +414,12 @@ void VLMBroadcast::togglePlayPause()
{
{
if
(
b_playing
=
true
)
if
(
b_playing
=
true
)
{
{
VLMWrapper
::
ControlBroadcast
(
THEVLM
,
name
,
ControlBroadcastPause
);
// VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm
, name, ControlBroadcastPause );
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/pause_16px.png"
)
)
);
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/pause_16px.png"
)
)
);
}
}
else
else
{
{
VLMWrapper
::
ControlBroadcast
(
THEVLM
,
name
,
ControlBroadcastPlay
);
//VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm
, name, ControlBroadcastPlay );
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/play_16px.png"
)
)
);
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/play_16px.png"
)
)
);
}
}
b_playing
=
!
b_playing
;
b_playing
=
!
b_playing
;
...
@@ -428,7 +433,7 @@ void VLMBroadcast::toggleLoop()
...
@@ -428,7 +433,7 @@ void VLMBroadcast::toggleLoop()
void
VLMBroadcast
::
stop
()
void
VLMBroadcast
::
stop
()
{
{
VLMWrapper
::
ControlBroadcast
(
THEVLM
,
name
,
ControlBroadcastStop
);
//VLMWrapper::ControlBroadcast( VLMWrapper::p_vlm
, name, ControlBroadcastStop );
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/play_16px.png"
)
)
);
playButton
->
setIcon
(
QIcon
(
QPixmap
(
":/pixmaps/play_16px.png"
)
)
);
}
}
...
@@ -465,34 +470,24 @@ VLMVod::VLMVod( QString name, QString input, QString output,
...
@@ -465,34 +470,24 @@ VLMVod::VLMVod( QString name, QString input, QString output,
void
VLMVod
::
update
()
void
VLMVod
::
update
()
{
{
muxLabel
->
setText
(
mux
);
muxLabel
->
setText
(
mux
);
VLMWrapper
::
EditVod
(
THEVLM
,
name
,
input
,
output
,
b_enabled
,
mux
);
//VLMWrapper::EditVod( p_vlm
, name, input, output, b_enabled, mux );
}
}
/*******************
/*******************
* VLMWrapper
* VLMWrapper
*******************/
*******************/
VLMWrapper
::
VLMWrapper
(
intf_thread_t
*
_p_intf
)
vlm_t
*
VLMWrapper
::
p_vlm
=
NULL
;
{
p_intf
=
_p_intf
;
p_vlm
=
vlm_New
(
p_intf
);
}
VLMWrapper
::
~
VLMWrapper
(
)
VLMWrapper
::
VLMWrapper
(
vlm_t
*
_p_vlm
)
{
{
/* FIXME :you have to destroy vlm here to close
p_vlm
=
_p_vlm
;
* but we shouldn't destroy vlm here in case somebody else wants it */
if
(
p_vlm
)
vlm_Delete
(
p_vlm
);
}
}
bool
VLMWrapper
::
AttachVLM
()
VLMWrapper
::~
VLMWrapper
()
{
{}
p_vlm
=
vlm_New
(
p_intf
);
return
(
p_vlm
?
true
:
false
);
}
void
VLMWrapper
::
AddBroadcast
(
vlm_t
*
p_vlm
,
const
QString
name
,
QString
input
,
void
VLMWrapper
::
AddBroadcast
(
const
QString
name
,
QString
input
,
QString
output
,
QString
output
,
bool
b_enabled
,
bool
b_loop
)
bool
b_enabled
,
bool
b_loop
)
{
{
...
@@ -500,10 +495,10 @@ void VLMWrapper::AddBroadcast( vlm_t *p_vlm, const QString name, QString input,
...
@@ -500,10 +495,10 @@ void VLMWrapper::AddBroadcast( vlm_t *p_vlm, const QString name, QString input,
QString
command
=
"new
\"
"
+
name
+
"
\"
broadcast"
;
QString
command
=
"new
\"
"
+
name
+
"
\"
broadcast"
;
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
EditBroadcast
(
p_vlm
,
name
,
input
,
output
,
b_enabled
,
b_loop
);
EditBroadcast
(
name
,
input
,
output
,
b_enabled
,
b_loop
);
}
}
void
VLMWrapper
::
EditBroadcast
(
vlm_t
*
p_vlm
,
const
QString
name
,
const
QString
input
,
void
VLMWrapper
::
EditBroadcast
(
const
QString
name
,
const
QString
input
,
const
QString
output
,
const
QString
output
,
bool
b_enabled
,
bool
b_loop
)
bool
b_enabled
,
bool
b_loop
)
{
{
...
@@ -536,7 +531,7 @@ void VLMWrapper::EditBroadcast( vlm_t *p_vlm, const QString name, const QString
...
@@ -536,7 +531,7 @@ void VLMWrapper::EditBroadcast( vlm_t *p_vlm, const QString name, const QString
}
}
}
}
void
VLMWrapper
::
ControlBroadcast
(
vlm_t
*
p_vlm
,
const
QString
name
,
int
BroadcastStatus
,
void
VLMWrapper
::
ControlBroadcast
(
const
QString
name
,
int
BroadcastStatus
,
unsigned
int
seek
)
unsigned
int
seek
)
{
{
vlm_message_t
*
message
;
vlm_message_t
*
message
;
...
@@ -561,7 +556,7 @@ void VLMWrapper::ControlBroadcast( vlm_t *p_vlm, const QString name, int Broadca
...
@@ -561,7 +556,7 @@ void VLMWrapper::ControlBroadcast( vlm_t *p_vlm, const QString name, int Broadca
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
}
}
void
VLMWrapper
::
AddVod
(
vlm_t
*
p_vlm
,
const
QString
name
,
const
QString
input
,
void
VLMWrapper
::
AddVod
(
const
QString
name
,
const
QString
input
,
const
QString
output
,
const
QString
output
,
bool
b_enabled
,
const
QString
mux
)
bool
b_enabled
,
const
QString
mux
)
{
{
...
@@ -569,10 +564,10 @@ void VLMWrapper::AddVod( vlm_t *p_vlm, const QString name, const QString input,
...
@@ -569,10 +564,10 @@ void VLMWrapper::AddVod( vlm_t *p_vlm, const QString name, const QString input,
QString
command
=
"new
\"
"
+
name
+
"
\"
vod"
;
QString
command
=
"new
\"
"
+
name
+
"
\"
vod"
;
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_ExecuteCommand
(
p_vlm
,
qtu
(
command
),
&
message
);
vlm_MessageDelete
(
message
);
vlm_MessageDelete
(
message
);
EditVod
(
p_vlm
,
name
,
input
,
output
,
b_enabled
,
mux
);
EditVod
(
name
,
input
,
output
,
b_enabled
,
mux
);
}
}
void
VLMWrapper
::
EditVod
(
vlm_t
*
p_vlm
,
const
QString
name
,
const
QString
input
,
void
VLMWrapper
::
EditVod
(
const
QString
name
,
const
QString
input
,
const
QString
output
,
const
QString
output
,
bool
b_enabled
,
bool
b_enabled
,
const
QString
mux
)
const
QString
mux
)
...
...
modules/gui/qt4/dialogs/vlm.hpp
View file @
e93bed1a
...
@@ -60,7 +60,6 @@ class QSpinBox;
...
@@ -60,7 +60,6 @@ class QSpinBox;
class
VLMAWidget
;
class
VLMAWidget
;
class
VLMWrapper
;
class
VLMWrapper
;
#define THEVLM parent->vlmWrapper->GetVLM()
class
VLMDialog
:
public
QVLCFrame
class
VLMDialog
:
public
QVLCFrame
{
{
...
@@ -75,7 +74,7 @@ public:
...
@@ -75,7 +74,7 @@ public:
virtual
~
VLMDialog
();
virtual
~
VLMDialog
();
VLMWrapper
*
vlmWrapper
;
VLMWrapper
*
vlmWrapper
;
vlm_t
*
p_vlm
;
private:
private:
VLMDialog
(
intf_thread_t
*
);
VLMDialog
(
intf_thread_t
*
);
static
VLMDialog
*
instance
;
static
VLMDialog
*
instance
;
...
@@ -105,33 +104,29 @@ private slots:
...
@@ -105,33 +104,29 @@ private slots:
class
VLMWrapper
class
VLMWrapper
{
{
public:
public:
VLMWrapper
(
intf_thread
_t
*
);
VLMWrapper
(
vlm
_t
*
);
virtual
~
VLMWrapper
();
virtual
~
VLMWrapper
();
bool
AttachVLM
();
static
void
AddBroadcast
(
const
QString
,
const
QString
,
const
QString
,
static
void
AddBroadcast
(
vlm_t
*
,
const
QString
,
const
QString
,
const
QString
,
bool
b_enabled
=
true
,
bool
b_enabled
=
true
,
bool
b_loop
=
false
);
bool
b_loop
=
false
);
static
void
EditBroadcast
(
vlm_t
*
,
const
QString
,
const
QString
,
const
QString
,
static
void
EditBroadcast
(
const
QString
,
const
QString
,
const
QString
,
bool
b_enabled
=
true
,
bool
b_enabled
=
true
,
bool
b_loop
=
false
);
bool
b_loop
=
false
);
static
void
AddVod
(
vlm_t
*
,
const
QString
,
const
QString
,
const
QString
,
static
void
AddVod
(
const
QString
,
const
QString
,
const
QString
,
bool
b_enabled
=
true
,
QString
mux
=
""
);
bool
b_enabled
=
true
,
QString
mux
=
""
);
static
void
EditVod
(
vlm_t
*
,
const
QString
,
const
QString
,
const
QString
,
static
void
EditVod
(
const
QString
,
const
QString
,
const
QString
,
bool
b_enabled
=
true
,
QString
mux
=
""
);
bool
b_enabled
=
true
,
QString
mux
=
""
);
static
void
ControlBroadcast
(
vlm_t
*
,
const
QString
,
int
,
unsigned
int
seek
=
0
);
static
void
ControlBroadcast
(
const
QString
,
int
,
unsigned
int
seek
=
0
);
vlm_t
*
GetVLM
(){
return
p_vlm
;}
/* We don't have yet the accessors in the core, so the following is commented */
/* We don't have yet the accessors in the core, so the following is commented */
//unsigned int NbMedia() { if( p_vlm ) return p_vlm->i_media; return 0; }
//unsigned int NbMedia() { if( p_vlm ) return p_vlm->i_media; return 0; }
/* vlm_media_t *GetMedia( int i )
/* vlm_media_t *GetMedia( int i )
{ if( p_vlm ) return p_vlm->media[i]; return NULL; }*/
{ if( p_vlm ) return p_vlm->media[i]; return NULL; }*/
private:
private:
vlm_t
*
p_vlm
;
static
vlm_t
*
p_vlm
;
intf_thread_t
*
p_intf
;
};
};
class
VLMAWidget
:
public
QGroupBox
class
VLMAWidget
:
public
QGroupBox
...
...
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