Go bindings for GStreamer (retired: currently I don't use/develop this package)

Retired. I don't use/develop this package anymore.

Go bindings for GStreamer at a very early stage of maturity.

This package is based on GLib bindings. It should be goinstalable. Try

$ go get github.com/ziutek/gst

Documentation

See examples directory and http://gopkgdoc.appspot.com/pkg/github.com/ziutek/gst

To run examples use go run command:

$ cd examples
$ go run simple.go

To run live WebM example use go run live_webm.go and open http://127.0.0.1:8080 with your browser. You probably need to wait a long time for video because of small bitrate of this stream and big buffer in you browser.

Owner
Comments
  • 'g_type_init' is deprecated

    'g_type_init' is deprecated

    I get the following error when trying to go get this library:

    # github.com/ziutek/glib
    type.go:19:1: error: 'g_type_init' is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Werror=deprecated-declarations]
     )
     ^
    cc1: all warnings being treated as errors
    

    I also tried running the examples, they don't work either, giving the same error.

    I'm on Arch Linux x64, Go 1.1, GCC 4.8.1.

  • issues running live_web.go example on go 1.4.1

    issues running live_web.go example on go 1.4.1

    GST_DEBUG=3 go run live_webm.go 0:00:00.023227292 4260 0xc67090 WARN structure gststructure.c:195:gst_structure_validate_name: Invalid character ',' at offset 11 in structure name: video/x-raw,format=yuv

    (live_webm:4260): GStreamer-CRITICAL **: gst_structure_new_empty: assertion 'gst_structure_validate_name (name)' failed

    (live_webm:4260): GStreamer-CRITICAL **: gst_structure_take_value: assertion 'structure != NULL' failed

    (live_webm:4260): GStreamer-CRITICAL **: gst_structure_take_value: assertion 'structure != NULL' failed

    (live_webm:4260): GStreamer-CRITICAL **: gst_structure_take_value: assertion 'structure != NULL' failed 0:00:00.025233199 4260 0xc720a0 FIXME default gstutils.c:3643:gst_pad_create_stream_id_internal: Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:00.029249741 4260 0xc720a0 WARN basesrc gstbasesrc.c:2933:gst_base_src_loop: error: Internal data flow error. 0:00:00.029347884 4260 0xc720a0 WARN basesrc gstbasesrc.c:2933:gst_base_src_loop: error: streaming task paused, reason not-linked (-1)

    go version go1.4.2 linux/amd64 gstreamer version 1.4.3.

  • Added basic support for: GstAllocator, GstAppSrc, GstBuffer

    Added basic support for: GstAllocator, GstAppSrc, GstBuffer

    Due to lack of push-behaviour I added some basic GstAppSrc and GstBuffer support which allows to allocate buffer and push it to AppSrc element inside "need-data" handler.

  • Windows 8.1 - go.exe get github.com/ziutek/gst fails

    Windows 8.1 - go.exe get github.com/ziutek/gst fails

    I have not found any documentation how to install it for windows 8.1? in windows 8.1 when i apply

    C:\Go\bin>go.exe get github.com/ziutek/gst
    # pkg-config --cflags glib-2.0 gobject-2.0 gthread-2.0
    pkg-config: exec: "pkg-config": executable file not found in %PATH%
    

    Can you please show me how to make it work? (i have Gstreamer SDK in C:\gstreamer\1.0..)

  • live_webm example broken in go 1.4.1

    live_webm example broken in go 1.4.1

    I've tested the gstreamer bindings in osx.

    gstreamer 1.4.5, go 1.4.1 (built with swig support) are installed, as well as all the dependencies

    The simple example works ok (replacing xvimagesink for autovideosink), but the live_webm fails building and launching it as shown. Any ideas on what's going on?

    fatal error: attempt to execute C code on Go stack

    runtime stack: runtime.throw(0x444a625) /usr/local/Cellar/go/1.4.1/libexec/src/runtime/panic.go:491 +0xad badc() /usr/local/Cellar/go/1.4.1/libexec/src/runtime/stack.c:891 +0x2a runtime.onM(0x4465370) /usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:257 +0x68 runtime.mstart() /usr/local/Cellar/go/1.4.1/libexec/src/runtime/proc.c:818

    goroutine 1 [running]: runtime.switchtoM() /usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:198 fp=0xc208009a90 sp=0xc208009a88 runtime.morestackc() /usr/local/Cellar/go/1.4.1/libexec/src/runtime/stack.c:885 +0x1e fp=0xc208009aa8 sp=0xc208009a90 runtime.sighandler(0x5082120, 0x0, 0x0, 0x0) /usr/local/Cellar/go/1.4.1/libexec/src/runtime/signal_amd64x.c:44 +0x14 fp=0xc208009ab0 sp=0xc208009aa8

    goroutine 5 [syscall, locked to thread]: github.com/ziutek/glib._Cfunc_mp_wait(0x0) /Users/bleedinge/src/go/src/github.com/ziutek/glib/:517 +0x4d github.com/ziutek/glib.callbackLoop() /Users/bleedinge/src/go/src/github.com/ziutek/glib/object.go:417 +0x1f created by github.com/ziutek/glib.init·1 /Users/bleedinge/src/go/src/github.com/ziutek/glib/object.go:423 +0x25

    goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/Cellar/go/1.4.1/libexec/src/runtime/asm_amd64.s:2232 +0x1

  • segfault in (*Message).ParseError

    segfault in (*Message).ParseError

    I get a segfault when trying to parse a error message from gstreamer.

    *** glibc detected *** /usr/local/bin/rtp-receiver: free(): invalid pointer: 0x00fd9040 ***
    SIGABRT: abort
    PC=0xb6c1acdc
    
    goroutine 43 [syscall]:
    runtime.cgocall(0xf7f8, 0x8246cb88)
        /usr/lib/go/src/pkg/runtime/cgocall.c:142 +0xdc fp=0x8246cb78 sp=0x8246cb4c
    github.com/ziutek/gst._Cfunc_free(0xfd9040)
        github.com/ziutek/gst/_obj/_cgo_defun.c:82 +0x34 fp=0x8246cb84 sp=0x8246cb78
    github.com/ziutek/gst.(*Message).ParseError(0x10b9c08, 0x96b92bc0, 0x96b2c680, 0x73)
        /home/pi/.go/src/github.com/ziutek/gst/message.go:157 +0x188 fp=0x8246cba8 sp=0x8246cb84
    main.(*Manager).onMessage(0x96b00540, 0x96b0b7a8, 0x10b9c08)
        /home/pi/go/streaming/common-client.go:49 +0xd0 fp=0x8246cc1c sp=0x8246c
    [..]
    

    I tried it with different go versions without any change in behavior.

    My current workaround is to comment out two lines in the library to not make it free the two pointers:

    func (m *Message) ParseError() (err *glib.Error, debug string) {
            var d *C.gchar
            var     e, ret_e *C.GError
    
            C.gst_message_parse_error(m.g(), &e, &d)
            // prevent segfaults by not freeing the pointer
            //defer C.free(unsafe.Pointer(e))
            //defer C.free(unsafe.Pointer(d))
    
            debug = C.GoString((*C.char)(d))
            ret_e = new(C.GError)
            *ret_e = *e
            err = (*glib.Error)(unsafe.Pointer(ret_e))
            return
    }
    

    I'm not sure, if this is the way to fix it. I guess it creates a memory leak.

