Giter Club home page Giter Club logo

gst-go-demo's Introduction

gst-go-demo's People

Contributors

notedit avatar

Stargazers

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

Watchers

 avatar  avatar

gst-go-demo's Issues

Running the windows executable crashes as soon as the app is started

I compiled a modified version of the demo appsrc on windows with 'go build' that generated the appsrc.exe.
Running the apprsrc.exe actually results in an immediate crash of the application.

And then I tried integrating directly into my own program, the similar problem exists. What could potentially be the problem here?

Pipeline error in gstreamer 1.20.0 on macosx

Recently gstreamer is upgraded to 1.20.0 by brew of mac x86 notebook.
After upgrade, the examples do not work as follows.
In gstreamer 1.18.5, they work well.

[ GSTREAMER ] shim init
[ GST ] program is linked against GStreamer 1.20.0
panic: pipeline error

goroutine 1 [running]:
main.main()
/Users/stoney/coding/go/src/github.com/notedit/gst-go-demo/appsrc/main.go:15 +0x198
exit status 2

appsrc and appsink in one go file, Error: failed could not pull a sample from appsink

Code snippet:
//Want to transcode Incomming RTP packet in mulaw codec (PCMU)
//What I am trying to achieve is push on appsrc and pull it on appsink
package main

import (
"fmt"
"time"
"reflect"
"github.com/notedit/gst"
)

func main() {

pipeline, err := gst.ParseLaunch("appsrc name=mysource ! queue ! appsink name=mysink")

if err != nil {
	panic("pipeline error")
}

element := pipeline.GetByName("mysource")
sink := pipeline.GetByName("mysink")

pipeline.SetState(gst.StatePlaying)
fmt.Println(reflect.TypeOf(sink))


go func(element *gst.Element) {
i:=0
for {

		if i > 100 {
			break
		}

		data := make([]byte, 320*240*3)

		err := element.PushBuffer(data)

		if err != nil {
			fmt.Println("push buffer error")
			break
		}

		fmt.Println("push one")
		i++
		time.Sleep(50000000)
	}
}(element)


	for {
		sample, err := sink.PullSample()
		if err != nil {
			if element.IsEOS() == true {
				fmt.Println("eos")
				break
			} else {
				fmt.Println(err)
				continue
			}
		}
		fmt.Println("got sample", sample.Duration)
	}

pipeline.SetState(gst.StateNull)

pipeline = nil
element = nil
//videoCap = nil

}

Error:
It thowing error as:
** (main:9358): CRITICAL **: 02:47:33.320: gst_app_sink_is_eos: assertion 'GST_IS_APP_SINK (appsink)' failed
could not pull a sample from appsink

-> sink receives 'eos' as it starts

suggest or help pls????
Thanks in advance...

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.