mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-01 06:12:07 +08:00
add postprocessor to fix missing pkg config and header include
This commit is contained in:
14
generator.go
14
generator.go
@@ -122,7 +122,7 @@ var Data = genmain.Overlay(
|
|||||||
Postprocessors: map[string][]girgen.Postprocessor{
|
Postprocessors: map[string][]girgen.Postprocessor{
|
||||||
"Gst-1": {ElementFactoryMakeWithProperties},
|
"Gst-1": {ElementFactoryMakeWithProperties},
|
||||||
"GstMpegts-1": {GstUseUnstableAPI},
|
"GstMpegts-1": {GstUseUnstableAPI},
|
||||||
"GstWebRTC-1": {GstUseUnstableAPI},
|
"GstWebRTC-1": {GstUseUnstableAPI, FixWebrtcPkgConfig},
|
||||||
},
|
},
|
||||||
Filters: []types.FilterMatcher{
|
Filters: []types.FilterMatcher{
|
||||||
// these collide and are not really useful:
|
// these collide and are not really useful:
|
||||||
@@ -238,6 +238,18 @@ func GstUseUnstableAPI(nsgen *girgen.NamespaceGenerator) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FixWebrtcPkgConfig(nsgen *girgen.NamespaceGenerator) error {
|
||||||
|
for _, f := range nsgen.Files {
|
||||||
|
// see: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8433, remove after release
|
||||||
|
f.Header().AddPackage("gstreamer-sdp-1.0")
|
||||||
|
|
||||||
|
// see https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8470 , remove after release
|
||||||
|
f.Header().IncludeC("gst/webrtc/sctptransport.h")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func ElementFactoryMakeWithProperties(nsgen *girgen.NamespaceGenerator) error {
|
func ElementFactoryMakeWithProperties(nsgen *girgen.NamespaceGenerator) error {
|
||||||
fg := nsgen.MakeFile("elementfactory.go")
|
fg := nsgen.MakeFile("elementfactory.go")
|
||||||
fg.Header().NeedsExternGLib()
|
fg.Header().NeedsExternGLib()
|
||||||
|
@@ -22,6 +22,7 @@ import (
|
|||||||
// #define GST_USE_UNSTABLE_API // APIs in this package are unstable
|
// #define GST_USE_UNSTABLE_API // APIs in this package are unstable
|
||||||
// #include <stdlib.h>
|
// #include <stdlib.h>
|
||||||
// #include <glib-object.h>
|
// #include <glib-object.h>
|
||||||
|
// #include <gst/webrtc/sctptransport.h>
|
||||||
// #include <gst/webrtc/webrtc.h>
|
// #include <gst/webrtc/webrtc.h>
|
||||||
// extern void callbackDelete(gpointer);
|
// extern void callbackDelete(gpointer);
|
||||||
// extern void _gotk4_gstwebrtc1_WebRTCICETransport_ConnectOnSelectedCandidatePairChange(gpointer, guintptr);
|
// extern void _gotk4_gstwebrtc1_WebRTCICETransport_ConnectOnSelectedCandidatePairChange(gpointer, guintptr);
|
||||||
|
@@ -16,6 +16,7 @@ import (
|
|||||||
|
|
||||||
// #define GST_USE_UNSTABLE_API // APIs in this package are unstable
|
// #define GST_USE_UNSTABLE_API // APIs in this package are unstable
|
||||||
// #include <stdlib.h>
|
// #include <stdlib.h>
|
||||||
|
// #include <gst/webrtc/sctptransport.h>
|
||||||
// #include <gst/webrtc/webrtc.h>
|
// #include <gst/webrtc/webrtc.h>
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user