GNOME Bugzilla – Bug 707968
not enough hw-acceleration for crystalhd. MT?
Last modified: 2013-09-18 20:36:05 UTC
Created attachment 254774 [details] failed to play the file with gst-0.10 that played in totem and gst-1.0 I pulled git://linuxtv.org/jarod/crystalhd.git then I compiled driver, lib and gst plugin, and loaded the kernel module. in ubuntu totem plays the videos, indicator states acceleration is used. however, I do not notice any acceleration, video is lagging. in gentoo I did do the same, limited acceleration too, maybe even worse. on commandline I can enter "gst-launch-0.10 playbin uri=" I get: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Missing element: GStreamer element textoverlay (gst-launch-0.10:16079): GStreamer-CRITICAL **: gst_pad_link_full: assertion `GST_IS_PAD (sinkpad)' failed (gst-launch-0.10:16079): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL' failed Running DIL (3.22.0) Version DtsDeviceOpen: Opening HW in mode 0 DtsDeviceOpen: Create File Failed ERROR: from element /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0: GStreamer encountered a general stream error. Additional debug info: matroska-demux.c(4492): gst_matroska_demux_loop (): /GstPlayBin:playbin0/GstDecodeBin:decodebin0/GstMatroskaDemux:matroskademux0: stream stopped, reason not-negotiated ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... full log from -v option attached. the same done with "gst-launch-1.0 -v playbin uri=" plays the file with a heavy lag, much worse than totem. so I copied the files I compiled from above git-repository, libgstbcmdec.*, into the plugins of gstreamer-1.0. but running "gst-inspect-1.0 --gst-plugin-spew |grep bcm" I get (gst-plugin-scanner:10550): GStreamer-WARNING **: Failed to load plugin '/usr/lib64/gstreamer-1.0/libgstbcmdec.so': /usr/lib64/gstreamer-1.0/libgstbcmdec.so: undefined symbol: gst_video_format_new_caps what I noticed all this time, gst does not use threading! I get a single thread playing this file, and even though my computer has still a lot free cycles left, the video is lagging. for example vlc is making use of all processors and therefore plays the same file nearly lag-free, even without hw acceleration. just to clarify: my gst versions are 0.10.36 1.0.5-r1 in gentoo, on amd64 (actually intel atom). I'm not using the masked packages except for totem-3.6.3-r1. but I optimize for my processor, with gcc-4.6.3.
The crystalhd plugin is maintained elsewhere, you should ask for help there. Also it is not ported to 1.0 yet, if you just place the 0.10 version in the 1.0 plugin directory it won't work. Also GStreamer 0.10 is no longer maintained unfortunately.
I suspected that much. thanks for confirming my suspicions. however, my bugreport is not about the various problems I encountered. I probably should have written at the top: the bug in gst-1.0 is that files are played single-threadedly! even if the driver would be ported, people still would prefer other players! part of the problem is also the handling of gst-launch: there's no manual telling me how to activate or deactivate hw-acceleration. there doesn't even seem to be a possibility to combine different hw-features. if there is some info on hw support in gst, I didn't find it in the man-pages. I didn't find info on writing hw-acceleration plugins either. did I overlook something?
gst-launch is first of all a debugging and testing tool, not an application to be used in production. (In reply to comment #2) > the bug in gst-1.0 is that files are played single-threadedly! What do you mean by that? That the video part of the file is decoded by a single thread? That solely depends on the decoder that is used, the libav decoders for example can also use multiple threads and do so automatically if possible. In general GStreamer uses multiple threads for a pipeline, e.g. the audio decoder will run in a different thread than the video decoder. > there's no manual telling me how to activate or deactivate hw-acceleration. > there doesn't even seem to be a possibility to combine different hw-features. > if there is some info on hw support in gst, I didn't find it in the man-pages. It is supposed to be used automatically if available and possible by playbin. If you need more control over it you need to check the documentation of the specific plugins (e.g. of your hardware vendor) to see what possibilities you have to control them. > I didn't find info on writing hw-acceleration plugins either. What exactly are you looking for? There is no simple guide to that because it completely depends on the hardware that you are going to write a plugin for. You can find all the building blocks you need in the API reference though.
thanks, now I know where the problem lies and I will file some new bugreports, or rather feature-requests. I finally got the hw-support to run in gst-1.0, thanks to a git-repo I found at https://github.com/agx/crystalhd