Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
4a9c72b8
Commit
4a9c72b8
authored
Dec 02, 2022
by
Shaun Ren
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Parse all tag events in query_tags.
Some gstreamer plugins, such as asfdemux, generate multiple tag events.
parent
bdc67e95
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
wg_parser.c
dlls/winegstreamer/wg_parser.c
+26
-12
No files found.
dlls/winegstreamer/wg_parser.c
View file @
4a9c72b8
...
...
@@ -1276,25 +1276,31 @@ static gboolean src_event_cb(GstPad *pad, GstObject *parent, GstEvent *event)
static
void
query_tags
(
struct
wg_parser_stream
*
stream
)
{
const
gchar
*
struct_name
;
GstTagList
*
tag_list
;
GstEvent
*
tag_event
;
guint
i
,
tag_count
;
const
GValue
*
val
;
GstSample
*
sample
;
GstBuffer
*
buf
;
gsize
size
;
guint
i
,
j
;
if
(
!
(
tag_event
=
gst_pad_get_sticky_event
(
stream
->
their_src
,
GST_EVENT_TAG
,
0
)))
return
;
stream
->
tags
[
WG_PARSER_TAG_NAME
]
=
NULL
;
stream
->
tags
[
WG_PARSER_TAG_LANGUAGE
]
=
NULL
;
i
=
0
;
while
((
tag_event
=
gst_pad_get_sticky_event
(
stream
->
their_src
,
GST_EVENT_TAG
,
i
++
)))
{
GstTagList
*
tag_list
;
gst_event_parse_tag
(
tag_event
,
&
tag_list
);
gst_tag_list_get_string
(
tag_list
,
"language-code"
,
&
stream
->
tags
[
WG_PARSER_TAG_LANGUAGE
]);
if
(
!
stream
->
tags
[
WG_PARSER_TAG_NAME
])
{
/* Extract stream name from Quick Time demuxer private tag where it puts unrecognized chunks. */
tag_count
=
gst_tag_list_get_tag_size
(
tag_list
,
"private-qt-tag"
);
for
(
i
=
0
;
i
<
tag_count
;
++
i
)
const
GValue
*
val
;
GstSample
*
sample
;
GstBuffer
*
buf
;
gsize
size
;
guint
tag_count
=
gst_tag_list_get_tag_size
(
tag_list
,
"private-qt-tag"
);
for
(
j
=
0
;
j
<
tag_count
;
++
j
)
{
if
(
!
(
val
=
gst_tag_list_get_value_index
(
tag_list
,
"private-qt-tag"
,
i
)))
if
(
!
(
val
=
gst_tag_list_get_value_index
(
tag_list
,
"private-qt-tag"
,
j
)))
continue
;
if
(
!
GST_VALUE_HOLDS_SAMPLE
(
val
)
||
!
(
sample
=
gst_value_get_sample
(
val
)))
continue
;
...
...
@@ -1316,7 +1322,15 @@ static void query_tags(struct wg_parser_stream *stream)
}
stream
->
tags
[
WG_PARSER_TAG_NAME
][
size
]
=
0
;
}
}
if
(
!
stream
->
tags
[
WG_PARSER_TAG_LANGUAGE
])
{
gst_tag_list_get_string
(
tag_list
,
GST_TAG_LANGUAGE_CODE
,
&
stream
->
tags
[
WG_PARSER_TAG_LANGUAGE
]);
}
gst_event_unref
(
tag_event
);
}
}
static
NTSTATUS
wg_parser_connect
(
void
*
args
)
...
...
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