如何在 C 语言中使用 GstSplitMuxSink?
How to use GstSplitMuxSink in C?
我尝试使用 GstSplitMuxSink 的 "format-location" 信号:
g_signal_connect(splitmuxsink, "format-location",
G_CALLBACK (on_format_location), NULL);
...
gchar* on_format_location(GstSplitMuxSink *splitmux, guint fragment_id,
gpointer user_data);
但是看到:
error: unknown type name ‘GstSplitMuxSink’
我在 .c 文件中包含 gst/gst.h,但这还不够。
这是 gstreamer-devel 的解决方案
The plugin headers are not public. You can't include them. Just use
GstElement * splitmux instead. Also see
$ gst-inspect-1.0 splitmuxsink
... Element Signals:
"format-location" : gchararray user_function (GstElement* object,
guint arg0,
gpointer user_data);
我尝试使用 GstSplitMuxSink 的 "format-location" 信号:
g_signal_connect(splitmuxsink, "format-location",
G_CALLBACK (on_format_location), NULL);
...
gchar* on_format_location(GstSplitMuxSink *splitmux, guint fragment_id,
gpointer user_data);
但是看到:
error: unknown type name ‘GstSplitMuxSink’
我在 .c 文件中包含 gst/gst.h,但这还不够。
这是 gstreamer-devel 的解决方案
The plugin headers are not public. You can't include them. Just use GstElement * splitmux instead. Also see
$ gst-inspect-1.0 splitmuxsink ... Element Signals:
"format-location" : gchararray user_function (GstElement* object, guint arg0, gpointer user_data);