I don’t understand the C code example, so a simple explanation could help. However, my goal is to implement this in Go using the generated bindings being developed by @RSWilli.
Specifically, is this correct way to get a sink pad
Thank you @jbb194, but the gstreamer documentation is far from helpful and there’s a lot more to it than that. sink_%d could be something like sink_41, but finding the numbers for HECV and ACC is proving impossible. I also think other metadata needs to be added somehow. The new generated bindings don’t have any documentation at this time, making it difficult to know if a particular data type, function, variable or constant even exists.
When you request a pad you provide the pad template name as a string. For mpegtsmux that is ‘sink_%d’. Exactly like that, with both the underscore and the percentage sign.
So if Go works the same as C:
How do you specify if it’s for video or audio?
For mpegtsmux you don’t specify that via the pad name, gstreamer will negotiate the caps. Or you can use capsfilters I guess.
I agree it’s confusing though, since the _%d makes it seem like some kind of placeholder and not an actual name you’re supposed to use.