Disable xv output in wxMediaCtrl

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Disable xv output in wxMediaCtrl

Post by Azrael »

Is there a way to disable xv output in wxMediaCtrl ? Or a way to change it somehow?
https://leo.unglaub.at/howto/openbsd/pa ... xv-output/
I always get this gstreamer backend error from the Load function in wxMediaCtrl. In parole there is an option to change it. After the change it works. I was wondering if it is possible to do the same in wxMediaCtrl.
Xv output has something to do with video output, no? I only need the audio part.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
Is there an option in Gstreamer to disable it?
If not - you will need to modify the wxWidgets, as I don't think there is such a options available.

Where is the error coming from? Can you do a backtrace?

Thank you.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

Hi ONEEYEMAN,
Thank you for replying.
ONEEYEMAN wrote: Where is the error coming from? Can you do a backtrace?
I don't know how to do a backtrace, i'm really new to all of this. However I really want to make things work .
I think it is a gstreamer error. So i searched on the internet for ways of checking if I have the necessary plugins installed.
I found this:
https://gstreamer.freedesktop.org/docum ... using.html
wxWidgets 3.0.2 uses gstreamer 0.10 not 1.0, right ? So I tried one of the commands in the terminal :

Code: Select all

 gst-launch-1.0 filesrc location=Music/DINOSAUR.mp3 ! decodebin ! audioconvert ! pulsesink 
It plays the song

Code: Select all

gst-launch-0.10 filesrc location=Music/DINOSAUR.mp3 ! decodebin ! audioconvert ! pulsesink 
I get this output:

Code: Select all

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: MPEG-1 Layer 3 (MP3) decoder
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0: GStreamer encountered a general stream error.
Additional debug info:
gstbaseparse.c(2890): gst_base_parse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0:
streaming stopped, reason not-linked
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Obviously I'm missing a plugin for decoding mp3 in gstreamer 0.10. A plugin I have in gstreamer 1.0

I installed:
http://www.linuxfromscratch.org/blfs/vi ... -ugly.html
http://www.linuxfromscratch.org/blfs/vi ... s-bad.html

Nothing changed.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
It may even be using gstreamer 0.8.
Did you install wx from the repository or you compiled it yourself? I suggest you download the 3.0.2 source code, compile it yourself, build "media" sample and try to play this file.

Thank you.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

Hi,
ONEEYEMAN wrote: Did you install wx from the repository or you compiled it yourself?
I installed it from the repository. I'll try to build the sources myself then.
Sorry for the basic question but why would something change ?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
Before building do this:

Code: Select all

cd wxWidgets-3.0.2
mkdir buildGTK
cd buildGTK
../configure --help | grep media
Check its output to see which Gstreamer version will be used.

When building supply "--enable-debug --enable-debug_gdb" to configure. You will build the debug version of the library which will be easier to follow in debugger.

Thank you.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

It means that I have to
  • delete wxwidgets
    download the source files
    before building, check which gstreamer version it is going to use
    enable debug
Right?
I'll update later

Thank you for helping me. I really appreciate it
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
You don't need to delete the install.
You source tree will stay local. You will not install it.

Thank you.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

Okay then. Thank you!
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

I was not really expecting the output I got:

Code: Select all

--enable-mediactrl  use wxMediaCtrl class
That's it.
I also searched for wxMediaCtrl :

Code: Select all

../configure --help | grep wxMediaCtrl
And I got this output:

Code: Select all

--enable-mediactrl  use wxMediaCtrl class
--enable gstreamer8 Force GStreamer 0.8 instead of 0.10 with the wxMediaCtrl class on unix
I guess it uses gstreamer 0.10 by default for wxWidgets 3.0.2
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

OK, then it is 0.10.
BUt it actually means that you are still missing the plugin for GStreamer.

Thank you.

EDIT:

I would still try to build the library with the default setting and then media sample and see if this is fixed.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

The documentation says:
wxMEDIABACKEND_GSTREAMER, Use GStreamer. Unix Only. Requires GStreamer 0.8 along with at the very least the xvimagesink, xoverlay, and gst-play modules of gstreamer to function. You need the correct modules to play the relevant files, for example the mad module to play mp3s, etc
Now, I have those modules for gstreamer 1.0 but not for gstreamer 0.10. Mad module is from the ugly plugins but there isn't an ugly plugin for 0.10.
I don't know what else to do
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
IIRC, GStreamer 1.0 support was put into wx 3.1.
Try to get 3.1 sources and run its configure help as I showed.

If it has 1.0 support - try to build it and see if that solved the problem.

Thank you.
User avatar
Azrael
Knows some wx things
Knows some wx things
Posts: 37
Joined: Sat Aug 05, 2017 2:44 pm
Location: Italy

Re: Disable xv output in wxMediaCtrl

Post by Azrael »

Code: Select all

--enable-mediactrl  use wxMediaCtrl class
there isn't anything about gstreamer. I tried:
grep media
grep wxMediaCtrl
grep gstreamer
grep 1.0
It seems like the only difference is that they don't have the "force gstreamer 0.8" option anymore.

What happens if I have both libraries (3.0.2 and 3.1.0) on the computer? Which one will be used?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Disable xv output in wxMediaCtrl

Post by ONEEYEMAN »

Hi,
You can compile 3.1 locally and don't install it.
Just try to compile and then compile the media sample to see if it works.

Just do:

Code: Select all

cd wxWidgets-3.1
mkdir buildGTK
cd buildGTK
../configure --enable-debug --enable-debug_gdb --enable-mediactrl
make
cd samples/media
make
If it does - my guess would be that there is an incompatibility between 1.0 plugin and 0.1 plugin that wx needed.

Thank you.
Post Reply