feat: Add Echo web API and integrate NDI monitoring

This commit is contained in:
gari 2025-04-12 19:45:03 +02:00
parent 3f6d52f3bd
commit f6be41cb9e
7 changed files with 157 additions and 135 deletions

View file

@ -1,34 +1,12 @@
package gstreamer
import (
"context"
"fmt"
"github.com/go-gst/go-gst/gst"
"github.com/goccy/go-graphviz"
"github.com/goccy/go-graphviz/cgraph"
)
func gstreamerBinToPNG(bin *gst.Bin, filename string) error {
ctx := context.Background()
g, err := graphviz.New(ctx)
if err != nil {
return fmt.Errorf("error creating graphviz context: %w", err)
}
dotString := bin.DebugBinToDotData(gst.DebugGraphShowAll)
graph, err := cgraph.ParseBytes([]byte(dotString))
if err != nil {
return err
}
//graph.SetDPI(150)
//setFontSize(graph, 20)
if err := g.RenderFilename(ctx, graph, graphviz.PNG, filename); err != nil {
return fmt.Errorf("error rendering graph: %w", err)
}
return nil
func gstreamerBinToDot(bin *gst.Bin) string {
return bin.DebugBinToDotData(gst.DebugGraphShowAll)
}
func setFontSize(graph *cgraph.Graph, fontSize float64) {