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
96fe985a
Commit
96fe985a
authored
Jun 04, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: input manager: allow updating art for not current input_item
parent
26713706
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
11 deletions
+47
-11
modules/gui/qt4/components/info_panels.cpp
modules/gui/qt4/components/info_panels.cpp
+1
-0
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+23
-2
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+3
-0
modules/gui/qt4/components/playlist/playlist.cpp
modules/gui/qt4/components/playlist/playlist.cpp
+2
-0
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+15
-7
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+3
-2
No files found.
modules/gui/qt4/components/info_panels.cpp
View file @
96fe985a
...
...
@@ -263,6 +263,7 @@ void MetaPanel::update( input_item_t *p_item )
}
art_cover
->
showArtUpdate
(
file
);
art_cover
->
setItem
(
p_item
);
}
/**
...
...
modules/gui/qt4/components/interface_widgets.cpp
View file @
96fe985a
...
...
@@ -503,10 +503,12 @@ void SpeedControlWidget::resetRate()
}
CoverArtLabel
::
CoverArtLabel
(
QWidget
*
parent
,
intf_thread_t
*
_p_i
)
:
QLabel
(
parent
),
p_intf
(
_p_i
)
:
QLabel
(
parent
),
p_intf
(
_p_i
),
p_item
(
NULL
)
{
setContextMenuPolicy
(
Qt
::
ActionsContextMenu
);
CONNECT
(
this
,
updateRequested
(),
this
,
askForUpdate
()
);
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
input_item_t
*
),
this
,
showArtUpdate
(
input_item_t
*
)
);
setMinimumHeight
(
128
);
setMinimumWidth
(
128
);
...
...
@@ -527,6 +529,14 @@ CoverArtLabel::~CoverArtLabel()
QList
<
QAction
*
>
artActions
=
actions
();
foreach
(
QAction
*
act
,
artActions
)
removeAction
(
act
);
if
(
p_item
)
vlc_gc_decref
(
p_item
);
}
void
CoverArtLabel
::
setItem
(
input_item_t
*
_p_item
)
{
if
(
p_item
)
vlc_gc_decref
(
p_item
);
p_item
=
_p_item
;
if
(
p_item
)
vlc_gc_incref
(
p_item
);
}
void
CoverArtLabel
::
showArtUpdate
(
const
QString
&
url
)
...
...
@@ -545,9 +555,20 @@ void CoverArtLabel::showArtUpdate( const QString& url )
setPixmap
(
pix
);
}
void
CoverArtLabel
::
showArtUpdate
(
input_item_t
*
_p_item
)
{
/* not for me */
if
(
_p_item
!=
p_item
)
return
;
QString
url
;
if
(
_p_item
)
url
=
THEMIM
->
getIM
()
->
decodeArtURL
(
_p_item
);
showArtUpdate
(
url
);
}
void
CoverArtLabel
::
askForUpdate
()
{
THEMIM
->
getIM
()
->
requestArtUpdate
();
THEMIM
->
getIM
()
->
requestArtUpdate
(
p_item
);
}
TimeLabel
::
TimeLabel
(
intf_thread_t
*
_p_intf
,
TimeLabel
::
Display
_displayType
)
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
96fe985a
...
...
@@ -228,6 +228,7 @@ class CoverArtLabel : public QLabel
Q_OBJECT
public:
CoverArtLabel
(
QWidget
*
parent
,
intf_thread_t
*
);
void
setItem
(
input_item_t
*
);
virtual
~
CoverArtLabel
();
protected:
...
...
@@ -241,6 +242,7 @@ protected:
}
private:
intf_thread_t
*
p_intf
;
input_item_t
*
p_item
;
public
slots
:
void
requestUpdate
()
{
emit
updateRequested
();
}
...
...
@@ -249,6 +251,7 @@ public slots:
requestUpdate
();
}
void
showArtUpdate
(
const
QString
&
);
void
showArtUpdate
(
input_item_t
*
);
private
slots
:
void
askForUpdate
();
...
...
modules/gui/qt4/components/playlist/playlist.cpp
View file @
96fe985a
...
...
@@ -78,6 +78,8 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
QString
),
art
,
showArtUpdate
(
const
QString
&
)
);
CONNECT
(
THEMIM
->
getIM
(),
artChanged
(
input_item_t
*
),
art
,
showArtUpdate
(
input_item_t
*
)
);
leftSplitter
->
addWidget
(
artContainer
);
...
...
modules/gui/qt4/input_manager.cpp
View file @
96fe985a
...
...
@@ -628,17 +628,24 @@ void InputManager::UpdateCaching()
}
}
void
InputManager
::
requestArtUpdate
()
void
InputManager
::
requestArtUpdate
(
input_item_t
*
p_item
)
{
if
(
hasInput
()
)
{
playlist_AskForArtEnqueue
(
pl_Get
(
p_intf
),
input_GetItem
(
p_input
)
);
bool
b_current_item
=
false
;
if
(
!
p_item
&&
hasInput
()
)
{
/* default to current item */
p_item
=
input_GetItem
(
p_input
);
b_current_item
=
true
;
}
else
if
(
p_item
)
{
playlist_AskForArtEnqueue
(
pl_Get
(
p_intf
),
p_item
);
/* No input will signal the cover art to update,
* let's do it ourself */
UpdateArt
();
* let's do it ourself */
if
(
b_current_item
)
UpdateArt
();
else
emit
artChanged
(
p_item
);
}
}
...
...
@@ -689,6 +696,7 @@ inline void InputManager::UpdateStats()
inline
void
InputManager
::
UpdateMeta
(
input_item_t
*
p_item_
)
{
emit
metaChanged
(
p_item_
);
emit
artChanged
(
p_item_
);
}
inline
void
InputManager
::
UpdateMeta
()
...
...
modules/gui/qt4/input_manager.hpp
View file @
96fe985a
...
...
@@ -140,7 +140,7 @@ public:
bool
hasAudio
();
bool
hasVideo
()
{
return
hasInput
()
&&
b_video
;
}
bool
hasVisualisation
();
void
requestArtUpdate
();
void
requestArtUpdate
(
input_item_t
*
p_item
);
QString
getName
()
{
return
oldName
;
}
static
const
QString
decodeArtURL
(
input_item_t
*
p_item
);
...
...
@@ -223,7 +223,8 @@ signals:
void
infoChanged
(
input_item_t
*
);
void
currentMetaChanged
(
input_item_t
*
);
void
metaChanged
(
input_item_t
*
);
void
artChanged
(
QString
);
void
artChanged
(
QString
);
/* current item art ( same as item == NULL ) */
void
artChanged
(
input_item_t
*
);
/// Play/pause status
void
playingStatusChanged
(
int
);
void
recordingStateChanged
(
bool
);
...
...
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