Skip to content

Commit 2f29cbb

Browse files
committed
pipeline: reintroduce image snapshots
Adds back possibility to save JPEG snapshots of the pipeline's stream. This change depends on fixing a crash in pipewiresink: https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/418
1 parent 9e4dc6a commit 2f29cbb

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

gaeguli/gaeguli-internal.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@
3434

3535
#define GAEGULI_PIPELINE_TAG "gaeguli.pipeline_id"
3636

37-
#define GAEGULI_PIPELINE_VSRC_STR "\
38-
%s ! capsfilter name=caps ! %s ! pipewiresink mode=provide stream-properties=%s "
37+
#define GAEGULI_PIPELINE_VSRC_BASE_STR "\
38+
%s ! capsfilter name=caps ! %s ! tee name=t ! pipewiresink mode=provide stream-properties=%s "
3939

4040
#define GAEGULI_PIPELINE_IMAGE_STR "\
41-
valve name=valve drop=1 ! jpegenc name=jpegenc ! jifmux name=jifmux ! fakesink name=fakesink async=0"
41+
t. ! valve name=valve drop=1 ! jpegenc name=jpegenc ! jifmux name=jifmux ! fakesink name=fakesink async=0"
42+
43+
#define GAEGULI_PIPELINE_VSRC_STR \
44+
GAEGULI_PIPELINE_VSRC_BASE_STR GAEGULI_PIPELINE_IMAGE_STR
4245

4346
#define GAEGULI_PIPELINE_GENERAL_H264ENC_STR "\
4447
pipewiresrc path=%u do-timestamp=true ! queue name=enc_first ! videoconvert ! x264enc name=enc tune=zerolatency key-int-max=%d ! \

gaeguli/pipeline.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,7 @@ _get_vsrc_pipeline_string (GaeguliPipeline * self)
604604
g_autofree gchar *source = _get_source_description (self);
605605
g_autofree gchar *props = _get_stream_props_description (self);
606606

607-
/* FIXME - pipewiresink along with another sink in the pipeline *
608-
* do not provide the captured video to the consumer pipeline. *
609-
* Hence its inclusion is diabled. *
610-
* This should be a sepearate target. */
611-
return g_strdup_printf
612-
(GAEGULI_PIPELINE_VSRC_STR, source,
607+
return g_strdup_printf (GAEGULI_PIPELINE_VSRC_STR, source,
613608
self->source == GAEGULI_VIDEO_SOURCE_NVARGUSCAMERASRC ? "" :
614609
GAEGULI_PIPELINE_DECODEBIN_STR, props);
615610
}

0 commit comments

Comments
 (0)