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
195e8427
Commit
195e8427
authored
Jan 16, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* DAAP: add meta-information, delete hosts when they leave
* SAP : coding style fixes * Some fogotten playlist_*Info
parent
6c0ceeb3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
16 deletions
+46
-16
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+3
-2
modules/gui/macosx/playlistinfo.m
modules/gui/macosx/playlistinfo.m
+1
-1
modules/gui/wince/playlist.cpp
modules/gui/wince/playlist.cpp
+1
-1
modules/misc/playlist/m3u.c
modules/misc/playlist/m3u.c
+2
-1
modules/services_discovery/daap.c
modules/services_discovery/daap.c
+31
-1
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+7
-9
src/playlist/view.c
src/playlist/view.c
+1
-1
No files found.
modules/gui/macosx/playlist.m
View file @
195e8427
...
...
@@ -670,7 +670,8 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
o_current_name
=
[
NSString
stringWithUTF8String
:
p_item
->
pp_children
[
i_current
]
->
input
.
psz_name
];
psz_temp
=
playlist_ItemGetInfo
(
p_item
,
_
(
"Meta-information"
),
_
(
"Author"
)
);
psz_temp
=
vlc_input_item_GetInfo
(
&
p_item
->
input
,
_
(
"Meta-information"
),
_
(
"Author"
)
);
o_current_author
=
[
NSString
stringWithUTF8String
:
psz_temp
];
free
(
psz_temp
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
...
...
@@ -1003,7 +1004,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
else
if
(
[[
o_tc
identifier
]
isEqualToString
:
@"2"
]
)
{
char
*
psz_temp
;
psz_temp
=
playlist_ItemGetInfo
(
p_item
,
_
(
"Meta-information"
),
_
(
"Artist"
)
);
psz_temp
=
vlc_input_item_GetInfo
(
&
p_item
->
input
,
_
(
"Meta-information"
),
_
(
"Artist"
)
);
if
(
psz_temp
==
NULL
)
o_value
=
@""
;
...
...
modules/gui/macosx/playlistinfo.m
View file @
195e8427
...
...
@@ -115,7 +115,7 @@
[
NSString
stringWithUTF8String
:
p_item
->
input
.
psz_name
]];
}
psz_temp
=
playlist_ItemGetInfo
(
p_item
,
_
(
"General"
),
_
(
"Author"
)
);
psz_temp
=
vlc_input_item_GetInfo
(
&
p_item
->
input
,
_
(
"General"
),
_
(
"Author"
)
);
vlc_mutex_unlock
(
&
p_item
->
input
.
lock
);
if
(
psz_temp
)
...
...
modules/gui/wince/playlist.cpp
View file @
195e8427
...
...
@@ -613,7 +613,7 @@ void Playlist::UpdateItem( int i )
ListView_SetItemText
(
hListView
,
i
,
0
,
_FROMMB
(
p_item
->
input
.
psz_name
)
);
ListView_SetItemText
(
hListView
,
i
,
1
,
_FROMMB
(
playlist_ItemGetInfo
(
p_item
,
_FROMMB
(
vlc_input_item_GetInfo
(
&
p_item
->
input
,
_
(
"General"
)
,
_
(
"Author"
)
)
)
);
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
...
...
modules/misc/playlist/m3u.c
View file @
195e8427
...
...
@@ -64,7 +64,8 @@ int Export_M3U( vlc_object_t *p_this )
p_playlist
->
pp_items
[
i
]
->
input
.
psz_uri
)
)
{
char
*
psz_author
=
playlist_GetInfo
(
p_playlist
,
i
,
_
(
"General"
),
_
(
"Author"
)
);
vlc_input_item_GetInfo
(
&
p_playlist
->
pp_items
[
i
]
->
input
,
_
(
"General"
),
_
(
"Author"
)
);
fprintf
(
p_export
->
p_file
,
"#EXTINF:%i,%s,%s
\n
"
,
(
int
)(
p_playlist
->
pp_items
[
i
]
->
input
.
i_duration
/
1000000
),
...
...
modules/services_discovery/daap.c
View file @
195e8427
...
...
@@ -454,11 +454,27 @@ static void OnHostsUpdate( services_discovery_t *p_sd )
{
int
i
;
for
(
i
=
0
;
i
<
p_sd
->
p_sys
->
p_db
->
i_hosts
;
i
++
)
{
p_sd
->
p_sys
->
p_db
->
pp_hosts
[
i
]
->
b_updated
=
VLC_FALSE
;
p_sd
->
p_sys
->
p_db
->
pp_hosts
[
i
]
->
b_new
=
VLC_FALSE
;
}
vlc_mutex_lock
(
&
p_sd
->
p_sys
->
p_db
->
search_lock
);
DAAP_Client_EnumerateHosts
(
p_sd
->
p_sys
->
p_client
,
EnumerateCallback
,
p_sd
);
for
(
i
=
0
;
i
<
p_sd
->
p_sys
->
p_db
->
i_hosts
;
i
++
)
{
if
(
p_sd
->
p_sys
->
p_db
->
pp_hosts
[
i
]
->
b_updated
==
VLC_FALSE
)
{
host_t
*
p_host
=
p_sd
->
p_sys
->
p_db
->
pp_hosts
[
i
];
FreeHost
(
p_sd
,
p_host
);
REMOVE_ELEM
(
p_sd
->
p_sys
->
p_db
->
pp_hosts
,
p_sd
->
p_sys
->
p_db
->
i_hosts
,
i
);
}
}
vlc_mutex_unlock
(
&
p_sd
->
p_sys
->
p_db
->
search_lock
);
/* FIXME: Handle the list better: remove old hosts, ... */
for
(
i
=
0
;
i
<
p_sd
->
p_sys
->
p_db
->
i_hosts
;
i
++
)
{
if
(
p_sd
->
p_sys
->
p_db
->
pp_hosts
[
i
]
->
b_new
)
...
...
@@ -585,6 +601,10 @@ static void ProcessHost( services_discovery_t *p_sd, host_t *p_host )
p_host
->
p_songs
[
i
].
id
);
p_item
=
playlist_ItemNew
(
p_sd
,
psz_buff
,
p_host
->
p_songs
[
i
].
itemname
);
vlc_input_item_AddInfo
(
&
p_item
->
input
,
_
(
"Meta-Information"
),
_
(
"Artist"
),
p_host
->
p_songs
[
i
].
songartist
);
vlc_input_item_AddInfo
(
&
p_item
->
input
,
_
(
"Meta-Information"
),
_
(
"Album"
),
p_host
->
p_songs
[
i
].
songalbum
);
playlist_NodeAddItem
(
p_playlist
,
p_item
,
VIEW_CATEGORY
,
p_host
->
p_node
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
...
...
@@ -598,11 +618,21 @@ static void ProcessHost( services_discovery_t *p_sd, host_t *p_host )
static
void
FreeHost
(
services_discovery_t
*
p_sd
,
host_t
*
p_host
)
{
playlist_t
*
p_playlist
;
if
(
p_host
->
p_host
)
{
DAAP_ClientHost_Disconnect
(
p_host
->
p_host
);
DAAP_ClientHost_Release
(
p_host
->
p_host
);
}
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_sd
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
playlist_NodeDelete
(
p_playlist
,
p_host
->
p_node
,
VLC_TRUE
);
vlc_object_release
(
p_playlist
);
}
if
(
p_host
->
p_songs
)
free
(
p_host
->
p_songs
);
}
modules/services_discovery/sap.c
View file @
195e8427
...
...
@@ -358,7 +358,6 @@ static int OpenDemux( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
/* Probe for SDP */
if
(
p_demux
->
s
)
{
...
...
@@ -381,9 +380,8 @@ static int OpenDemux( vlc_object_t *p_this )
{
int
i_read
=
stream_Read
(
p_demux
->
s
,
&
psz_sdp
[
i_sdp
],
i_max_sdp
-
i_sdp
-
1
);
if
(
i_read
<
0
)
{
msg_Err
(
p_demux
,
"failed to read SDP"
);
goto
error
;
...
...
@@ -400,27 +398,27 @@ static int OpenDemux( vlc_object_t *p_this )
i_max_sdp
+=
1000
;
psz_sdp
=
(
uint8_t
*
)
realloc
(
psz_sdp
,
i_max_sdp
);
}
p_sdp
=
ParseSDP
(
VLC_OBJECT
(
p_demux
),
psz_sdp
);
if
(
!
p_sdp
)
{
msg_Warn
(
p_demux
,
"invalid SDP"
);
goto
error
;
}
if
(
p_sdp
->
i_media
>
1
)
{
goto
error
;
}
if
(
ParseConnection
(
VLC_OBJECT
(
p_demux
),
p_sdp
)
)
{
p_sdp
->
psz_uri
=
NULL
;
}
if
(
p_sdp
->
i_media_type
!=
33
&&
p_sdp
->
i_media_type
!=
32
&&
p_sdp
->
i_media_type
!=
14
)
goto
error
;
if
(
p_sdp
->
psz_uri
==
NULL
)
goto
error
;
p_demux
->
p_sys
=
(
demux_sys_t
*
)
malloc
(
sizeof
(
demux_sys_t
)
);
...
...
@@ -431,7 +429,7 @@ static int OpenDemux( vlc_object_t *p_this )
free
(
psz_sdp
);
if
(
p_sdp
)
FreeSDP
(
p_sdp
);
return
VLC_SUCCESS
;
error:
free
(
psz_sdp
);
if
(
p_sdp
)
FreeSDP
(
p_sdp
);
...
...
src/playlist/view.c
View file @
195e8427
...
...
@@ -338,7 +338,7 @@ int playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root,
if
(
p_root
->
pp_children
[
i
]
->
i_children
>
-
1
)
{
playlist_NodeDelete
(
p_playlist
,
p_root
->
pp_children
[
i
],
b_delete_items
);
b_delete_items
);
}
else
if
(
b_delete_items
)
{
...
...
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