Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c6e29a7d
Commit
c6e29a7d
authored
May 15, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New helper to create nodes for services discovery
parent
28bd3a4a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
33 deletions
+29
-33
include/vlc_playlist.h
include/vlc_playlist.h
+1
-0
include/vlc_symbols.h
include/vlc_symbols.h
+3
-0
modules/services_discovery/bonjour.c
modules/services_discovery/bonjour.c
+3
-9
modules/services_discovery/hal.c
modules/services_discovery/hal.c
+2
-10
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+3
-14
src/playlist/tree.c
src/playlist/tree.c
+17
-0
No files found.
include/vlc_playlist.h
View file @
c6e29a7d
...
...
@@ -279,6 +279,7 @@ VLC_EXPORT( int, playlist_NodeRemoveItem, (playlist_t *,playlist_item_t*,playlis
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ChildSearchName
,
(
playlist_item_t
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
playlist_NodeDelete
,
(
playlist_t
*
,
playlist_item_t
*
,
vlc_bool_t
,
vlc_bool_t
)
);
VLC_EXPORT
(
int
,
playlist_NodeEmpty
,
(
playlist_t
*
,
playlist_item_t
*
,
vlc_bool_t
)
);
VLC_EXPORT
(
void
,
playlist_NodesCreateForSD
,
(
playlist_t
*
,
char
*
,
playlist_item_t
**
,
playlist_item_t
**
)
);
/* Tree walking - These functions are only for playlist, not plugins */
playlist_item_t
*
playlist_GetNextLeaf
(
playlist_t
*
p_playlist
,
...
...
include/vlc_symbols.h
View file @
c6e29a7d
...
...
@@ -512,6 +512,7 @@ struct module_symbols_t
void
(
*
playlist_NodeDump_inner
)
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
,
int
i_level
);
int
(
*
__intf_UserOkayCancel_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
);
int
(
*
__intf_UserStringInput_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
char
**
);
void
(
*
playlist_NodesCreateForSD_inner
)
(
playlist_t
*
,
char
*
,
playlist_item_t
**
,
playlist_item_t
**
);
};
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
...
@@ -979,6 +980,7 @@ struct module_symbols_t
# define playlist_NodeDump (p_symbols)->playlist_NodeDump_inner
# define __intf_UserOkayCancel (p_symbols)->__intf_UserOkayCancel_inner
# define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner
# define playlist_NodesCreateForSD (p_symbols)->playlist_NodesCreateForSD_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
...
@@ -1449,6 +1451,7 @@ struct module_symbols_t
((p_symbols)->playlist_NodeDump_inner) = playlist_NodeDump; \
((p_symbols)->__intf_UserOkayCancel_inner) = __intf_UserOkayCancel; \
((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \
((p_symbols)->playlist_NodesCreateForSD_inner) = playlist_NodesCreateForSD; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->playlist_ItemAddParent_deprecated = NULL; \
(p_symbols)->playlist_CopyParents_deprecated = NULL; \
...
...
modules/services_discovery/bonjour.c
View file @
c6e29a7d
...
...
@@ -62,7 +62,7 @@ vlc_module_end();
struct
services_discovery_sys_t
{
/* playlist node */
playlist_item_t
*
p_node
;
playlist_item_t
*
p_node
_cat
,
*
p_node_one
;
playlist_t
*
p_playlist
;
AvahiSimplePoll
*
simple_poll
;
...
...
@@ -302,14 +302,8 @@ static int Open( vlc_object_t *p_this )
goto
error
;
}
p_view
=
playlist_ViewFind
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
);
p_sys
->
p_node
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
VIEW_CATEGORY
,
_
(
"Bonjour"
),
p_view
->
p_root
);
p_sys
->
p_node
->
i_flags
|=
PLAYLIST_RO_FLAG
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_sys
->
p_playlist
,
"intf-change"
,
val
);
playlist_NodesCreateForSD
(
p_playlist
,
_
(
"Bonjour"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
);
p_sd
->
pf_run
=
Run
;
return
VLC_SUCCESS
;
...
...
modules/services_discovery/hal.c
View file @
c6e29a7d
...
...
@@ -127,16 +127,8 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_sys
->
p_node_cat
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Devices"
),
p_playlist
->
p_root_category
);
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_one
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Devices"
),
p_playlist
->
p_root_onelevel
);
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_RO_FLAG
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_playlist
,
"intf-change"
,
val
);
playlist_NodesCreateForSD
(
p_playlist
,
_
(
"Devices"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
);
vlc_object_release
(
p_playlist
);
return
VLC_SUCCESS
;
...
...
modules/services_discovery/sap.c
View file @
c6e29a7d
...
...
@@ -318,20 +318,9 @@ static int Open( vlc_object_t *p_this )
msg_Warn
(
p_sd
,
"unable to find playlist, cancelling SAP listening"
);
return
VLC_EGENERIC
;
}
p_sys
->
p_node_cat
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
_
(
"SAP sessions"
),
p_sys
->
p_playlist
->
p_root_category
);
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_cat
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
p_sys
->
p_node_one
=
playlist_NodeCreate
(
p_sys
->
p_playlist
,
_
(
"SAP sessions"
),
p_sys
->
p_playlist
->
p_root_onelevel
);
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_RO_FLAG
;
p_sys
->
p_node_one
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_sys
->
p_playlist
,
"intf-change"
,
val
);
playlist_NodesCreateForSD
(
p_sys
->
p_playlist
,
_
(
"SAP sessions"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
);
p_sys
->
i_announces
=
0
;
p_sys
->
pp_announces
=
NULL
;
...
...
src/playlist/tree.c
View file @
c6e29a7d
...
...
@@ -292,6 +292,23 @@ playlist_item_t *playlist_ChildSearchName( playlist_item_t *p_node,
return
NULL
;
}
void
playlist_NodesCreateForSD
(
playlist_t
*
p_playlist
,
char
*
psz_name
,
playlist_item_t
**
pp_node_cat
,
playlist_item_t
**
pp_node_one
)
{
*
pp_node_cat
=
playlist_NodeCreate
(
p_playlist
,
psz_name
,
p_playlist
->
p_root_category
);
(
*
pp_node_cat
)
->
i_flags
|=
PLAYLIST_RO_FLAG
;
(
*
pp_node_cat
)
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
*
pp_node_one
=
playlist_NodeCreate
(
p_playlist
,
psz_name
,
p_playlist
->
p_root_onelevel
);
(
*
pp_node_one
)
->
i_flags
|=
PLAYLIST_RO_FLAG
;
(
*
pp_node_one
)
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
}
/**********************************************************************
* Tree walking functions
**********************************************************************/
...
...
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