How to debug Gstreamer on Windows
David Ing
ding at panopto.com
Fri Mar 27 16:30:27 UTC 2020
One thing to check is a compatibility issue with the C Runtime
environment. I have often seen this issues manifest as
GST_STATE_CHANGE_FAILURE in the past. These issues are very difficult to
diagnose / debug. (You may even find that the issue will not reproduce
under a debugger.)
Are you using the mingw binaries for Gstreamer? If so, these kinds of
issues may disappear if you switch to the msvc binaries. The msvc binaries
also have debug symbols which makes it possible to debug (if the problem
doesn't go away by itself), whereas the mingw binaries have no such symbols.
You should also check the C Runtime versions on your two Windows machines
and see if they are different.
On Fri, Mar 27, 2020 at 9:21 AM Daniel Sperka <djsperka at ucdavis.edu> wrote:
> Oops, I missed that both machines are windows machines. Sorry. d
>
> On Fri, Mar 27, 2020 at 9:20 AM Daniel Sperka <djsperka at ucdavis.edu>
> wrote:
>
>> 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
>>
>
>
> --
> Daniel J. Sperka, Ph. D.
> UC Davis Center for Neuroscience
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200327/e5fcd049/attachment-0001.htm>
More information about the gstreamer-devel
mailing list