Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
4e5e7e2d
Commit
4e5e7e2d
authored
Sep 15, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename playlist_NodesCreateForSD to playlist_NodesPairCreate and document it
parent
8a8f3ad9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
15 deletions
+35
-15
include/vlc_playlist.h
include/vlc_playlist.h
+1
-1
modules/services_discovery/hal.c
modules/services_discovery/hal.c
+3
-2
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+3
-2
src/playlist/tree.c
src/playlist/tree.c
+28
-10
No files found.
include/vlc_playlist.h
View file @
4e5e7e2d
...
...
@@ -394,7 +394,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_Nodes
CreateForSD
,
(
playlist_t
*
,
char
*
,
playlist_item_t
**
,
playlist_item_t
**
)
);
VLC_EXPORT
(
void
,
playlist_Nodes
PairCreate
,
(
playlist_t
*
,
char
*
,
playlist_item_t
**
,
playlist_item_t
**
,
vlc_bool_t
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_GetPreferredNode
,
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_node
)
);
/***********************************************************************
...
...
modules/services_discovery/hal.c
View file @
4e5e7e2d
...
...
@@ -127,8 +127,9 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
playlist_NodesCreateForSD
(
p_playlist
,
_
(
"Devices"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
);
playlist_NodesPairCreate
(
p_playlist
,
_
(
"Devices"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
,
VLC_TRUE
);
vlc_object_release
(
p_playlist
);
return
VLC_SUCCESS
;
...
...
modules/services_discovery/sap.c
View file @
4e5e7e2d
...
...
@@ -313,8 +313,9 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
playlist_NodesCreateForSD
(
p_sys
->
p_playlist
,
_
(
"SAP sessions"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
);
playlist_NodesPairCreate
(
p_sys
->
p_playlist
,
_
(
"SAP sessions"
),
&
p_sys
->
p_node_cat
,
&
p_sys
->
p_node_one
,
VLC_TRUE
);
p_sys
->
i_announces
=
0
;
p_sys
->
pp_announces
=
NULL
;
...
...
src/playlist/tree.c
View file @
4e5e7e2d
...
...
@@ -287,24 +287,42 @@ 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
)
/**
* Create a pair of nodes in the category and onelevel trees.
* They share the same input ID.
* \todo really share the input item
* \param p_playlist the playlist
* \param psz_name the name of the nodes
* \param pp_node_cat pointer to return the node in category tree
* \param pp_node_one pointer to return the node in onelevel tree
* \param b_for_sd For Services Discovery ? (make node read-only and unskipping)
*/
void
playlist_NodesPairCreate
(
playlist_t
*
p_playlist
,
char
*
psz_name
,
playlist_item_t
**
pp_node_cat
,
playlist_item_t
**
pp_node_one
,
vlc_bool_t
b_for_sd
)
{
*
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
;
(
*
pp_node_one
)
->
p_input
->
i_id
=
(
*
pp_node_cat
)
->
p_input
->
i_id
;
if
(
b_for_sd
)
{
(
*
pp_node_cat
)
->
i_flags
|=
PLAYLIST_RO_FLAG
;
(
*
pp_node_cat
)
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
(
*
pp_node_one
)
->
i_flags
|=
PLAYLIST_RO_FLAG
;
(
*
pp_node_one
)
->
i_flags
|=
PLAYLIST_SKIP_FLAG
;
}
}
/**
* Get the node in the preferred tree from a node in one of category
* or onelevel tree.
* For example, for the SAP node, it will return the node in the category
* tree if --playlist-tree is not set to never, because the SAP node prefers
* category
*/
playlist_item_t
*
playlist_GetPreferredNode
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_node
)
{
...
...
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