Change logging statements for pulseaudio plugin
This removes some useless and annoying logging and on the other hand bumps the prio on more important ones.
This commit is contained in:
@@ -112,16 +112,14 @@ static void pulse_stream_read(pa_stream *p, size_t nbytes, void *userdata)
|
||||
goto exit;
|
||||
|
||||
if (!frames) {
|
||||
blog(LOG_DEBUG,
|
||||
"pulse-input: Got audio hole of %u bytes",
|
||||
blog(LOG_ERROR, "pulse-input: Got audio hole of %u bytes",
|
||||
(unsigned int) bytes);
|
||||
pa_stream_drop(data->stream);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (pa_stream_get_time(data->stream, &pa_time) < 0) {
|
||||
blog(LOG_ERROR,
|
||||
"pulse-input: Failed to get timing info !");
|
||||
blog(LOG_ERROR, "pulse-input: Failed to get timing info !");
|
||||
pa_stream_drop(data->stream);
|
||||
goto exit;
|
||||
}
|
||||
@@ -153,14 +151,19 @@ static void pulse_server_info(pa_context *c, const pa_server_info *i,
|
||||
UNUSED_PARAMETER(c);
|
||||
PULSE_DATA(userdata);
|
||||
|
||||
blog(LOG_INFO, "pulse-input: Server name: '%s %s'",
|
||||
i->server_name, i->server_version);
|
||||
|
||||
data->format = i->sample_spec.format;
|
||||
data->samples_per_sec = i->sample_spec.rate;
|
||||
data->channels = i->sample_spec.channels;
|
||||
|
||||
blog(LOG_DEBUG, "pulse-input: Default format: %s, %u Hz, %u channels",
|
||||
blog(LOG_INFO, "pulse-input: "
|
||||
"Audio format: %s, %u Hz, %u channels with %s timestamps",
|
||||
pa_sample_format_to_string(i->sample_spec.format),
|
||||
i->sample_spec.rate,
|
||||
i->sample_spec.channels);
|
||||
i->sample_spec.channels,
|
||||
(data->ostime) ? "OS" : "PA");
|
||||
|
||||
pulse_signal(0);
|
||||
}
|
||||
@@ -186,8 +189,6 @@ static int_fast32_t pulse_start_recording(struct pulse_data *data)
|
||||
}
|
||||
|
||||
data->bytes_per_frame = pa_frame_size(&spec);
|
||||
blog(LOG_DEBUG, "pulse-input: %u bytes per frame",
|
||||
(unsigned int) data->bytes_per_frame);
|
||||
|
||||
data->stream = pulse_stream_new(obs_source_getname(data->source),
|
||||
&spec, NULL);
|
||||
@@ -223,7 +224,8 @@ static int_fast32_t pulse_start_recording(struct pulse_data *data)
|
||||
return -1;
|
||||
}
|
||||
|
||||
blog(LOG_DEBUG, "pulse-input: Recording started");
|
||||
blog(LOG_INFO, "pulse-input: Started recording from '%s'",
|
||||
data->device);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -239,6 +241,9 @@ static void pulse_stop_recording(struct pulse_data *data)
|
||||
data->stream = NULL;
|
||||
pulse_unlock();
|
||||
}
|
||||
|
||||
blog(LOG_INFO, "pulse-input: Stopped recording from '%s'",
|
||||
data->device);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -396,8 +401,6 @@ static void pulse_destroy(void *vptr)
|
||||
if (data->device)
|
||||
bfree(data->device);
|
||||
bfree(data);
|
||||
|
||||
blog(LOG_DEBUG, "pulse-input: Input destroyed");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user