Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a5b37333
Commit
a5b37333
authored
Jan 28, 2016
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upnp: getNextItem: Cosmetics
parent
a1efb1a9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
24 deletions
+14
-24
modules/services_discovery/upnp.cpp
modules/services_discovery/upnp.cpp
+13
-23
modules/services_discovery/upnp.hpp
modules/services_discovery/upnp.hpp
+1
-1
No files found.
modules/services_discovery/upnp.cpp
View file @
a5b37333
...
...
@@ -718,7 +718,7 @@ input_item_t* MediaServer::newItem( const char *objectID, const char *title )
return
p_item
;
}
input_item_t
*
MediaServer
::
newItem
(
const
char
*
title
,
const
char
*
,
const
char
*
,
input_item_t
*
MediaServer
::
newItem
(
const
char
*
title
,
const
char
*
,
mtime_t
duration
,
const
char
*
psz_url
)
{
return
input_item_NewWithTypeExt
(
psz_url
,
title
,
0
,
NULL
,
0
,
...
...
@@ -910,35 +910,26 @@ input_item_t* MediaServer::getNextItem()
if
(
itemNodeList_
)
{
for
(
;
!
p_item
&&
itemNodeIndex_
<
ixmlNodeList_length
(
itemNodeList_
)
;
itemNodeIndex_
++
)
for
(
;
!
p_item
&&
itemNodeIndex_
<
ixmlNodeList_length
(
itemNodeList_
)
;
itemNodeIndex_
++
)
{
IXML_Element
*
itemElement
=
(
IXML_Element
*
)
ixmlNodeList_item
(
itemNodeList_
,
IXML_Element
*
itemElement
=
(
IXML_Element
*
)
ixmlNodeList_item
(
itemNodeList_
,
itemNodeIndex_
);
const
char
*
objectID
=
ixmlElement_getAttribute
(
itemElement
,
"id"
);
const
char
*
objectID
=
ixmlElement_getAttribute
(
itemElement
,
"id"
);
if
(
!
objectID
)
continue
;
const
char
*
title
=
xml_getChildElementValue
(
itemElement
,
"dc:title"
);
const
char
*
title
=
xml_getChildElementValue
(
itemElement
,
"dc:title"
);
if
(
!
title
)
continue
;
const
char
*
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"sec:CaptionInfo"
);
const
char
*
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"sec:CaptionInfo"
);
if
(
!
psz_subtitles
)
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"sec:CaptionInfoEx"
);
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"sec:CaptionInfoEx"
);
if
(
!
psz_subtitles
)
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"pv:subtitlefile"
);
psz_subtitles
=
xml_getChildElementValue
(
itemElement
,
"pv:subtitlefile"
);
/* Try to extract all resources in DIDL */
IXML_NodeList
*
p_resource_list
=
ixmlDocument_getElementsByTagName
(
(
IXML_Document
*
)
itemElement
,
"res"
);
...
...
@@ -954,14 +945,13 @@ input_item_t* MediaServer::getNextItem()
if
(
psz_duration
)
{
int
i_hours
,
i_minutes
,
i_seconds
;
if
(
sscanf
(
psz_duration
,
"%d:%02d:%02d"
,
&
i_hours
,
&
i_minutes
,
&
i_seconds
)
)
i_duration
=
INT64_C
(
1000000
)
*
(
i_hours
*
3600
+
i_minutes
*
60
+
if
(
sscanf
(
psz_duration
,
"%d:%02d:%02d"
,
&
i_hours
,
&
i_minutes
,
&
i_seconds
)
)
i_duration
=
INT64_C
(
1000000
)
*
(
i_hours
*
3600
+
i_minutes
*
60
+
i_seconds
);
}
p_item
=
newItem
(
title
,
objectID
,
psz_subtitles
,
i_duration
,
p_item
=
newItem
(
title
,
objectID
,
i_duration
,
psz_resource_url
);
}
ixmlNodeList_free
(
p_resource_list
);
...
...
modules/services_discovery/upnp.hpp
View file @
a5b37333
...
...
@@ -147,7 +147,7 @@ private:
void
fetchContents
();
input_item_t
*
newItem
(
const
char
*
objectID
,
const
char
*
title
);
input_item_t
*
newItem
(
const
char
*
title
,
const
char
*
psz_objectID
,
const
char
*
psz_subtitles
,
mtime_t
duration
,
const
char
*
psz_url
);
input_item_t
*
newItem
(
const
char
*
title
,
const
char
*
psz_objectID
,
mtime_t
duration
,
const
char
*
psz_url
);
IXML_Document
*
_browseAction
(
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
...
...
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