fix appsrc example

This commit is contained in:
RSWilli
2025-09-16 22:36:07 +02:00
parent 2c6d87b1f3
commit 003d2c3e89
3 changed files with 10 additions and 281 deletions

View File

@@ -43,10 +43,11 @@ func createPipeline() (gst.Pipeline, error) {
videoInfo.SetFramerate(2, 1)
ok = src.SetCaps(videoInfo.ToCaps())
if !ok {
return nil, fmt.Errorf("failed to set caps on appsrc")
}
caps := videoInfo.ToCaps()
fmt.Println("Caps:", caps.String())
src.SetObjectProperty("caps", caps)
src.SetObjectProperty("format", gst.FormatTime)
// Initialize a frame counter