Example #1
0
func getH264RTPReceiver(t *testing.T) *gst.Bin {
	launch := "udpsrc uri=udp://127.0.0.1:5000 caps=\"application/x-rtp,media=(string)video\" ! rtph264depay ! decodebin ! autovideosink sync=false"
	rtpPlayBin, err := gst.ParseBinFromDescription(launch)
	if rtpPlayBin == nil {
		t.Fatal("Error parsing bin (" + err.Error() + "): " + launch)
	}
	return rtpPlayBin
}
Example #2
0
func getH264RTPSender(t *testing.T) *gst.Bin {
	launch := "filesrc location=./t/test.mp4 ! qtdemux name=demuxer  demuxer.video_0 ! rtph264pay config-interval=1 ! udpsink host=127.0.0.1 port=5000"
	rtpSendBin, err := gst.ParseBinFromDescription(launch)
	if rtpSendBin == nil {
		t.Fatal("Error parsing bin (" + err.Error() + "): " + launch)
	}
	return rtpSendBin
}