mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
interaudio: Use GST_DEBUG_OBJECT() instead of GST_DEBUG()
This commit is contained in:
parent
6f72e8ceab
commit
8c5a8c76f6
2 changed files with 9 additions and 7 deletions
|
@ -194,7 +194,7 @@ gst_inter_audio_sink_start (GstBaseSink * sink)
|
|||
{
|
||||
GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
|
||||
|
||||
GST_DEBUG ("start");
|
||||
GST_DEBUG_OBJECT (interaudiosink, "start");
|
||||
|
||||
interaudiosink->surface = gst_inter_surface_get (interaudiosink->channel);
|
||||
g_mutex_lock (&interaudiosink->surface->mutex);
|
||||
|
@ -209,7 +209,7 @@ gst_inter_audio_sink_stop (GstBaseSink * sink)
|
|||
{
|
||||
GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
|
||||
|
||||
GST_DEBUG ("stop");
|
||||
GST_DEBUG_OBJECT (interaudiosink, "stop");
|
||||
|
||||
g_mutex_lock (&interaudiosink->surface->mutex);
|
||||
gst_adapter_clear (interaudiosink->surface->audio_adapter);
|
||||
|
@ -247,14 +247,15 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
|
|||
GstInterAudioSink *interaudiosink = GST_INTER_AUDIO_SINK (sink);
|
||||
int n, bpf;
|
||||
|
||||
GST_DEBUG ("render %" G_GSIZE_FORMAT, gst_buffer_get_size (buffer));
|
||||
GST_DEBUG_OBJECT (interaudiosink, "render %" G_GSIZE_FORMAT,
|
||||
gst_buffer_get_size (buffer));
|
||||
bpf = interaudiosink->info.bpf;
|
||||
|
||||
g_mutex_lock (&interaudiosink->surface->mutex);
|
||||
n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4;
|
||||
#define SIZE 1600
|
||||
if (n > SIZE * 3) {
|
||||
GST_WARNING ("flushing %d samples", SIZE / 2);
|
||||
GST_WARNING_OBJECT (interaudiosink, "flushing %d samples", SIZE / 2);
|
||||
gst_adapter_flush (interaudiosink->surface->audio_adapter,
|
||||
(SIZE / 2) * bpf);
|
||||
}
|
||||
|
|
|
@ -315,7 +315,7 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
|
|||
0 ? gst_adapter_available (interaudiosrc->surface->audio_adapter) /
|
||||
bpf : 0;
|
||||
if (n > SIZE * 3) {
|
||||
GST_WARNING ("flushing %d samples", SIZE / 2);
|
||||
GST_WARNING_OBJECT (interaudiosrc, "flushing %d samples", SIZE / 2);
|
||||
gst_adapter_flush (interaudiosrc->surface->audio_adapter, (SIZE / 2) * bpf);
|
||||
n -= (SIZE / 2);
|
||||
}
|
||||
|
@ -345,7 +345,8 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
|
|||
GstMapInfo map;
|
||||
GstMemory *mem;
|
||||
|
||||
GST_WARNING ("creating %d samples of silence", SIZE - n);
|
||||
GST_WARNING_OBJECT (interaudiosrc, "creating %d samples of silence",
|
||||
SIZE - n);
|
||||
mem = gst_allocator_alloc (NULL, (SIZE - n) * bpf, NULL);
|
||||
if (gst_memory_map (mem, &map, GST_MAP_WRITE)) {
|
||||
gst_audio_format_fill_silence (interaudiosrc->info.finfo, map.data,
|
||||
|
@ -401,7 +402,7 @@ gst_inter_audio_src_query (GstBaseSrc * src, GstQuery * query)
|
|||
|
||||
max_latency = min_latency;
|
||||
|
||||
GST_ERROR_OBJECT (src,
|
||||
GST_DEBUG_OBJECT (src,
|
||||
"report latency min %" GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
|
||||
|
||||
|
|
Loading…
Reference in a new issue