Related tags
Go bindings for GLFW 3

GLFW 3.3 for Go Installation GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have d

Dec 25, 2022
Go bindings for OpenGL (generated via glow)

gl This repository holds Go bindings to various OpenGL versions. They are auto-generated using Glow. Features: Go functions that mirror the C specific

Dec 12, 2022
Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Aug 18, 2018
Go bindings for audio capture and playback with ALSA and libasound

Go ALSA bindings These bindings allow capture and playback of audio via ALSA using the alsa-lib library. Installation go get github.com/cocoonlife/goa

Nov 26, 2022
naive go bindings to GnuPlot
naive go bindings to GnuPlot

go-gnuplot Simple-minded functions to work with gnuplot. go-gnuplot runs gnuplot as a subprocess and pushes commands via the STDIN of that subprocess.

Nov 8, 2021
go-gtk3 - GTK3 BINDINGS FOR GO

go-gtk3 - GTK3 BINDINGS FOR GO THIS IS: Hopefully GTK3 Bindings using gobject binding for Go. Goal is to have fairly complete gtk3 widgets with pango

May 25, 2021
Experimental OpenAL bindings for Go.

Experimental OpenAL bindings for Go. ==================================== Everything is evolving quickly and nothing is totally done. If you want to

Jul 24, 2022
Go bindings for OpenCV / 2.x API in gocv / 1.x API in opencv

