examples: video-src-fixate.c cleanup example

Cleanup printed messages and rename memfd.
This commit is contained in:
columbarius 2021-11-10 21:43:10 +01:00
parent 2c10894970
commit 1c922958bc

View file

@ -176,7 +176,7 @@ static void on_process(void *userdata)
buf = b->buffer; buf = b->buffer;
if ((p = buf->datas[0].data) == NULL) { if ((p = buf->datas[0].data) == NULL) {
printf("No data ptr"); printf("No data ptr\n");
goto done; goto done;
} }
@ -330,7 +330,7 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer)
d[0].type = SPA_DATA_MemFd; d[0].type = SPA_DATA_MemFd;
d[0].flags = SPA_DATA_FLAG_READWRITE; d[0].flags = SPA_DATA_FLAG_READWRITE;
#ifdef HAVE_MEMFD_CREATE #ifdef HAVE_MEMFD_CREATE
d[0].fd = memfd_create("video-src-memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING); d[0].fd = memfd_create("video-src-fixate-memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING);
#else #else
d[0].fd = -1; d[0].fd = -1;
#endif #endif
@ -449,7 +449,7 @@ on_stream_param_changed(void *_data, uint32_t id, const struct spa_pod *param)
pw_stream_update_params(stream, params, 3); pw_stream_update_params(stream, params, 3);
return; return;
} }
printf("no fixation needed\n"); printf("no fixation required\n");
blocks = 1; blocks = 1;
size = data->stride * data->format.size.height; size = data->stride * data->format.size.height;
stride = data->stride; stride = data->stride;