I want to use libgstreamer and I’m struggling really hard.
package main
import "core:fmt"
import "core:os"
foreign import gstreamer "libgstreamer-1.0.dylib"
//foreign import gstreamer "/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.dylib"
@(default_calling_convention="c")
foreign gstreamer {
// void gst_init(int *argc, char **argv[]);
gst_init :: proc(argc: ^int, argv: ^^cstring) ---
}
main :: proc() {
fmt.println(os.args[0]) // executable name
fmt.println(os.args[1:]) // the rest of the arguments
gst_init(nil, nil) // from docs: It's allowed to pass two NULL pointers to gst_init in case you don't want to pass the command line args to GStreamer.
}
odin run . -extra-linker-flags:“-L/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/”
I tried with and without ‘.dylib’, I tried things with system: ... etc.
I didn’t move the gstreamer folder to my odin project folder cause I don’t want 1.6gig of files for every project I need gstreamer for. If it’s not possible to link against ‘/Library/Frameworks/…/something’?
If no other way then I’m ok with moving the framework to my odin folder.
Hope someone can help?