Skip to content

Instantly share code, notes, and snippets.

void Streamer::setupPipeline() {
pStreamerData->video_switch = gst_element_factory_make("input-selector", "video_switch");
g_object_set(G_OBJECT(pStreamerData->video_switch), "cache-buffers", TRUE, NULL);
pStreamerData->videoTee = gst_element_factory_make("tee", "videoTee");
pStreamerData->twitchQueue = gst_element_factory_make("queue", "twitchQueue");
pStreamerData->twitchsink = gst_element_factory_make("rtmpsink", "twitchsink");
#include <string.h>
#include <gst/gst.h>
#include <string>
static GMainLoop *loop;
static GstElement *pipeline;
static GstElement *src, *dbin, *conv, *tee;
static gboolean linked = FALSE;
static GList *sinks;