I know using RequestPadSimple() isn’t the correct way, but at least it gets something working.
videoMuxPadName := fmt.Sprintf("sink_%d", 0x40) // VLC Info: Stream 0, Original ID 65
audioMuxPadName := fmt.Sprintf("sink_%d", 0x41) // VLC Info: Stream 1, Original ID 66
// Link x265Queue to mpegtsmux
x265QueueSrcPad := e.x265Queue.GetStaticPad("src")
if x265QueueSrcPad == nil {
log.Fatalf("FATAL: Failed to get src pad from x265Queue")
}
mpegtsmuxVideoSinkPad := e.mpegtsmux.RequestPadSimple(videoMuxPadName)
if mpegtsmuxVideoSinkPad == nil {
log.Fatalf("FATAL: Failed to request %s pad from mpegtsmux", videoMuxPadName)
}
if x265QueueSrcPad.Link(mpegtsmuxVideoSinkPad) != gst.PadLinkOK {
log.Fatalf("FATAL: Failed to link x265Queue to mpegtsmux")
}
// Link aacQueue to mpegtsmux
aacQueueSrcPad := e.aacQueue.GetStaticPad("src")
if aacQueueSrcPad == nil {
log.Fatalf("FATAL: Failed to get src pad from aacQueue")
}
mpegtsmuxAudioSinkPad := e.mpegtsmux.RequestPadSimple(audioMuxPadName)
if mpegtsmuxAudioSinkPad == nil {
log.Fatalf("FATAL: Failed to request %s from mpegtsmux", audioMuxPadName)
}
if aacQueueSrcPad.Link(mpegtsmuxAudioSinkPad) != gst.PadLinkOK {
log.Fatalf("FATAL: Failed to link aacQueue to mpegtsmux")
}
I need a way to set the PIDs and other acronyms I don’t understand, in addition to service_provider and service-name metadata. I think the pads need to be given caps in some way… Please will someone enlighten me?