Feat/http maintainance - #7
Conversation
| combPort string | ||
| presPort string | ||
| camPort string |
There was a problem hiding this comment.
You can retrieve the values from the daemonConfig struct which is the first member of daemon, and used during construction of the httpServer instance in main. Perhaps add a helper function to daemonController so that we can avoid duplicating the {comb,pres,cam}Port fields.
| newP, err := newPipeline(&d.daemonConfig) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| d.mu.Lock() | ||
| d.pipeline = newP | ||
| d.metrics.pipelineStats = newPipelineStats() | ||
| d.mu.Unlock() | ||
|
|
||
| d.registerBusWatch() | ||
| newP.pipeline.SetState(gst.StatePlaying) | ||
| return nil |
There was a problem hiding this comment.
Why not call runPipeline directly? Make sure to move gst.Init(&os.Args) in runPipeline to main, because this must be only called once. My bad.
| d.metrics.pipelineStats = newPipelineStats() | ||
| d.mu.Unlock() | ||
|
|
||
| d.registerBusWatch() |
There was a problem hiding this comment.
Before creating a new pipeline, I think you'll need to unregister the bus with p.GetBus().removeWatch. Can you add a unregisterBusWatch method next to registerBusWatch (
LectureMix/streamd/gstreamer_bus.go
Line 25 in d210cde
There was a problem hiding this comment.
There was a problem hiding this comment.
Have you tested, whether restarting of the pipeline works, and that all objects are gc'd eventually?
There was a problem hiding this comment.
My sanity check wasn't very thorough, I did it with a local test source which worked well.
|
Thanks for implementing this :D |
Adds a simple http status page allowing
Also drops
gst_all_1.gst-vaapfrom shell.nix, which was merged intogst-plugins-bad.