Skip to content

Feat/http maintainance - #7

Open
joschahenningsen wants to merge 2 commits into
mainfrom
feat/http-maintainance
Open

Feat/http maintainance#7
joschahenningsen wants to merge 2 commits into
mainfrom
feat/http-maintainance

Conversation

@joschahenningsen

Copy link
Copy Markdown
Member

Adds a simple http status page allowing

  • access to system and pipeline stats
  • restarting the pipeline
  • access to logs

Also drops gst_all_1.gst-vaap from shell.nix, which was merged into gst-plugins-bad.

image image

Comment thread shell.nix
Comment thread streamd/http.go
Comment on lines +13 to +15
combPort string
presPort string
camPort string

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread streamd/main.go
Comment on lines +148 to +160
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread streamd/main.go
d.metrics.pipelineStats = newPipelineStats()
d.mu.Unlock()

d.registerBusWatch()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (

return p.GetBus().AddWatch(func(msg *gst.Message) bool {
)?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested, whether restarting of the pipeline works, and that all objects are gc'd eventually?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My sanity check wasn't very thorough, I did it with a local test source which worked well.

@hmelder

hmelder commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks for implementing this :D
The information displayed is good for now. However, I really want to add information from the Decklink capture cards as well to get connectivity information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants