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
c348861e
Commit
c348861e
authored
Aug 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_object_get: take instance as a parameter
parent
c700d394
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
17 deletions
+18
-17
include/vlc_objects.h
include/vlc_objects.h
+1
-1
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+1
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+2
-2
modules/gui/wince/menus.cpp
modules/gui/wince/menus.cpp
+2
-2
modules/gui/wxwidgets/menus.cpp
modules/gui/wxwidgets/menus.cpp
+2
-2
src/misc/objects.c
src/misc/objects.c
+10
-9
No files found.
include/vlc_objects.h
View file @
c348861e
...
...
@@ -83,7 +83,7 @@ VLC_EXPORT( void, __vlc_object_detach, ( vlc_object_t * ) );
#if defined (__GNUC__) && !defined __cplusplus
__attribute__
((
deprecated
))
#endif
VLC_EXPORT
(
void
*
,
vlc_object_get
,
(
int
)
);
VLC_EXPORT
(
void
*
,
vlc_object_get
,
(
libvlc_int_t
*
,
int
)
);
VLC_EXPORT
(
void
*
,
__vlc_object_find
,
(
vlc_object_t
*
,
int
,
int
)
);
VLC_EXPORT
(
void
*
,
__vlc_object_find_name
,
(
vlc_object_t
*
,
const
char
*
,
int
)
);
VLC_EXPORT
(
void
,
__vlc_object_yield
,
(
vlc_object_t
*
)
);
...
...
modules/gui/qt4/components/interface_widgets.cpp
View file @
c348861e
...
...
@@ -110,7 +110,7 @@ void VideoWidget::paintEvent(QPaintEvent *ev)
VideoWidget
::~
VideoWidget
()
{
vout_thread_t
*
p_vout
=
i_vout
?
(
vout_thread_t
*
)
vlc_object_get
(
i_vout
)
:
NULL
;
(
vout_thread_t
*
)
vlc_object_get
(
p_intf
->
p_libvlc
,
i_vout
)
:
NULL
;
if
(
p_vout
)
{
...
...
modules/gui/qt4/menus.cpp
View file @
c348861e
...
...
@@ -973,7 +973,7 @@ QMenu * QVLCMenu::Populate( intf_thread_t *p_intf,
}
else
{
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
objects
[
i
]
);
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_intf
->
p_libvlc
,
objects
[
i
]
);
if
(
!
p_object
)
{
msg_Warn
(
p_intf
,
"object %d not found !"
,
objects
[
i
]
);
...
...
@@ -1277,7 +1277,7 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
void
QVLCMenu
::
DoAction
(
intf_thread_t
*
p_intf
,
QObject
*
data
)
{
MenuItemData
*
itemData
=
qobject_cast
<
MenuItemData
*>
(
data
);
vlc_object_t
*
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
itemData
->
i_object_id
);
vlc_object_t
*
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_intf
->
p_libvlc
,
itemData
->
i_object_id
);
if
(
p_object
==
NULL
)
return
;
var_Set
(
p_object
,
itemData
->
psz_var
,
itemData
->
val
);
...
...
modules/gui/wince/menus.cpp
View file @
c348861e
...
...
@@ -489,7 +489,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
continue
;
}
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
pi_objects
[
i
]
);
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p
_intf
->
p_libvlc
,
p
i_objects
[
i
]
);
if
(
p_object
==
NULL
)
continue
;
b_section_empty
=
false
;
...
...
@@ -760,7 +760,7 @@ void OnMenuEvent( intf_thread_t *p_intf, int id )
if
(
p_menuitemext
)
{
vlc_object_t
*
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_menuitemext
->
i_object_id
);
vlc_object_get
(
p_
intf
->
p_libvlc
,
p_
menuitemext
->
i_object_id
);
if
(
p_object
==
NULL
)
return
;
var_Set
(
p_object
,
p_menuitemext
->
psz_var
,
p_menuitemext
->
val
);
...
...
modules/gui/wxwidgets/menus.cpp
View file @
c348861e
...
...
@@ -579,7 +579,7 @@ void Menu::Populate( ArrayOfStrings & ras_varnames,
continue
;
}
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
rai_objects
[
i
]
);
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_intf
->
p_libvlc
,
rai_objects
[
i
]
);
if
(
p_object
==
NULL
)
continue
;
b_section_empty
=
false
;
...
...
@@ -1008,7 +1008,7 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event )
wxMenuItemExt
*
p_menuitemext
=
(
wxMenuItemExt
*
)
p_menuitem
;
vlc_object_t
*
p_object
;
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_menuitemext
->
i_object_id
);
p_object
=
(
vlc_object_t
*
)
vlc_object_get
(
p_
intf
->
p_libvlc
,
p_
menuitemext
->
i_object_id
);
if
(
p_object
==
NULL
)
return
;
wxMutexGuiLeave
();
// We don't want deadlocks
...
...
src/misc/objects.c
View file @
c348861e
...
...
@@ -586,9 +586,8 @@ void __vlc_object_kill( vlc_object_t *p_this )
* vlc_object_yield(), use the pointer as your reference, and call
* vlc_object_release() when you're done.
*/
void
*
vlc_object_get
(
int
i_id
)
void
*
vlc_object_get
(
libvlc_int_t
*
p_anchor
,
int
i_id
)
{
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
vlc_object_t
*
obj
=
NULL
;
#ifndef NDEBUG
int
canc
=
vlc_savecancel
();
...
...
@@ -597,8 +596,8 @@ void * vlc_object_get( int i_id )
#endif
vlc_mutex_lock
(
&
structure_lock
);
for
(
obj
=
vlc_internals
(
p_
libvlc_global
)
->
next
;
obj
!=
VLC_OBJECT
(
p_
libvlc_global
);
for
(
obj
=
vlc_internals
(
p_
anchor
)
->
next
;
obj
!=
VLC_OBJECT
(
p_
anchor
);
obj
=
vlc_internals
(
obj
)
->
next
)
{
if
(
obj
->
i_object_id
==
i_id
)
...
...
@@ -947,10 +946,12 @@ vlc_list_t *__vlc_list_children( vlc_object_t *obj )
static
int
DumpCommand
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
libvlc_int_t
*
p_libvlc
=
p_this
->
p_libvlc
;
(
void
)
oldval
;
(
void
)
p_data
;
if
(
*
psz_cmd
==
'l'
)
{
vlc_object_t
*
root
=
VLC_OBJECT
(
vlc_global
()),
*
cur
=
root
;
vlc_object_t
*
cur
=
VLC_OBJECT
(
p_libvlc
)
;
vlc_mutex_lock
(
&
structure_lock
);
do
...
...
@@ -958,7 +959,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
PrintObject
(
cur
,
""
);
cur
=
vlc_internals
(
cur
)
->
next
;
}
while
(
cur
!=
root
);
while
(
cur
!=
VLC_OBJECT
(
p_libvlc
)
);
vlc_mutex_unlock
(
&
structure_lock
);
}
else
...
...
@@ -969,8 +970,8 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
{
char
*
end
;
int
i_id
=
strtol
(
newval
.
psz_string
,
&
end
,
0
);
if
(
end
!=
newval
.
psz_string
)
p_object
=
vlc_object_get
(
i_id
);
if
(
!*
end
)
p_object
=
vlc_object_get
(
p_libvlc
,
i_id
);
else
/* try using the object's name to find it */
p_object
=
vlc_object_find_name
(
p_this
,
newval
.
psz_string
,
...
...
@@ -989,7 +990,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
char
psz_foo
[
2
*
MAX_DUMPSTRUCTURE_DEPTH
+
1
];
if
(
!
p_object
)
p_object
=
p_this
->
p_libvlc
?
VLC_OBJECT
(
p_this
->
p_libvlc
)
:
p_this
;
p_object
=
VLC_OBJECT
(
p_this
->
p_libvlc
)
;
psz_foo
[
0
]
=
'|'
;
DumpStructure
(
p_object
,
0
,
psz_foo
);
...
...
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