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
7a8ee109
Commit
7a8ee109
authored
Jan 31, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - UpdateArt separation from other functions in the IM.
parent
527187a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
26 deletions
+32
-26
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+23
-18
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+9
-8
No files found.
modules/gui/qt4/input_manager.cpp
View file @
7a8ee109
...
@@ -148,7 +148,7 @@ void InputManager::delCallbacks()
...
@@ -148,7 +148,7 @@ void InputManager::delCallbacks()
void
InputManager
::
customEvent
(
QEvent
*
event
)
void
InputManager
::
customEvent
(
QEvent
*
event
)
{
{
int
type
=
event
->
type
();
int
type
=
event
->
type
();
msg_Dbg
(
p_intf
,
"New IM Event of type: %i"
,
type
);
//
msg_Dbg( p_intf, "New IM Event of type: %i", type );
if
(
type
!=
PositionUpdate_Type
&&
if
(
type
!=
PositionUpdate_Type
&&
type
!=
ItemChanged_Type
&&
type
!=
ItemChanged_Type
&&
type
!=
ItemRateChanged_Type
&&
type
!=
ItemRateChanged_Type
&&
...
@@ -172,6 +172,7 @@ void InputManager::customEvent( QEvent *event )
...
@@ -172,6 +172,7 @@ void InputManager::customEvent( QEvent *event )
case
ItemChanged_Type
:
case
ItemChanged_Type
:
UpdateMeta
();
UpdateMeta
();
UpdateTitle
();
UpdateTitle
();
UpdateArt
();
break
;
break
;
case
ItemRateChanged_Type
:
case
ItemRateChanged_Type
:
UpdateRate
();
UpdateRate
();
...
@@ -185,7 +186,7 @@ void InputManager::customEvent( QEvent *event )
...
@@ -185,7 +186,7 @@ void InputManager::customEvent( QEvent *event )
}
}
}
}
void
InputManager
::
UpdatePosition
(
void
)
void
InputManager
::
UpdatePosition
()
{
{
/* Update position */
/* Update position */
int
i_length
,
i_time
;
/* Int is enough, since we store seconds */
int
i_length
,
i_time
;
/* Int is enough, since we store seconds */
...
@@ -196,7 +197,7 @@ void InputManager::UpdatePosition( void )
...
@@ -196,7 +197,7 @@ void InputManager::UpdatePosition( void )
emit
positionUpdated
(
f_pos
,
i_time
,
i_length
);
emit
positionUpdated
(
f_pos
,
i_time
,
i_length
);
}
}
void
InputManager
::
UpdateTitle
(
void
)
void
InputManager
::
UpdateTitle
()
{
{
/* Update navigation status */
/* Update navigation status */
vlc_value_t
val
;
val
.
i_int
=
0
;
vlc_value_t
val
;
val
.
i_int
=
0
;
...
@@ -213,7 +214,7 @@ void InputManager::UpdateTitle( void )
...
@@ -213,7 +214,7 @@ void InputManager::UpdateTitle( void )
}
}
}
}
void
InputManager
::
UpdateStatus
(
void
)
void
InputManager
::
UpdateStatus
()
{
{
/* Update playing status */
/* Update playing status */
vlc_value_t
val
;
val
.
i_int
=
0
;
vlc_value_t
val
;
val
.
i_int
=
0
;
...
@@ -225,7 +226,7 @@ void InputManager::UpdateStatus( void )
...
@@ -225,7 +226,7 @@ void InputManager::UpdateStatus( void )
}
}
}
}
void
InputManager
::
UpdateRate
(
void
)
void
InputManager
::
UpdateRate
()
{
{
/* Update Rate */
/* Update Rate */
int
i_new_rate
=
var_GetInteger
(
p_input
,
"rate"
);
int
i_new_rate
=
var_GetInteger
(
p_input
,
"rate"
);
...
@@ -237,7 +238,7 @@ void InputManager::UpdateRate( void )
...
@@ -237,7 +238,7 @@ void InputManager::UpdateRate( void )
}
}
}
}
void
InputManager
::
UpdateMeta
(
void
)
void
InputManager
::
UpdateMeta
()
{
{
/* Update text, name and nowplaying */
/* Update text, name and nowplaying */
QString
text
;
QString
text
;
...
@@ -277,17 +278,6 @@ void InputManager::UpdateMeta( void )
...
@@ -277,17 +278,6 @@ void InputManager::UpdateMeta( void )
old_name
=
text
;
old_name
=
text
;
}
}
/* Update Art meta */
QString
url
;
char
*
psz_art
=
input_item_GetArtURL
(
input_GetItem
(
p_input
)
);
url
.
sprintf
(
"%s"
,
psz_art
);
free
(
psz_art
);
if
(
artUrl
!=
url
)
{
artUrl
=
url
.
replace
(
"file://"
,
QString
(
""
)
);
emit
artChanged
(
artUrl
);
}
/* Has Audio, has Video Tracks ? */
/* Has Audio, has Video Tracks ? */
vlc_value_t
val
;
vlc_value_t
val
;
var_Change
(
p_input
,
"audio-es"
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
var_Change
(
p_input
,
"audio-es"
,
VLC_VAR_CHOICESCOUNT
,
&
val
,
NULL
);
...
@@ -302,6 +292,21 @@ void InputManager::UpdateMeta( void )
...
@@ -302,6 +292,21 @@ void InputManager::UpdateMeta( void )
#endif
#endif
}
}
void
UpdateArt
()
{
/* Update Art meta */
QString
url
;
char
*
psz_art
=
input_item_GetArtURL
(
input_GetItem
(
p_input
)
);
url
.
sprintf
(
"%s"
,
psz_art
);
free
(
psz_art
);
if
(
artUrl
!=
url
)
{
artUrl
=
url
.
replace
(
"file://"
,
QString
(
""
)
);
emit
artChanged
(
artUrl
);
msg_Dbg
(
p_intf
,
"Art: %s"
,
qtu
(
artUrl
)
);
}
}
/* User update of the slider */
/* User update of the slider */
void
InputManager
::
sliderUpdate
(
float
new_pos
)
void
InputManager
::
sliderUpdate
(
float
new_pos
)
{
{
...
@@ -460,7 +465,7 @@ MainInputManager::~MainInputManager()
...
@@ -460,7 +465,7 @@ MainInputManager::~MainInputManager()
void
MainInputManager
::
customEvent
(
QEvent
*
event
)
void
MainInputManager
::
customEvent
(
QEvent
*
event
)
{
{
int
type
=
event
->
type
();
int
type
=
event
->
type
();
msg_Dbg
(
p_intf
,
"New MainIM Event of type: %i"
,
type
);
//
msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
if
(
type
!=
ItemChanged_Type
&&
type
!=
VolumeChanged_Type
)
if
(
type
!=
ItemChanged_Type
&&
type
!=
VolumeChanged_Type
)
return
;
return
;
...
...
modules/gui/qt4/input_manager.hpp
View file @
7a8ee109
...
@@ -65,13 +65,14 @@ public:
...
@@ -65,13 +65,14 @@ public:
bool
b_has_audio
,
b_has_video
,
b_had_audio
,
b_had_video
;
bool
b_has_audio
,
b_has_video
,
b_had_audio
,
b_had_video
;
private:
private:
void
customEvent
(
QEvent
*
);
void
customEvent
(
QEvent
*
);
void
addCallbacks
(
void
);
void
addCallbacks
();
void
delCallbacks
(
void
);
void
delCallbacks
();
void
UpdateRate
(
void
);
void
UpdateRate
();
void
UpdateMeta
(
void
);
void
UpdateMeta
();
void
UpdateStatus
(
void
);
void
UpdateStatus
();
void
UpdateTitle
(
void
);
void
UpdateTitle
();
void
UpdatePosition
(
void
);
void
UpdatePosition
();
void
UpdateArt
();
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
int
i_old_playing_status
;
int
i_old_playing_status
;
...
@@ -144,7 +145,7 @@ private slots:
...
@@ -144,7 +145,7 @@ private slots:
//void updateInput();
//void updateInput();
signals:
signals:
void
inputChanged
(
input_thread_t
*
);
void
inputChanged
(
input_thread_t
*
);
void
volumeChanged
(
void
);
void
volumeChanged
();
};
};
#endif
#endif
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