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
006127ff
Commit
006127ff
authored
Jul 08, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jul 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: Propagate meta_changed events.
Fixes #5026 Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
d8a7e2d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
include/vlc_extensions.h
include/vlc_extensions.h
+8
-1
modules/gui/qt4/extensions_manager.cpp
modules/gui/qt4/extensions_manager.cpp
+20
-0
modules/gui/qt4/extensions_manager.hpp
modules/gui/qt4/extensions_manager.hpp
+1
-0
modules/lua/extension.c
modules/lua/extension.c
+7
-0
No files found.
include/vlc_extensions.h
View file @
006127ff
...
...
@@ -76,8 +76,9 @@ enum
EXTENSION_TRIGGER_ONLY
,
/**< arg1: extension_t*, arg2: bool* */
EXTENSION_TRIGGER
,
/**< arg1: extension_t* */
EXTENSION_TRIGGER_MENU
,
/**< arg1: extension_t*, int (uint16_t) */
EXTENSION_SET_INPUT
,
/**< arg1: extension_t*, arg2 (input_thread_t) */
EXTENSION_SET_INPUT
,
/**< arg1: extension_t*, arg2 (input_thread_t
*
) */
EXTENSION_PLAYING_CHANGED
,
/**< arg1: extension_t*, arg2 int( playing status ) */
EXTENSION_META_CHANGED
,
/**< arg1: extension_t*, arg2 (input_item_t*) */
};
/**
...
...
@@ -163,6 +164,12 @@ static inline int extension_PlayingChanged( extensions_manager_t *p_mgr,
return
extension_Control
(
p_mgr
,
EXTENSION_PLAYING_CHANGED
,
p_ext
,
state
);
}
static
inline
int
extension_MetaChanged
(
extensions_manager_t
*
p_mgr
,
extension_t
*
p_ext
)
{
return
extension_Control
(
p_mgr
,
EXTENSION_META_CHANGED
,
p_ext
);
}
/** Can this extension only be triggered but not activated?
Not compatible with HasMenu */
#define extension_TriggerOnly( mgr, ext ) \
...
...
modules/gui/qt4/extensions_manager.cpp
View file @
006127ff
...
...
@@ -51,6 +51,8 @@ ExtensionsManager::ExtensionsManager( intf_thread_t *_p_intf, QObject *parent )
CONNECT
(
THEMIM
->
getIM
(),
playingStatusChanged
(
int
),
this
,
playingChanged
(
int
)
);
DCONNECT
(
THEMIM
,
inputChanged
(
input_thread_t
*
),
this
,
inputChanged
(
input_thread_t
*
)
);
CONNECT
(
THEMIM
->
getIM
(),
metaChanged
(
input_item_t
*
),
this
,
metaChanged
(
input_item_t
*
)
);
b_unloading
=
false
;
b_failed
=
false
;
}
...
...
@@ -297,3 +299,21 @@ void ExtensionsManager::playingChanged( int state )
vlc_mutex_unlock
(
&
p_extensions_manager
->
lock
);
}
void
ExtensionsManager
::
metaChanged
(
input_item_t
*
)
{
//This is unlikely, but can happen if no extension modules can be loaded.
if
(
p_extensions_manager
==
NULL
)
return
;
vlc_mutex_lock
(
&
p_extensions_manager
->
lock
);
extension_t
*
p_ext
;
FOREACH_ARRAY
(
p_ext
,
p_extensions_manager
->
extensions
)
{
if
(
extension_IsActivated
(
p_extensions_manager
,
p_ext
)
)
{
extension_MetaChanged
(
p_extensions_manager
,
p_ext
);
}
}
FOREACH_END
()
vlc_mutex_unlock
(
&
p_extensions_manager
->
lock
);
}
modules/gui/qt4/extensions_manager.hpp
View file @
006127ff
...
...
@@ -80,6 +80,7 @@ private slots:
void
triggerMenu
(
int
id
);
void
inputChanged
(
input_thread_t
*
p_input
);
void
playingChanged
(
int
);
void
metaChanged
(
input_item_t
*
p_input
);
private:
static
ExtensionsManager
*
instance
;
...
...
modules/lua/extension.c
View file @
006127ff
...
...
@@ -622,6 +622,13 @@ static int Control( extensions_manager_t *p_mgr, int i_control, va_list args )
}
break
;
}
case
EXTENSION_META_CHANGED
:
{
extension_t
*
p_ext
;
p_ext
=
(
extension_t
*
)
va_arg
(
args
,
extension_t
*
);
PushCommand
(
p_ext
,
CMD_UPDATE_META
);
break
;
}
default:
msg_Warn
(
p_mgr
,
"Control '%d' not yet implemented in Extension"
,
i_control
);
...
...
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