diff --git a/pkg/gst/gst.c b/pkg/gst/gst.c index edcc4a29..e538f5d1 100644 --- a/pkg/gst/gst.c +++ b/pkg/gst/gst.c @@ -1,15 +1,5 @@ #include "gst.h" -void gstreamer_init(void) { - gst_init(NULL, NULL); -} - -GMainLoop *gstreamer_main_loop = NULL; -void gstreamer_loop(void) { - gstreamer_main_loop = g_main_loop_new (NULL, FALSE); - g_main_loop_run(gstreamer_main_loop); -} - static void gstreamer_pipeline_log(GstPipelineCtx *ctx, char* level, const char* format, ...) { va_list argptr; va_start(argptr, format); diff --git a/pkg/gst/gst.go b/pkg/gst/gst.go index e98d80fd..e21afda1 100644 --- a/pkg/gst/gst.go +++ b/pkg/gst/gst.go @@ -33,9 +33,7 @@ var pipelinesLock sync.Mutex var registry *C.GstRegistry func init() { - C.gstreamer_init() - go C.gstreamer_loop() - + C.gst_init(nil, nil) registry = C.gst_registry_get() } diff --git a/pkg/gst/gst.h b/pkg/gst/gst.h index 64598569..a562ec34 100644 --- a/pkg/gst/gst.h +++ b/pkg/gst/gst.h @@ -25,6 +25,3 @@ void gstreamer_pipeline_push(GstPipelineCtx *ctx, void *buffer, int bufferLen); gboolean gstreamer_pipeline_set_prop_int(GstPipelineCtx *ctx, char *binName, char *prop, gint value); gboolean gstreamer_pipeline_set_caps_framerate(GstPipelineCtx *ctx, const gchar* binName, gint numerator, gint denominator); gboolean gstreamer_pipeline_set_caps_resolution(GstPipelineCtx *ctx, const gchar* binName, gint width, gint height); - -void gstreamer_init(void); -void gstreamer_loop(void);