GNOME Bugzilla – Bug 672277
dxr3: port plugin to 1.0
Last modified: 2016-12-21 11:51:02 UTC
Created attachment 209988 [details] [review] Few changes to make DXR3 compile on RELEASE-0.10.28 tag Recently I've got an idea to turn my DXR3 card to DLNA device - a DMR that I could control from my tablet. Things looked simple. There is Cling[1] project reusing gstreamer-java and working fine. The whole problem was to adopt it to output to DXR3. I knew there was DXR3 support in GStreamer few years ago, so I thought I'll make it in a day. But alas, dxr3videosink is not installed on my Ubuntu 10.04. The sources are in sys/dxr3 directory of the gst-plugins-bad repository, but they are not included in configure.ac and they don't compile against 0.10.28 version anymore. Someone is supposed to bring them up-to-date and make them work. This bug is my attempt to do so.
Thanks for the patches, but I think this needs some more porting/rewriting. I think the element should derive from GstAudioSink, or at least GstBaseAudioSink. It should only have one sink pad instead of having two sinkpads (one for PCM one for AC3) - unless I misunderstood how these pads are supposed to work here. The AC3 padder can probably go and be replaced with http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstaudioiec61937.html The chain function only receives buffers in 0.10 (in 0.8 it was events + buffers), and there are separate event functions for events now. But ideally the audio sink can handle all of that anyway.
Thanks for your comments, I'll see what I can do to provide better patch.
So far it seems that the best way to play with gstreamer on DXR3 is: $ gst-launch filesrc location=file.avi ! decodebin2 name=dem dem. ! ffenc_mpeg1video ! filesink location=/dev/em8300_mv-0 dem. ! audioconvert ! audioresample ! osssink device="/dev/em8300_ma-0" Works with gstreamer 0.10.28 in Ubuntu Lucid. Is there any need for special DXR3 elements anyway?
Latest attempt I tried is to rewrite the DXR3 video sink to follow the steps of gstfilesink. At the end, it is almost similar. However I get following error: (lt-gst-plugin-scanner:3694): GStreamer-WARNING **: Failed to load plugin 'gstreamer/gst-plugins-bad/sys/dxr3/.libs/libgstdxr3.so': gstreamer/gst-plugins-bad/sys/dxr3/.libs/libgstdxr3.so: undefined symbol: gst_base_sink_get_type Googling around reveals that I should probably modify configure.ac, but I have not found the right patch yet. Can anyone give help me with a patch?
> Latest attempt I tried is to rewrite the DXR3 video sink to follow the steps of > gstfilesink. Hrm, have you considered looking at other video sinks instead? :) > At the end, it is almost similar. However I get following error: > > (lt-gst-plugin-scanner:3694): GStreamer-WARNING **: Failed to load plugin > 'gstreamer/gst-plugins-bad/sys/dxr3/.libs/libgstdxr3.so': > gstreamer/gst-plugins-bad/sys/dxr3/.libs/libgstdxr3.so: undefined symbol: > gst_base_sink_get_type > > Googling around reveals that I should probably modify configure.ac, but I have > not found the right patch yet. Can anyone give help me with a patch? This looks like you need to link against libgstbase-0.10. If you are using our autotools-setup for building the plugin, it should be enough to add $(GST_BASE_CFLAGS) to the _CFLAGS in Makefile.am and $(GST_BASE_LIBS) to _LIBADD in Makefile.am
Created attachment 212447 [details] [review] Diff against 0.10.18 - I was able to play video with dxr3videosink Time to report some progress. This is my current diff. I managed to play an AVI file using: $ gst-launch -v filesrc location=Oliver.avi ! decodebin2 name=jst jst. ! ffenc_mpeg1video ! dxr3videosink jst. ! audioconvert ! audioresample ! osssink device="/dev/em8300_ma-0" It would be nice if ffenc_mpeg1video was done automatically...
Sorry, completely missed your patch there. Any chance you could port it to the new 1.0 API? Shouldn't be much work, mostly just figuring out the API changes.
Commit: 9b5de053995488d5ddc78c1bf4df651101271d70 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=9b5de053995488d5ddc78c1bf4df651101271d70 Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Dec 21 11:00:47 2016 +0200 Remove various unported plugins If they were not ported after 4+ years it seems unlikely that anybody is ever going to need them again. They're still in the GIT history if needed. https://bugzilla.gnome.org/show_bug.cgi?id=774530