Archived
2
0

remove wait timer from goroutine

This commit is contained in:
mbattista
2023-01-29 18:49:40 +01:00
committed by Miroslav Šedivý
parent 79a1c41938
commit 628c6a1b77
4 changed files with 11 additions and 23 deletions

View File

@ -37,7 +37,7 @@ func init() {
registry = C.gst_registry_get()
}
func CreatePipeline(pipelineStr string) (*Pipeline, error) {
func CreatePipeline(pipelineStr string, sampleChannel chan types.Sample) (*Pipeline, error) {
id := atomic.AddInt32(&pSerial, 1)
pipelineStrUnsafe := C.CString(pipelineStr)
@ -63,7 +63,7 @@ func CreatePipeline(pipelineStr string) (*Pipeline, error) {
Int("pipeline_id", int(id)).Logger(),
Src: pipelineStr,
Ctx: ctx,
Sample: make(chan types.Sample),
Sample: sampleChannel,
}
pipelines[p.id] = p