Skip to content

Commit 59161c6

Browse files
committed
Add support framerate param for v4l2 source
1 parent 93252fc commit 59161c6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/v4l2/producer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ func Open(rawURL string) (*Producer, error) {
6565
return nil, err
6666
}
6767

68+
if fps := core.Atoi(query.Get("framerate")); fps > 0 {
69+
if err = dev.SetParam(uint32(fps)); err != nil {
70+
return nil, err
71+
}
72+
}
73+
6874
medias := []*core.Media{
6975
{
7076
Kind: core.KindVideo,

0 commit comments

Comments
 (0)