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
5277e0fe
Commit
5277e0fe
authored
Jun 21, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interaction: no need for vlc_object_find()
parent
a1238857
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
27 deletions
+30
-27
src/interface/interaction.c
src/interface/interaction.c
+28
-25
src/interface/interface.h
src/interface/interface.h
+1
-1
src/libvlc.h
src/libvlc.h
+1
-1
No files found.
src/interface/interaction.c
View file @
5277e0fe
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include <vlc_interface.h>
#include <vlc_interface.h>
#include "interface.h"
#include "interface.h"
#include "libvlc.h"
#include <assert.h>
#include <assert.h>
...
@@ -354,19 +355,19 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id )
...
@@ -354,19 +355,19 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id )
*
*
* \return a vlc_object_t that should be freed when done.
* \return a vlc_object_t that should be freed when done.
*/
*/
vlc_object
_t
*
interaction_Init
(
libvlc_int_t
*
p_libvlc
)
interaction
_t
*
interaction_Init
(
libvlc_int_t
*
p_libvlc
)
{
{
interaction_t
*
p_interaction
;
interaction_t
*
p_interaction
;
/* Make sure we haven't yet created an interaction object */
/* Make sure we haven't yet created an interaction object */
assert
(
vlc_object_find
(
p_libvlc
,
VLC_OBJECT_INTERACTION
,
FIND_ANYWHERE
)
==
NULL
);
assert
(
libvlc_priv
(
p_libvlc
)
->
p_interaction
==
NULL
);
p_interaction
=
vlc_object_create
(
p_libvlc
,
VLC_OBJECT_INTERACTION
);
p_interaction
=
vlc_custom_create
(
p_libvlc
,
sizeof
(
*
p_interaction
),
VLC_OBJECT_GENERIC
,
"interaction"
);
if
(
!
p_interaction
)
return
NULL
;
if
(
p_interaction
)
{
vlc_object_attach
(
p_interaction
,
p_libvlc
);
vlc_object_attach
(
p_interaction
,
p_libvlc
);
p_interaction
->
i_dialogs
=
0
;
p_interaction
->
i_dialogs
=
0
;
p_interaction
->
pp_dialogs
=
NULL
;
p_interaction
->
pp_dialogs
=
NULL
;
p_interaction
->
p_intf
=
NULL
;
p_interaction
->
p_intf
=
NULL
;
...
@@ -376,15 +377,14 @@ vlc_object_t * interaction_Init( libvlc_int_t *p_libvlc )
...
@@ -376,15 +377,14 @@ vlc_object_t * interaction_Init( libvlc_int_t *p_libvlc )
InteractionLoop
,
VLC_THREAD_PRIORITY_LOW
,
InteractionLoop
,
VLC_THREAD_PRIORITY_LOW
,
false
)
)
false
)
)
{
{
msg_Err
(
p_interaction
,
"Interaction control thread creation failed
"
msg_Err
(
p_interaction
,
"Interaction control thread creation failed,
"
",
interaction will not be displayed"
);
"
interaction will not be displayed"
);
vlc_object_detach
(
p_interaction
);
vlc_object_detach
(
p_interaction
);
vlc_object_release
(
p_interaction
);
vlc_object_release
(
p_interaction
);
p_interaction
=
NULL
;
return
NULL
;
}
}
}
return
VLC_OBJECT
(
p_interaction
)
;
return
p_interaction
;
}
}
/**********************************************************************
/**********************************************************************
...
@@ -394,7 +394,10 @@ vlc_object_t * interaction_Init( libvlc_int_t *p_libvlc )
...
@@ -394,7 +394,10 @@ vlc_object_t * interaction_Init( libvlc_int_t *p_libvlc )
/* Get the interaction object. Create it if needed */
/* Get the interaction object. Create it if needed */
static
interaction_t
*
InteractionGet
(
vlc_object_t
*
p_this
)
static
interaction_t
*
InteractionGet
(
vlc_object_t
*
p_this
)
{
{
return
vlc_object_find
(
p_this
,
VLC_OBJECT_INTERACTION
,
FIND_ANYWHERE
);
interaction_t
*
obj
=
libvlc_priv
(
p_this
->
p_libvlc
)
->
p_interaction
;
if
(
obj
)
vlc_object_yield
(
obj
);
return
obj
;
}
}
...
...
src/interface/interface.h
View file @
5277e0fe
...
@@ -35,6 +35,6 @@
...
@@ -35,6 +35,6 @@
**********************************************************************/
**********************************************************************/
/* release via vlc_object_release() */
/* release via vlc_object_release() */
vlc_object
_t
*
interaction_Init
(
libvlc_int_t
*
p_libvlc
);
interaction
_t
*
interaction_Init
(
libvlc_int_t
*
p_libvlc
);
#endif
#endif
src/libvlc.h
View file @
5277e0fe
...
@@ -247,7 +247,7 @@ typedef struct libvlc_priv_t
...
@@ -247,7 +247,7 @@ typedef struct libvlc_priv_t
module_t
*
p_memcpy_module
;
///< Fast memcpy plugin used
module_t
*
p_memcpy_module
;
///< Fast memcpy plugin used
playlist_t
*
p_playlist
;
//< the playlist singleton
playlist_t
*
p_playlist
;
//< the playlist singleton
vlm_t
*
p_vlm
;
///< the VLM singleton (or NULL)
vlm_t
*
p_vlm
;
///< the VLM singleton (or NULL)
vlc_object_t
*
p_interaction
;
///< interface interaction object
interaction_t
*
p_interaction
;
///< interface interaction object
httpd_t
*
p_httpd
;
///< HTTP daemon (src/network/httpd.c)
httpd_t
*
p_httpd
;
///< HTTP daemon (src/network/httpd.c)
/* Private playlist data (FIXME - playlist_t is too public...) */
/* Private playlist data (FIXME - playlist_t is too public...) */
...
...
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