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
11e89954
Commit
11e89954
authored
Dec 06, 2012
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UPNP SD: extract all resources from DIDL.
Fixes #7776
parent
59d6ab77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
23 deletions
+28
-23
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+28
-23
No files found.
modules/services_discovery/upnp.cpp
View file @
11e89954
...
@@ -874,18 +874,20 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
...
@@ -874,18 +874,20 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
if
(
!
title
)
if
(
!
title
)
continue
;
continue
;
const
char
*
resource
=
/* Try to extract all resources in DIDL */
xml_getChildElementValue
(
itemElement
,
"res"
);
IXML_NodeList
*
p_resource_list
=
ixmlDocument_getElementsByTagName
(
(
IXML_Document
*
)
itemElement
,
"res"
);
if
(
p_resource_list
)
if
(
!
resource
)
{
continue
;
int
i_length
=
ixmlNodeList_length
(
p_resource_list
);
for
(
int
i
=
0
;
i
<
i_length
;
i
++
)
const
char
*
psz_duration
=
xml_getChildElementAttributeValue
(
itemElement
,
{
"res"
,
"duration"
);
mtime_t
i_duration
=
-
1
;
mtime_t
i_duration
=
-
1
;
int
i_hours
,
i_minutes
,
i_seconds
,
i_decis
;
int
i_hours
,
i_minutes
,
i_seconds
,
i_decis
;
IXML_Element
*
p_resource
=
(
IXML_Element
*
)
ixmlNodeList_item
(
p_resource_list
,
i
);
const
char
*
psz_resource_url
=
xml_getChildElementValue
(
p_resource
,
"res"
);
if
(
!
psz_resource_url
)
continue
;
const
char
*
psz_duration
=
ixmlElement_getAttribute
(
p_resource
,
"duration"
);
if
(
psz_duration
)
if
(
psz_duration
)
{
{
...
@@ -896,10 +898,13 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
...
@@ -896,10 +898,13 @@ bool MediaServer::_fetchContents( Container* p_parent, int i_offset )
i_seconds
)
+
i_seconds
)
+
INT64_C
(
100000
)
*
i_decis
;
INT64_C
(
100000
)
*
i_decis
;
}
}
Item
*
item
=
new
Item
(
p_parent
,
objectID
,
title
,
psz_resource_url
,
i_duration
);
Item
*
item
=
new
Item
(
p_parent
,
objectID
,
title
,
resource
,
i_duration
);
p_parent
->
addItem
(
item
);
p_parent
->
addItem
(
item
);
}
}
ixmlNodeList_free
(
p_resource_list
);
}
else
continue
;
}
ixmlNodeList_free
(
itemNodeList
);
ixmlNodeList_free
(
itemNodeList
);
}
}
...
...
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