mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
GST pipelines refactor.
This commit is contained in:
@ -68,11 +68,6 @@ GstElement *gstreamer_send_create_pipeline(char *pipeline) {
|
||||
return gst_parse_launch(pipeline, &error);
|
||||
}
|
||||
|
||||
void gstreamer_send_destroy_pipeline(GstElement *pipeline) {
|
||||
gst_element_set_state(pipeline, GST_STATE_NULL);
|
||||
gst_object_unref(pipeline);
|
||||
}
|
||||
|
||||
void gstreamer_send_start_pipeline(GstElement *pipeline, int pipelineId) {
|
||||
SampleHandlerUserData *s = calloc(1, sizeof(SampleHandlerUserData));
|
||||
s->pipelineId = pipelineId;
|
||||
@ -95,4 +90,5 @@ void gstreamer_send_play_pipeline(GstElement *pipeline) {
|
||||
|
||||
void gstreamer_send_stop_pipeline(GstElement *pipeline) {
|
||||
gst_element_set_state(pipeline, GST_STATE_NULL);
|
||||
gst_object_unref(pipeline);
|
||||
}
|
||||
|
@ -210,11 +210,6 @@ func CreatePipeline(pipelineStr string, codecName string, clockRate float32) (*P
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// Destroy GStreamer Pipeline
|
||||
func (p *Pipeline) DestroyPipeline() {
|
||||
C.gstreamer_send_destroy_pipeline(p.Pipeline)
|
||||
}
|
||||
|
||||
// Start starts the GStreamer Pipeline
|
||||
func (p *Pipeline) Start() {
|
||||
C.gstreamer_send_start_pipeline(p.Pipeline, C.int(p.id))
|
||||
|
@ -9,7 +9,6 @@
|
||||
extern void goHandlePipelineBuffer(void *buffer, int bufferLen, int samples, int pipelineId);
|
||||
|
||||
GstElement *gstreamer_send_create_pipeline(char *pipeline);
|
||||
void gstreamer_send_destroy_pipeline(GstElement *pipeline);
|
||||
|
||||
void gstreamer_send_start_pipeline(GstElement *pipeline, int pipelineId);
|
||||
void gstreamer_send_play_pipeline(GstElement *pipeline);
|
||||
|
Reference in New Issue
Block a user