Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
613ca7b1
Commit
613ca7b1
authored
Apr 15, 2019
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dashdec: add ProgramInformation parser
Signed-off-by:
Steven Liu
<
lq@chinaffmpeg.org
>
parent
df9ef925
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
dashdec.c
libavformat/dashdec.c
+30
-0
No files found.
libavformat/dashdec.c
View file @
613ca7b1
...
...
@@ -1161,6 +1161,34 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
return
0
;
}
static
int
parse_programinformation
(
AVFormatContext
*
s
,
xmlNodePtr
node
)
{
xmlChar
*
val
=
NULL
;
node
=
xmlFirstElementChild
(
node
);
while
(
node
)
{
if
(
!
av_strcasecmp
(
node
->
name
,
"Title"
))
{
val
=
xmlNodeGetContent
(
node
);
if
(
val
)
{
av_dict_set
(
&
s
->
metadata
,
"Title"
,
val
,
0
);
}
}
else
if
(
!
av_strcasecmp
(
node
->
name
,
"Source"
))
{
val
=
xmlNodeGetContent
(
node
);
if
(
val
)
{
av_dict_set
(
&
s
->
metadata
,
"Source"
,
val
,
0
);
}
}
else
if
(
!
av_strcasecmp
(
node
->
name
,
"Copyright"
))
{
val
=
xmlNodeGetContent
(
node
);
if
(
val
)
{
av_dict_set
(
&
s
->
metadata
,
"Copyright"
,
val
,
0
);
}
}
node
=
xmlNextElementSibling
(
node
);
xmlFree
(
val
);
}
return
0
;
}
static
int
parse_manifest
(
AVFormatContext
*
s
,
const
char
*
url
,
AVIOContext
*
in
)
{
DASHContext
*
c
=
s
->
priv_data
;
...
...
@@ -1310,6 +1338,8 @@ static int parse_manifest(AVFormatContext *s, const char *url, AVIOContext *in)
if
(
c
->
period_start
>
0
)
c
->
media_presentation_duration
=
c
->
period_duration
;
}
}
else
if
(
!
av_strcasecmp
(
node
->
name
,
"ProgramInformation"
))
{
parse_programinformation
(
s
,
node
);
}
node
=
xmlNextElementSibling
(
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