Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marc-André Lureau
gst-plugins-good
Commits
f26835d8
Commit
f26835d8
authored
Apr 07, 2017
by
Lyon Wang
Committed by
Sebastian Dröge
Apr 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scaletempo: Scale GAP event timestamp and duration like for buffers
https://bugzilla.gnome.org/show_bug.cgi?id=781008
parent
7b7a8098
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
gst/audiofx/gstscaletempo.c
gst/audiofx/gstscaletempo.c
+16
-0
No files found.
gst/audiofx/gstscaletempo.c
View file @
f26835d8
...
...
@@ -651,6 +651,22 @@ gst_scaletempo_sink_event (GstBaseTransform * trans, GstEvent * event)
}
else
if
(
GST_EVENT_TYPE
(
event
)
==
GST_EVENT_FLUSH_STOP
)
{
gst_segment_init
(
&
scaletempo
->
in_segment
,
GST_FORMAT_UNDEFINED
);
gst_segment_init
(
&
scaletempo
->
out_segment
,
GST_FORMAT_UNDEFINED
);
}
else
if
(
GST_EVENT_TYPE
(
event
)
==
GST_EVENT_GAP
)
{
if
(
scaletempo
->
scale
!=
1
.
0
)
{
GstClockTime
gap_ts
,
gap_duration
;
gst_event_parse_gap
(
event
,
&
gap_ts
,
&
gap_duration
);
if
(
scaletempo
->
reverse
)
{
gap_ts
=
scaletempo
->
in_segment
.
stop
-
gap_ts
;
}
else
{
gap_ts
=
gap_ts
-
scaletempo
->
in_segment
.
start
;
}
gap_ts
=
gap_ts
/
scaletempo
->
scale
+
scaletempo
->
in_segment
.
start
;
if
(
GST_CLOCK_TIME_IS_VALID
(
gap_duration
))
{
gap_duration
=
gap_duration
/
ABS
(
scaletempo
->
scale
);
}
gst_event_unref
(
event
);
event
=
gst_event_new_gap
(
gap_ts
,
gap_duration
);
}
}
return
GST_BASE_TRANSFORM_CLASS
(
parent_class
)
->
sink_event
(
trans
,
event
);
...
...
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