mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-12 02:23:43 +00:00
dump fourcc
This commit is contained in:
@@ -185,8 +185,11 @@ static int _dump_sink(const char *sink_name, unsigned sink_timeout, const char *
|
|||||||
const long double now = get_now_monotonic();
|
const long double now = get_now_monotonic();
|
||||||
const long long now_second = floor_ms(now);
|
const long long now_second = floor_ms(now);
|
||||||
|
|
||||||
LOG_VERBOSE("Frame: size=%zu, resolution=%ux%u, format=%u, stride=%u, online=%d",
|
char fourcc_str[8];
|
||||||
frame->used, frame->width, frame->height, frame->format, frame->stride, frame->online);
|
LOG_VERBOSE("Frame: size=%zu, resolution=%ux%u, fourcc=%s, stride=%u, online=%d",
|
||||||
|
frame->used, frame->width, frame->height,
|
||||||
|
fourcc_to_string(frame->format, fourcc_str, 8),
|
||||||
|
frame->stride, frame->online);
|
||||||
|
|
||||||
LOG_DEBUG(" grab_ts=%.3Lf, encode_begin_ts=%.3Lf, encode_end_ts=%.3Lf, latency=%.3Lf",
|
LOG_DEBUG(" grab_ts=%.3Lf, encode_begin_ts=%.3Lf, encode_end_ts=%.3Lf, latency=%.3Lf",
|
||||||
frame->grab_ts, frame->encode_begin_ts, frame->encode_end_ts, now - frame->grab_ts);
|
frame->grab_ts, frame->encode_begin_ts, frame->encode_end_ts, now - frame->grab_ts);
|
||||||
|
|||||||
@@ -501,18 +501,17 @@ static int _device_open_format(device_s *dev, bool first) {
|
|||||||
|
|
||||||
// Check format
|
// Check format
|
||||||
if (fmt.fmt.pix.pixelformat != dev->format) {
|
if (fmt.fmt.pix.pixelformat != dev->format) {
|
||||||
char format_obtained_str[8];
|
|
||||||
char *format_str_nullable;
|
|
||||||
|
|
||||||
LOG_ERROR("Could not obtain the requested pixelformat=%s; driver gave us %s",
|
LOG_ERROR("Could not obtain the requested pixelformat=%s; driver gave us %s",
|
||||||
_format_to_string_supported(dev->format),
|
_format_to_string_supported(dev->format),
|
||||||
_format_to_string_supported(fmt.fmt.pix.pixelformat));
|
_format_to_string_supported(fmt.fmt.pix.pixelformat));
|
||||||
|
|
||||||
if ((format_str_nullable = (char *)_format_to_string_nullable(fmt.fmt.pix.pixelformat)) != NULL) {
|
char *format_str;
|
||||||
LOG_INFO("Falling back to pixelformat=%s", format_str_nullable);
|
if ((format_str = (char *)_format_to_string_nullable(fmt.fmt.pix.pixelformat)) != NULL) {
|
||||||
|
LOG_INFO("Falling back to pixelformat=%s", format_str);
|
||||||
} else {
|
} else {
|
||||||
|
char fourcc_str[8];
|
||||||
LOG_ERROR("Unsupported pixelformat=%s (fourcc)",
|
LOG_ERROR("Unsupported pixelformat=%s (fourcc)",
|
||||||
fourcc_to_string(fmt.fmt.pix.pixelformat, format_obtained_str, 8));
|
fourcc_to_string(fmt.fmt.pix.pixelformat, fourcc_str, 8));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user