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
c7bc1acb
Commit
c7bc1acb
authored
Nov 12, 2003
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for announcement of playlist group in SAP announces
Needs the latest miniSAPserver CVS
parent
5edf9f31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
6 deletions
+54
-6
include/vlc_playlist.h
include/vlc_playlist.h
+2
-1
modules/misc/sap.c
modules/misc/sap.c
+28
-4
src/playlist/group.c
src/playlist/group.c
+24
-1
No files found.
include/vlc_playlist.h
View file @
c7bc1acb
...
...
@@ -2,7 +2,7 @@
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: vlc_playlist.h,v 1.1
5 2003/10/29 17:32:54
zorglub Exp $
* $Id: vlc_playlist.h,v 1.1
6 2003/11/12 08:10:21
zorglub Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -130,6 +130,7 @@ VLC_EXPORT( int, playlist_EnableGroup, ( playlist_t *, int ) );
VLC_EXPORT
(
playlist_group_t
*
,
playlist_CreateGroup
,
(
playlist_t
*
,
char
*
)
);
VLC_EXPORT
(
int
,
playlist_DeleteGroup
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
char
*
,
playlist_FindGroup
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
int
,
playlist_GroupToId
,
(
playlist_t
*
,
char
*
)
);
VLC_EXPORT
(
int
,
playlist_SortTitle
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
int
,
playlist_SortAuthor
,
(
playlist_t
*
,
int
)
);
...
...
modules/misc/sap.c
View file @
c7bc1acb
...
...
@@ -2,7 +2,7 @@
* sap.c : SAP interface module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: sap.c,v 1.3
3 2003/11/08 23:02:38 sigmunau
Exp $
* $Id: sap.c,v 1.3
4 2003/11/12 08:10:21 zorglub
Exp $
*
* Authors: Arnaud Schauly <gitan@via.ecp.fr>
* Clment Stenac <zorglub@via.ecp.fr>
...
...
@@ -464,7 +464,7 @@ static void sess_toitem( intf_thread_t * p_intf, sess_descr_t * p_sd )
int
i_count
,
i
;
vlc_bool_t
b_http
=
VLC_FALSE
;
char
*
psz_http_path
=
NULL
;
playlist_t
*
p_playlist
;
playlist_t
*
p_playlist
=
NULL
;
psz_uri_default
=
NULL
;
cfield_parse
(
p_sd
->
psz_connection
,
&
psz_uri_default
);
...
...
@@ -529,6 +529,31 @@ static void sess_toitem( intf_thread_t * p_intf, sess_descr_t * p_sd )
{
psz_http_path
=
strdup
(
p_sd
->
pp_attributes
[
i
]
->
psz_value
);
}
if
(
!
strcasecmp
(
p_sd
->
pp_attributes
[
i
]
->
psz_field
,
"plgroup"
))
{
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
int
i_id
=
playlist_GroupToId
(
p_playlist
,
p_sd
->
pp_attributes
[
i
]
->
psz_value
);
if
(
i_id
!=
0
)
{
p_item
->
i_group
=
i_id
;
}
else
{
playlist_group_t
*
p_group
=
playlist_CreateGroup
(
p_playlist
,
p_sd
->
pp_attributes
[
i
]
->
psz_value
);
p_item
->
i_group
=
p_group
->
i_id
;
}
vlc_object_release
(
p_playlist
);
}
}
...
...
@@ -615,7 +640,7 @@ static sess_descr_t * parse_sdp( intf_thread_t * p_intf, char *p_packet )
{
psz_end
--
;
}
if
(
psz_end
<=
p_packet
)
{
break
;
...
...
@@ -794,4 +819,3 @@ static ssize_t NetRead( intf_thread_t *p_intf,
return
0
;
#endif
}
src/playlist/group.c
View file @
c7bc1acb
...
...
@@ -2,7 +2,7 @@
* playlist.c : Playlist groups management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: group.c,v 1.
1 2003/10/29 18:00:46
zorglub Exp $
* $Id: group.c,v 1.
2 2003/11/12 08:10:21
zorglub Exp $
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
...
...
@@ -124,3 +124,26 @@ char *playlist_FindGroup( playlist_t *p_playlist, int i_id )
}
return
NULL
;
}
/**
* Find the Id with the given name
*
* \param p_playlist the playlist where to find the group
* \param char * the name to search for
* \return the id of the group
*/
int
playlist_GroupToId
(
playlist_t
*
p_playlist
,
char
*
psz_name
)
{
int
i
;
for
(
i
=
0
;
i
<
p_playlist
->
i_groups
;
i
++
)
{
if
(
p_playlist
->
pp_groups
[
i
]
->
psz_name
)
{
if
(
!
strcasecmp
(
p_playlist
->
pp_groups
[
i
]
->
psz_name
,
psz_name
)
)
{
return
p_playlist
->
pp_groups
[
i
]
->
i_id
;
}
}
}
return
0
;
}
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