mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
pulse: conditionally compile newer stuff
configured_sink/source_usec in the timing_info is only since 0.9.11 so conditionally compile this information. fixes #590038
This commit is contained in:
parent
2d88251d9d
commit
9c341347ba
2 changed files with 16 additions and 2 deletions
|
@ -535,18 +535,25 @@ gst_pulsering_stream_latency_cb (pa_stream * s, void *userdata)
|
|||
GstPulseSink *psink;
|
||||
GstPulseRingBuffer *pbuf;
|
||||
const pa_timing_info *info;
|
||||
pa_usec_t sink_usec;
|
||||
|
||||
info = pa_stream_get_timing_info (s);
|
||||
|
||||
pbuf = GST_PULSERING_BUFFER_CAST (userdata);
|
||||
psink = GST_PULSESINK_CAST (GST_OBJECT_PARENT (pbuf));
|
||||
|
||||
#if HAVE_PULSE_0_9_11
|
||||
sink_usec = info->configured_sink_usec;
|
||||
#else
|
||||
sink_usec = 0;
|
||||
#endif
|
||||
|
||||
GST_LOG_OBJECT (psink,
|
||||
"latency_update, %" G_GUINT64_FORMAT ", %d:%" G_GINT64_FORMAT ", %d:%"
|
||||
G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT,
|
||||
GST_TIMEVAL_TO_TIME (info->timestamp), info->write_index_corrupt,
|
||||
info->write_index, info->read_index_corrupt, info->read_index,
|
||||
info->sink_usec, info->configured_sink_usec);
|
||||
info->sink_usec, sink_usec);
|
||||
}
|
||||
|
||||
/* This method should create a new stream of the given @spec. No playback should
|
||||
|
|
|
@ -521,15 +521,22 @@ gst_pulsesrc_stream_latency_update_cb (pa_stream * s, void *userdata)
|
|||
{
|
||||
GstPulseSrc *pulsesrc = GST_PULSESRC_CAST (userdata);
|
||||
const pa_timing_info *info;
|
||||
pa_usec_t source_usec;
|
||||
|
||||
info = pa_stream_get_timing_info (s);
|
||||
|
||||
#if HAVE_PULSE_0_9_11
|
||||
source_usec = info->configured_source_usec;
|
||||
#else
|
||||
source_usec = 0;
|
||||
#endif
|
||||
|
||||
GST_LOG_OBJECT (pulsesrc,
|
||||
"latency_update, %" G_GUINT64_FORMAT ", %d:%" G_GINT64_FORMAT ", %d:%"
|
||||
G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT,
|
||||
GST_TIMEVAL_TO_TIME (info->timestamp), info->write_index_corrupt,
|
||||
info->write_index, info->read_index_corrupt, info->read_index,
|
||||
info->source_usec, info->configured_source_usec);
|
||||
info->source_usec, source_usec);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue