Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
e4e38f9a
Commit
e4e38f9a
authored
Mar 28, 2012
by
Mark Nauwelaerts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpackenc: query downstream for BYTE seeking support
parent
03bde3f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
ext/wavpack/gstwavpackenc.c
ext/wavpack/gstwavpackenc.c
+19
-0
No files found.
ext/wavpack/gstwavpackenc.c
View file @
e4e38f9a
...
...
@@ -783,6 +783,8 @@ gst_wavpack_enc_rewrite_first_block (GstWavpackEnc * enc)
{
GstSegment
segment
;
gboolean
ret
;
GstQuery
*
query
;
gboolean
seekable
=
FALSE
;
g_return_if_fail
(
enc
);
g_return_if_fail
(
enc
->
first_block
);
...
...
@@ -791,6 +793,23 @@ gst_wavpack_enc_rewrite_first_block (GstWavpackEnc * enc)
WavpackUpdateNumSamples
(
enc
->
wp_context
,
enc
->
first_block
);
/* try to seek to the beginning of the output */
query
=
gst_query_new_seeking
(
GST_FORMAT_BYTES
);
if
(
gst_pad_peer_query
(
GST_AUDIO_ENCODER_SRC_PAD
(
enc
),
query
))
{
GstFormat
format
;
gst_query_parse_seeking
(
query
,
&
format
,
&
seekable
,
NULL
,
NULL
);
if
(
format
!=
GST_FORMAT_BYTES
)
seekable
=
FALSE
;
}
else
{
GST_LOG_OBJECT
(
enc
,
"SEEKING query not handled"
);
}
gst_query_unref
(
query
);
if
(
!
seekable
)
{
GST_DEBUG_OBJECT
(
enc
,
"downstream not seekable; not rewriting"
);
return
;
}
gst_segment_init
(
&
segment
,
GST_FORMAT_BYTES
);
ret
=
gst_pad_push_event
(
GST_AUDIO_ENCODER_SRC_PAD
(
enc
),
gst_event_new_segment
(
&
segment
));
...
...
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