gst remove main loop.

This commit is contained in:
Miroslav Šedivý 2022-09-11 22:56:17 +02:00
parent c793ff1ff6
commit d35c237f48
3 changed files with 1 additions and 16 deletions

View File

@ -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);

View File

@ -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()
}

View File

@ -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);