GithubHelp home page GithubHelp logo

glib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

glib's Issues

g_thread_init depreciated, cannot compile the module on the ubuntu nightly builds

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.

GParam signal callback parameter

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!

Compile error

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

Can not connect to signal

/*
#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

compile problem

I get this error during install:

github.com/ziutek/glib

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.