datarhei / gosrt

Implementation of the SRT protocol in pure Go
https://datarhei.com
MIT License
114 stars 17 forks source link

Blackmagic Web Presenter HD - Unimplemented extension #68

Closed moschopsuk closed 1 month ago

moschopsuk commented 1 month ago

Hello,

The Blackmagic Web Presenter HD is able to output SRT streams and i have been playing around this this and this library. It seem that this hardware encode is unable to connect to this SRT library, it works fine with the haivision SRT library but sadly not this go version.

Looking around and after some debugging it seems to be related to how this library is checking the SRT extensions as i can see this error being received.

unimplemented extension (48385)

If I comment out the following from the packet.go everything works correctly. So I’m not sure if this is red herring, or should we reject a connection for a missing extension.

            c.StreamId = strings.TrimRight(b.String(), "\x00")
        } //else {
        //  return fmt.Errorf("unimplemented extension (%d)", extensionType)
        //}

Many Thanks.

ioppermann commented 1 month ago

@moschopsuk Thanks for pointing that out. Indeed, the unimplemented extension can be skipped so far as they are currently not relevent to this implementation. Now only an error will be thrown if there's an unknown (as per the specs) extension.