Open adwpc opened 2 years ago
Hello,
I'd like to share my opinion for digging further.
1) How about to run the pipeline first with a launch tool given by gstreamer, 'gst-launch-1.0'
gst-launch-1.0 autovideosrc ! videoconvert ! decodebin ! autovideosink autoaudiosrc! audioresample ! audioconvert ! decodebin ! autoaudiosink
If this does not work, then we can exclude go-gst for now.
Otherwise, need to see in other way.2) How about to run more simple pipeline below?
videotestsrc ! autovideosink
If this works, then I think problem might be on accessing device like camera or mic.
If so, autovideosrc
and autoaudiosrc
would be problem here.3) Otherwise, we may get new clue with more logs with debug level, GST_DEBUG=4
.
I am not sure that the environment like Win10 on VMware is capable of enabling cam
and mic
.
@brucekim Hi, thanks of your guide. This worked, i saw a window: gst-launch-1.0.exe videotestsrc ! autovideosink
But this worked for one second, then the windows closed and exe exit: ./launch.exe videotestsrc ! autovideosink
GST_DEBUG=4 ./launch.exe videotestsrc ! autovideosink
0:00:00.000597600 9740 000002C6A77DD0F0 INFO GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.18.5
0:00:00.003842100 9740 000002C6A77DD0F0 INFO GST_INIT gst.c:587:init_pre: Using library installed in C:\gstreamer\1.0\mingw_x86_64\lib
0:00:00.004840500 9740 000002C6A77DD0F0 INFO GST_INIT gstmessage.c:129:_priv_gst_message_initialize: init messages
0:00:00.010279000 9740 000002C6A77DD0F0 INFO GST_INIT gstcontext.c:85:_priv_gst_context_initialize: init contexts
0:00:00.019797700 9740 000002C6A77DD0F0 INFO GST_PLUGIN_LOADING gstplugin.c:325:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.021213600 9740 000002C6A77DD0F0 INFO GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.022368500 9740 000002C6A77DD0F0 INFO GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.023603100 9740 000002C6A77DD0F0 INFO GST_REGISTRY gstregistry.c:1755:ensure_current_registry: reading registry cache: C:\Users\adam.cache\gstreamer-1.0\gstreamer-cerbero-registry
0:00:00.055319900 9740 000002C6A77DD0F0 INFO GST_REGISTRY gstregistrybinary.c:666:priv_gst_registry_binary_read_cache: loaded C:\Users\adam.cache\gstreamer-1.0\gstreamer-cerbero-registry in 0.029640 seconds
0:00:00.059760000 9740 000002C6A77DD0F0 INFO GST_REGISTRY gstregistry.c:1614:scan_and_update_registry: Validating plugins from registry cache: C:\Users\adam.cache\gstreamer-1.0\gstreamer-cerbero-registry
0:00:00.736786700 9740 000002C6A77DD0F0 INFO GST_REGISTRY gstregistry.c:1713:scan_and_update_registry: Registry cache has not changed
0:00:00.743706300 9740 000002C6A77DD0F0 INFO GST_REGISTRY gstregistry.c:1790:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.747915200 9740 000002C6A77DD0F0 INFO GST_INIT gst.c:807:init_post: GLib runtime version: 2.62.6
0:00:00.755496100 9740 000002C6A77DD0F0 INFO GST_INIT gst.c:809:init_post: GLib headers version: 2.62.6
0:00:00.755974200 9740 000002C6A77DD0F0 INFO GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.756927600 9740 000002C6A77DD0F0 INFO GST_PIPELINE gstparse.c:345:gst_parse_launch_full: parsing pipeline description 'videotestsrc ! autovideosink'
0:00:00.900562300 9740 000002C6A77DD0F0 INFO GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "C:\gstreamer\1.0\mingw_x86_64\lib\gstreamer-1.0\libgstvideotestsrc.dll" loaded
0:00:00.902896900 9740 000002C6A77DD0F0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:363:gst_element_factory_create: creating element "videotestsrc"
0:00:00.998785400 9740 000002C6A77DD0F0 INFO GST_ELEMENT_PADS gstelement.c:753:gst_element_add_pad:GstBaseSrc@000002C6CE9AE2B0 adding pad 'src'
0:00:01.053969900 9740 000002C6A77DD0F0 INFO GST_PLUGIN_LOADING gstplugin.c:915:_priv_gst_plugin_load_file_for_registry: plugin "C:\gstreamer\1.0\mingw_x86_64\lib\gstreamer-1.0\libgstautodetect.dll" loaded
0:00:01.054863000 9740 000002C6A77DD0F0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:363:gst_element_factory_create: creating element "autovideosink"
0:00:01.055902600 9740 000002C6A77DD0F0 INFO GST_ELEMENT_PADS gstelement.c:753:gst_element_add_pad:
runtime.cgocall(0x7ff68f720b10, 0xc00007f4c0) C:/Program Files/Go/src/runtime/cgocall.go:156 +0x4a fp=0xc00007f498 sp=0xc00007f460 pc=0x7ff68f64424a github.com/tinyzimmer/go-gst/gst._Cfunc_free(0x2c6ceacc460) _cgo_gotypes.go:2429 +0x4e fp=0xc00007f4c0 sp=0xc00007f498 pc=0x7ff68f6fbb0e github.com/tinyzimmer/go-gst/gst.(Object).GetName.func2.1() C:/Users/adam/go/src/pion/go-gst/gst/gst_object.go:39 +0x3b fp=0xc00007f4f8 sp=0xc00007f4c0 pc=0x7ff68f70f3db github.com/tinyzimmer/go-gst/gst.(Object).GetName(0x7ff68f791564) C:/Users/adam/go/src/pion/go-gst/gst/gst_object.go:40 +0x6c fp=0xc00007f538 sp=0xc00007f4f8 pc=0x7ff68f70f2cc github.com/tinyzimmer/go-gst/gst.(Message).String(0xc000034000) C:/Users/adam/go/src/pion/go-gst/gst/gst_message_stringer.go:79 +0xd5a fp=0xc00007f738 sp=0xc00007f538 pc=0x7ff68f6fab1a fmt.(pp).handleMethods(0xc000026b60, 0x100280) C:/Program Files/Go/src/fmt/print.go:626 +0x383 fp=0xc00007f9e8 sp=0xc00007f738 pc=0x7ff68f6dae03 fmt.(pp).printArg(0xc000026b60, {0x7ff68f786780, 0xc0000060d8}, 0x76) C:/Program Files/Go/src/fmt/print.go:709 +0x693 fp=0xc00007fa88 sp=0xc00007f9e8 pc=0x7ff68f6db9b3 fmt.(pp).doPrintln(0xc000026b60, {0xc00007fb88, 0x1, 0x0}) C:/Program Files/Go/src/fmt/print.go:1169 +0x149 fp=0xc00007faf8 sp=0xc00007fa88 pc=0x7ff68f6df149 fmt.Fprintln({0x7ff68f7bbe60, 0xc000006018}, {0xc00007fb88, 0x1, 0x1}) C:/Program Files/Go/src/fmt/print.go:264 +0x4f fp=0xc00007fb48 sp=0xc00007faf8 pc=0x7ff68f6d89cf fmt.Println(...) C:/Program Files/Go/src/fmt/print.go:274 main.runPipeline.func1(0xc0000060d8) C:/Users/adam/go/src/pion/go-gst/examples/launch/main.go:46 +0x190 fp=0xc00007fbe8 sp=0xc00007fb48 pc=0x7ff68f719ad0 github.com/tinyzimmer/go-gst/gst.goBusFunc(0x7ff68f79ba20, 0x2c6cea75330, 0xc000034000) C:/Users/adam/go/src/pion/go-gst/gst/cgo_exports.go:128 +0x7d fp=0xc00007fc18 sp=0xc00007fbe8 pc=0x7ff68f70455d _cgoexp_aa7f20127082_goBusFunc(0xdd939ff370) _cgo_gotypes.go:17353 +0x2c fp=0xc00007fc40 sp=0xc00007fc18 pc=0x7ff68f716bec runtime.cgocallbackg1(0x7ff68f716bc0, 0xc00007fe00, 0x0) C:/Program Files/Go/src/runtime/cgocall.go:306 +0x29a fp=0xc00007fd10 sp=0xc00007fc40 pc=0x7ff68f64479a runtime.cgocallbackg(0xc000034000, 0x300000002, 0xc000034000) C:/Program Files/Go/src/runtime/cgocall.go:232 +0x106 fp=0xc00007fda8 sp=0xc00007fd10 pc=0x7ff68f644426 runtime.cgocallbackg(0x7ff68f716bc0, 0xdd939ff370, 0x0)
The call stack indicates free()
in the following lines. I don't think the following have any defect in itself.
Anyway, exception was happened. And I found that the exception code is kind of access violation
Exception 0xc0000005 0x0 0xffffffffffffffff 0x7ffd033d6c55
PC=0x7ffd033d6c55
signal arrived during external code execution
And I also found that anti virus program prevents to execute external one.
I think some program like anti-virus or any lack of privilege on Windows system do not allows your launch
binary to refer the external library regarding D3D library for example.
https://stackoverflow.com/questions/43019581/go-lang-access-denied
The link above suggests a following trick.
so the trick here is that you need to run your application as Administrator in Windows
@brucekim you've been active in a lot of issues, and I've been swamped with work these days and not been able to be as attentive.
Would you be open to me adding you as a maintainer so you can help field issues and PRs?
@tinyzimmer Hi. I am willing to want joining as a maintainer since I think go-gst
is best go-Binding package for gstreamer. I would be nice if go-gst
would be official go-binding package of gstreamer. I hope my contribution can help for it.
Thanks :)
@adwpc move this issue to https://github.com/go-gst/go-gst (where future development of the bindings will take place) if you think it is still necessary.
@brucekim I could also add you as member in the new org if you want to
were you able to resolve this issue? I'm running it from PS run with admin privileges and got the same issue.
ENV:
Vmware fusion + WIN10 + MingW + Gstreamer1.8.x + golang 1.16.x
What happen:
exe crash and got error: signal arrived during external code execution
I found the error string from signal_windows.go Please help!
Logs:
./launch.exe autovideosrc ! videoconvert ! decodebin ! autovideosink autoaudiosrc! audioresample ! audioconvert ! decodebin ! autoaudiosink [autoaudiosink0-actual-sink-wasapi] STATE-CHANGED - State changed from NULL to READY [autoaudiosink0] STATE-CHANGED - State changed from NULL to READY [autovideosink0] NEED-CONTEXT - Element needs context [autovideosink0] HAVE-CONTEXT - Received context of type gst.d3d11.device.handle [d3d11videosink0] STATE-CHANGED - State changed from NULL to READY [d3d11upload0] STATE-CHANGED - State changed from NULL to READY [autovideosink0-actual-sink-d3d11video] STATE-CHANGED - State changed from NULL to READY [autovideosink0] STATE-CHANGED - State changed from NULL to READY [typefind] STATE-CHANGED - State changed from NULL to READY [decodebin1] STATE-CHANGED - State changed from NULL to READY [audioconvert0] STATE-CHANGED - State changed from NULL to READY [audioresample0] STATE-CHANGED - State changed from NULL to READY [autoaudiosrc0-actual-src-wasap] STATE-CHANGED - State changed from NULL to READY [autoaudiosrc0] STATE-CHANGED - State changed from NULL to READY [typefind] STATE-CHANGED - State changed from NULL to READY [decodebin0] STATE-CHANGED - State changed from NULL to READY [videoconvert0] STATE-CHANGED - State changed from NULL to READY [autovideosrc0-actual-src-ksvide] STATE-CHANGED - State changed from NULL to READY [autovideosrc0] STATE-CHANGED - State changed from NULL to READY [pipeline0] STATE-CHANGED - State changed from NULL to READY [d3d11upload0] STATE-CHANGED - State changed from READY to PAUSED [typefind] STATE-CHANGED - State changed from READY to PAUSED [audioconvert0] STATE-CHANGED - State changed from READY to PAUSED [audioresample0] STATE-CHANGED - State changed from READY to PAUSED Exception 0xc0000005 0x0 0xfffffffffffffc07 0x7ffd033d6c3b PC=0x7ffd033d6c3b signal arrived during external code execution
runtime.cgocall(0x7ff68f720b10, 0xc0000cd4c0) C:/Program Files/Go/src/runtime/cgocall.go:156 +0x4a fp=0xc0000cd498 sp=0xc0000cd460 pc=0x7ff68f64424a github.com/tinyzimmer/go-gst/gst._Cfunc_free(0x25e41574320) _cgo_gotypes.go:2429 +0x4e fp=0xc0000cd4c0 sp=0xc0000cd498 pc=0x7ff68f6fbb0e github.com/tinyzimmer/go-gst/gst.(Object).GetName.func2.1() C:/Users/adam/go/src/pion/go-gst/gst/gst_object.go:39 +0x3b fp=0xc0000cd4f8 sp=0xc0000cd4c0 pc=0x7ff68f70f3db github.com/tinyzimmer/go-gst/gst.(Object).GetName(0x7ff68f791564) C:/Users/adam/go/src/pion/go-gst/gst/gst_object.go:40 +0x6c fp=0xc0000cd538 sp=0xc0000cd4f8 pc=0x7ff68f70f2cc github.com/tinyzimmer/go-gst/gst.(Message).String(0xc000032000) C:/Users/adam/go/src/pion/go-gst/gst/gst_message_stringer.go:79 +0xd5a fp=0xc0000cd738 sp=0xc0000cd538 pc=0x7ff68f6fab1a fmt.(pp).handleMethods(0xc00008c8f0, 0xd0280) C:/Program Files/Go/src/fmt/print.go:626 +0x383 fp=0xc0000cd9e8 sp=0xc0000cd738 pc=0x7ff68f6dae03 fmt.(pp).printArg(0xc00008c8f0, {0x7ff68f786780, 0xc0000ce140}, 0x76) C:/Program Files/Go/src/fmt/print.go:709 +0x693 fp=0xc0000cda88 sp=0xc0000cd9e8 pc=0x7ff68f6db9b3 fmt.(pp).doPrintln(0xc00008c8f0, {0xc0000cdb88, 0x1, 0x0}) C:/Program Files/Go/src/fmt/print.go:1169 +0x149 fp=0xc0000cdaf8 sp=0xc0000cda88 pc=0x7ff68f6df149 fmt.Fprintln({0x7ff68f7bbe60, 0xc0000ce008}, {0xc0000cdb88, 0x1, 0x1}) C:/Program Files/Go/src/fmt/print.go:264 +0x4f fp=0xc0000cdb48 sp=0xc0000cdaf8 pc=0x7ff68f6d89cf fmt.Println(...) C:/Program Files/Go/src/fmt/print.go:274 main.runPipeline.func1(0xc0000ce140) C:/Users/adam/go/src/pion/go-gst/examples/launch/main.go:46 +0x190 fp=0xc0000cdbe8 sp=0xc0000cdb48 pc=0x7ff68f719ad0 github.com/tinyzimmer/go-gst/gst.goBusFunc(0x1, 0x25e41518890, 0xc000032000) C:/Users/adam/go/src/pion/go-gst/gst/cgo_exports.go:128 +0x7d fp=0xc0000cdc18 sp=0xc0000cdbe8 pc=0x7ff68f70455d _cgoexp_aa7f20127082_goBusFunc(0xdff1fff7c0) _cgo_gotypes.go:17353 +0x2c fp=0xc0000cdc40 sp=0xc0000cdc18 pc=0x7ff68f716bec runtime.cgocallbackg1(0x7ff68f716bc0, 0xc0000cde00, 0x0) C:/Program Files/Go/src/runtime/cgocall.go:306 +0x29a fp=0xc0000cdd10 sp=0xc0000cdc40 pc=0x7ff68f64479a runtime.cgocallbackg(0xc000032000, 0x300000002, 0xc000032000) C:/Program Files/Go/src/runtime/cgocall.go:232 +0x106 fp=0xc0000cdda8 sp=0xc0000cdd10 pc=0x7ff68f644426 runtime.cgocallbackg(0x7ff68f716bc0, 0xdff1fff7c0, 0x0)