mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
wpe: Use the new element.get_current_running_time API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2504>
This commit is contained in:
parent
0531eebf51
commit
f7cbbb5d9a
1 changed files with 3 additions and 16 deletions
|
@ -269,7 +269,6 @@ gst_wpe_src_push_audio_buffer (GstWpeSrc* src, guint32 id, guint64 size)
|
|||
{
|
||||
GstWpeAudioPad *audio_pad = GST_WPE_AUDIO_PAD (g_hash_table_lookup (src->audio_src_pads, GUINT_TO_POINTER (id)));
|
||||
GstBuffer *buffer;
|
||||
GstClock *clock;
|
||||
|
||||
g_return_if_fail (audio_pad->fd > 0);
|
||||
|
||||
|
@ -280,21 +279,9 @@ gst_wpe_src_push_audio_buffer (GstWpeSrc* src, guint32 id, guint64 size)
|
|||
munmap (data, size);
|
||||
gst_buffer_add_audio_meta (buffer, &audio_pad->info, size, NULL);
|
||||
|
||||
clock = gst_element_get_clock (GST_ELEMENT_CAST (src));
|
||||
if (clock) {
|
||||
GstClockTime now;
|
||||
GstClockTime base_time = gst_element_get_base_time (GST_ELEMENT_CAST (src));
|
||||
|
||||
now = gst_clock_get_time (clock);
|
||||
if (now > base_time)
|
||||
now -= base_time;
|
||||
else
|
||||
now = 0;
|
||||
gst_object_unref (clock);
|
||||
|
||||
audio_pad->buffer_time = now;
|
||||
GST_BUFFER_DTS (buffer) = audio_pad->buffer_time;
|
||||
}
|
||||
audio_pad->buffer_time = gst_element_get_current_running_time (GST_ELEMENT (src));
|
||||
GST_BUFFER_DTS (buffer) = audio_pad->buffer_time;
|
||||
GST_BUFFER_PTS (buffer) = audio_pad->buffer_time;
|
||||
|
||||
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DISCONT);
|
||||
if (audio_pad->discont_pending) {
|
||||
|
|
Loading…
Reference in a new issue