How to debug Gstreamer on Windows
Daniel Sperka
djsperka at ucdavis.edu
Fri Mar 27 16:20:34 UTC 2020
Could it be that you are using elements that do not work on windows?
A desktop app, for example, will have to create different audio sink
elements for mac/linux/windows/. When I had this bug, the windows version
failed when creating "osxaudiosink", as it should. I was sloppy in checking
for NULL or return values when adding,linking in pipeline. When I try to
run application, it fails when I try to preroll (change of state to PAUSE)
because the pipeline is incomplete (no sink).
My fix was to use the correct elements for different platforms - the
project (Qt) that has code something like this:
audioSink = NULL;
*#if* defined(Q_OS_MAC)
qDebug() << "make osxaudiosink for mac";
audioSink = gst_element_factory_make("osxaudiosink");
*#elif* defined(Q_OS_LINUX)
qDebug() << "make alsasink for linux";
audioSink = gst_element_factory_make("alsaudiosink");
*#elif* defined(Q_OS_WIN)
qDebug() << "make directsoundsink for win";
audioSink = gst_element_factory_make("directsoundsink");
*#else*
qDebug() << "Unsupported OS.";
*#endif*
Q_ASSERT(audioSink);
Dan
On Thu, Mar 26, 2020 at 4:34 PM Yair Reshef <yair99 at gmail.com> wrote:
> dependency walker sometime finds missing stuff.
> try to prepend it with GST_DEBUG:7
>
> more here
>
> https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html?gi-language=c
>
> On Fri, Mar 27, 2020 at 1:19 AM Erik Herz <erik at vivoh.com> wrote:
>
>> I have an app that runs on my Windows build machine but not on another
>> windows machine.
>>
>> I get this error:
>> gst_element_set_state() returns GST_STATE_CHANGE_FAILURE
>>
>> I suspect that I am missing a library.
>>
>> How can I debug what is happening?
>>
>> My App is QT-based.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
--
Daniel J. Sperka, Ph. D.
UC Davis Center for Neuroscience
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200327/d7e189aa/attachment-0001.htm>
More information about the gstreamer-devel
mailing list