Go OpenCV binding A Golang binding for OpenCV. OpenCV 1.x C API bindings through CGO, and OpenCV 2+ C++ API (GoCV) through SWIG. Disclaimer This is a

Dec 21, 2022
Go bindings for libVLC and high-level media player interface
Go bindings for libVLC and high-level media player interface

Go bindings for libVLC 2.X/3.X/4.X and high-level media player interface. The package can be useful for adding multimedia capabilities to applications

Dec 31, 2022
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).
Go bindings for OpenCV1.1 (Dev/Zero Dependencies).

Go语言QQ群: 102319854, 1055927514 凹语言(凹读音“Wa”)(The Wa Programming Language): https://github.com/wa-lang/wa Go bindings for OpenCV1.1 PkgDoc: http://godoc

Dec 6, 2022
Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio.

pulse-simple Cgo bindings to PulseAudio's Simple API, for easily playing or capturing raw audio. The full Simple API is supported, including channel m

Dec 17, 2022
Vulkan API bindings for Go programming language
Vulkan API bindings for Go programming language

Golang Bindings for Vulkan API Package vulkan provides Go bindings for Vulkan — a low-overhead, cross-platform 3D graphics and compute API. Updated Oc

Jan 3, 2023
Go cross-platform OpenGL bindings.

gl Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API. It supports: macOS, Linux and Windows via OpenGL 2.1 backend, i

Nov 21, 2022
Rasterx is an SVG 2.0 path compliant rasterizer that can use either the golang vector or a derivative of the freetype anti-aliaser.
Rasterx is an SVG 2.0 path compliant rasterizer that can use either the golang vector or a derivative of the freetype anti-aliaser.

rasterx Rasterx is a golang rasterizer that implements path stroking functions capable of SVG 2.0 compliant 'arc' joins and explicit loop closing. Pat

Nov 1, 2022
A lightweight and easy to use tool for deflickering timelapse image sequences.
A lightweight and easy to use tool for deflickering timelapse image sequences.

Simple Deflicker A minimalist, lightning-fast and easy to use tool for deflickering image sequences such as timelapses. It's still in its early stages

Aug 12, 2022
Use Windows API to capture a image from a Webcam in GoLANG

Windows-API-Capture-Webcam Use Windows API to capture a image from a Webcam in GoLANG Other Go is a amazing and powerful programming language. If you

Aug 13, 2022
An easy-to-use OCR and Japanese to English translation tool
An easy-to-use OCR and Japanese to English translation tool

Manga Translator An easy-to-use application for translating text in images from Japanese to English. The GUI was created using Gio. Gio supports a var

Dec 28, 2022
A pure Go package for coordinate transformations.

WGS84 A pure Go package for coordinate transformations. go get github.com/wroge/wgs84 Usage east, north, h := wgs84.LonLat().To(wgs84.ETRS89UTM(32)).R

Nov 25, 2022
Go package for fast high-level image processing powered by libvips C library

bimg Small Go package for fast high-level image processing using libvips via C bindings, providing a simple programmatic API. bimg was designed to be

Jan 2, 2023