mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-24 00:03:27 +08:00
fix linting and add GstContext
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/tinyzimmer/go-gst/gst"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func capsWeirdness() {
|
||||
gst.Init(nil)
|
||||
|
||||
caps := gst.NewCapsFromString("audio/x-raw")
|
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/tinyzimmer/go-gst/gst"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func wait() {
|
||||
gst.Init(nil)
|
||||
|
||||
clock := gst.ObtainSystemClock()
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
func sleep() {
|
||||
go func() {
|
||||
C.sleep(1000000000)
|
||||
fmt.Println("I slept")
|
||||
|
21
hack/test.c
21
hack/test.c
@@ -1,21 +0,0 @@
|
||||
#include <gst/gst.h>
|
||||
#include <stdio.h>
|
||||
|
||||
gboolean caps_map_func (GstCapsFeatures * features, GstStructure * structure, gpointer user_data)
|
||||
{
|
||||
printf(gst_caps_features_to_string(features));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int main () {
|
||||
gst_init(NULL, NULL);
|
||||
|
||||
GstCaps * caps = gst_caps_from_string("audio/x-raw");
|
||||
|
||||
gst_caps_filter_and_map_in_place(caps, caps_map_func, NULL);
|
||||
gst_caps_foreach(caps, caps_map_func, NULL);
|
||||
|
||||
gst_caps_unref(caps);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user