ziutek / glib Goto Github PK
View Code? Open in Web Editor NEWGo bindings for GLib type system.
License: Other
Go bindings for GLib type system.
License: Other
I normally run the Ubuntu nightly and I cannot get the glib module. go get github.com/ziutek/glib fails with the following (actually I only need this module for the gst module which as well is failing due to this):
type.go:74:1: error: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
A hack would be to change the cgo command and remove the -Werror flag (in go/src/cmd/cgo/gcc.go), any ideas for a better solution (the package I have installed for glib in ubuntu is libglib2.0-0)
P.S awesome work with the gst and other go modules, I am just getting started with go and these look really what I needed to start shifting my work.
Good afternoon,
I'm trying to connect to the notify::current-level-buffers
signal of the gstreamer 1.0 queue. Unfortunately, the callback parameter needs to be of type GParam
, which is not a type recognized by Type.Match in object.go#L247. (Type.Match() source)
The following is a super simplified version of what I'm trying to do. Any thoughts on either what I'm doing wrong or how to extend this package to handle the signal?
package main
import (
"fmt"
"github.com/ziutek/gst"
)
func main() {
pl := gst.NewPipeline("pipeline")
el := gst.ElementFactoryMake("queue", "queue")
pl.Add(el)
queue := pl.GetByName("queue")
queue.ConnectNoi("notify::current-level-buffers", cbNotifyBuffers, nil)
}
func cbNotifyBuffers(bufferLevel interface{}) {
fmt.Println(bufferLevel)
}
Running I get the following panic:
panic: Callback #0 param. type interface {} doesn't match signal spec GParam
(Obviously the callback shouldn't be an interface{}
, but I don't think there is currently a type which would satisfy Type.Match()
)
Thank you for your help, and for the glib and gst packages!
Hi,
i get following error while trying to install your library.
go get github.com/ziutek/glib
# github.com/ziutek/glib
/tmp/go-build642310031/github.com/ziutek/glib/_obj/type.cgo2.o: In function `_cgo_4dd0e201dc87_Cfunc_g_thread_init':
/usr/share/go/src/pkg/github.com/ziutek/glib/type.go:81: undefined reference to `g_thread_init'
collect2: ld gab 1 als Ende-Status zurück
I've installed libglib2 and libglib2-dev with
sudo apt-get install libglib2.0 and libglib2.0-dev
My system is:
Ubuntu 12.04 LTS
Golang 1.0.1
Thank you!
(might this link has something to do with it?)
http://osdir.com/ml/commits.gnome/2011-10/msg08477.html)
pkg-config --cflags glib-2.0 gobject-2.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
/*
#cgo pkg-config: nice
#include <agent.h>
*/
import "C"
agent := C.nice_agent_new(C.g_main_context_default(), C.NICE_COMPATIBILITY_RFC5245)
obj := &glib.Object{}
obj.SetPtr((glib.Pointer)(agent))
obj.Connect("component-state-changed", onStateChange, nil)
func (agent *C.NiceAgent, str, comp, state C.guint, data glib.Pointer) {
}
...
panic: Callback #0 param. type nice._Ctype_struct__NiceAgent doesn't match signal source: NiceAgent
Reference: http://nice.freedesktop.org/libnice/NiceAgent.html#NiceAgent-component-state-changed
Callback #1 param. type int doesn't match signal spec gint
error raised at ubuntu 13.10
when go install github.com/ziutek/gst
I get this error during install:
1: error: 'g_value_set_schar' undeclared (first use in this function)
1: note: each undeclared identifier is reported only once for each function it appears
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.