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
10b1ba7f
Commit
10b1ba7f
authored
May 16, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: pass input items rather than ID through IMevent
parent
279777bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
29 deletions
+37
-29
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+25
-25
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+12
-4
No files found.
modules/gui/qt4/input_manager.cpp
View file @
10b1ba7f
...
...
@@ -170,14 +170,14 @@ void InputManager::customEvent( QEvent *event )
break
;
case
ItemChanged_Type
:
/* Ignore ItemChanged_Type event that does not apply to our input */
if
(
p_item
->
i_id
==
ple
->
i_id
)
if
(
p_item
==
ple
->
p_item
)
{
UpdateStatus
();
// UpdateName();
UpdateArt
();
/* Update duration of file */
}
UpdateMeta
(
ple
->
i_id
);
UpdateMeta
(
ple
->
p_item
->
i_id
);
break
;
case
ItemStateChanged_Type
:
// TODO: Fusion with above state
...
...
@@ -257,7 +257,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
InputManager
*
im
=
(
InputManager
*
)
param
;
input_item_t
*
p_item
=
static_cast
<
input_item_t
*>
(
newval
.
p_address
);
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
p_item
->
i_id
);
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
p_item
);
QApplication
::
postEvent
(
im
,
event
);
return
VLC_SUCCESS
;
}
...
...
@@ -271,74 +271,74 @@ static int InputEvent( vlc_object_t *p_this, const char *,
switch
(
newval
.
i_int
)
{
case
INPUT_EVENT_STATE
:
event
=
new
IMEvent
(
ItemStateChanged_Type
,
0
);
event
=
new
IMEvent
(
ItemStateChanged_Type
);
break
;
case
INPUT_EVENT_RATE
:
event
=
new
IMEvent
(
ItemRateChanged_Type
,
0
);
event
=
new
IMEvent
(
ItemRateChanged_Type
);
break
;
case
INPUT_EVENT_POSITION
:
//case INPUT_EVENT_LENGTH:
event
=
new
IMEvent
(
PositionUpdate_Type
,
0
);
event
=
new
IMEvent
(
PositionUpdate_Type
);
break
;
case
INPUT_EVENT_TITLE
:
case
INPUT_EVENT_CHAPTER
:
event
=
new
IMEvent
(
ItemTitleChanged_Type
,
0
);
event
=
new
IMEvent
(
ItemTitleChanged_Type
);
break
;
case
INPUT_EVENT_ES
:
event
=
new
IMEvent
(
ItemEsChanged_Type
,
0
);
event
=
new
IMEvent
(
ItemEsChanged_Type
);
break
;
case
INPUT_EVENT_TELETEXT
:
event
=
new
IMEvent
(
ItemTeletextChanged_Type
,
0
);
event
=
new
IMEvent
(
ItemTeletextChanged_Type
);
break
;
case
INPUT_EVENT_STATISTICS
:
event
=
new
IMEvent
(
StatisticsUpdate_Type
,
0
);
event
=
new
IMEvent
(
StatisticsUpdate_Type
);
break
;
case
INPUT_EVENT_VOUT
:
event
=
new
IMEvent
(
InterfaceVoutUpdate_Type
,
0
);
event
=
new
IMEvent
(
InterfaceVoutUpdate_Type
);
break
;
case
INPUT_EVENT_AOUT
:
event
=
new
IMEvent
(
InterfaceAoutUpdate_Type
,
0
);
event
=
new
IMEvent
(
InterfaceAoutUpdate_Type
);
break
;
case
INPUT_EVENT_ITEM_META
:
/* Codec MetaData + Art */
event
=
new
IMEvent
(
MetaChanged_Type
,
0
);
event
=
new
IMEvent
(
MetaChanged_Type
);
break
;
case
INPUT_EVENT_ITEM_INFO
:
/* Codec Info */
event
=
new
IMEvent
(
InfoChanged_Type
,
0
);
event
=
new
IMEvent
(
InfoChanged_Type
);
break
;
case
INPUT_EVENT_ITEM_NAME
:
event
=
new
IMEvent
(
NameChanged_Type
,
0
);
event
=
new
IMEvent
(
NameChanged_Type
);
break
;
case
INPUT_EVENT_AUDIO_DELAY
:
case
INPUT_EVENT_SUBTITLE_DELAY
:
event
=
new
IMEvent
(
SynchroChanged_Type
,
0
);
event
=
new
IMEvent
(
SynchroChanged_Type
);
break
;
case
INPUT_EVENT_CACHE
:
event
=
new
IMEvent
(
CachingEvent_Type
,
0
);
event
=
new
IMEvent
(
CachingEvent_Type
);
break
;
case
INPUT_EVENT_BOOKMARK
:
event
=
new
IMEvent
(
BookmarksChanged_Type
,
0
);
event
=
new
IMEvent
(
BookmarksChanged_Type
);
break
;
case
INPUT_EVENT_RECORD
:
event
=
new
IMEvent
(
RecordingEvent_Type
,
0
);
event
=
new
IMEvent
(
RecordingEvent_Type
);
break
;
case
INPUT_EVENT_PROGRAM
:
/* This is for PID changes */
event
=
new
IMEvent
(
ProgramChanged_Type
,
0
);
event
=
new
IMEvent
(
ProgramChanged_Type
);
break
;
case
INPUT_EVENT_SIGNAL
:
/* This is for capture-card signals */
/* event = new IMEvent( SignalChanged_Type
, 0
);
/* event = new IMEvent( SignalChanged_Type );
break; */
default:
event
=
NULL
;
...
...
@@ -354,7 +354,7 @@ static int VbiEvent( vlc_object_t *, const char *,
vlc_value_t
,
vlc_value_t
,
void
*
param
)
{
InputManager
*
im
=
(
InputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
ItemTeletextChanged_Type
,
0
);
IMEvent
*
event
=
new
IMEvent
(
ItemTeletextChanged_Type
);
QApplication
::
postEvent
(
im
,
event
);
return
VLC_SUCCESS
;
...
...
@@ -891,7 +891,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
input_item_t
*
p_item
=
input_GetItem
(
p_input
);
if
(
p_item
)
{
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
p_item
->
i_id
);
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
p_item
);
customEvent
(
event
);
delete
event
;
}
...
...
@@ -1016,7 +1016,7 @@ static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
{
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
,
0
);
IMEvent
*
event
=
new
IMEvent
(
ItemChanged_Type
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
}
...
...
@@ -1026,7 +1026,7 @@ static int VolumeChanged( vlc_object_t *p_this, const char *psz_var,
{
MainInputManager
*
mim
=
(
MainInputManager
*
)
param
;
IMEvent
*
event
=
new
IMEvent
(
VolumeChanged_Type
,
newval
.
i_int
);
IMEvent
*
event
=
new
IMEvent
(
VolumeChanged_Type
);
QApplication
::
postEvent
(
mim
,
event
);
return
VLC_SUCCESS
;
}
...
...
modules/gui/qt4/input_manager.hpp
View file @
10b1ba7f
...
...
@@ -71,12 +71,20 @@ class IMEvent : public QEvent
{
friend
class
InputManager
;
public:
IMEvent
(
int
type
,
int
id
)
:
QEvent
(
(
QEvent
::
Type
)(
type
)
)
{
i_id
=
id
;
}
virtual
~
IMEvent
()
{}
IMEvent
(
int
type
,
input_item_t
*
p_input
=
NULL
)
:
QEvent
(
(
QEvent
::
Type
)(
type
)
)
{
if
(
(
p_item
=
p_input
)
!=
NULL
)
vlc_gc_incref
(
p_item
);
}
virtual
~
IMEvent
()
{
if
(
p_item
)
vlc_gc_decref
(
p_item
);
}
private:
in
t
i_id
;
in
put_item_t
*
p_item
;
};
class
InputManager
:
public
QObject
...
...
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