GNOME Bugzilla – Bug 696612
.mv2 files have not pad-added
Last modified: 2015-02-12 12:32:39 UTC
I use the following pipeline: filesrc, decodebin, videoconvert, video/x-raw format=rgb, appsink in my app. With some .m2v files I dont' get the pad-added callback.
Not sure I understand where the bug/problem is exactly. I'm using this sample file: http://rapidshare.com/files/3157425841/sample_mpeg2.m2v $ GST_DEBUG=*:6 gst-launch-1.0 filesrc location=sample_mpeg2.m2v ! \ decodebin ! videoconvert ! xvimagesink -v 2>&1 | grep pad_added shows that the pad-added callback gets called just fine. $ GST_DEBUG=appsink:6 gst-launch-1.0 filesrc location=sample_mpeg2.m2v ! \ decodebin ! videoconvert ! appsink caps=video/x-raw,format=RGB -v also works just fine with that clip. What might be a problem - and I'm just speculating here - is that if you specify a pixel-aspect-ratio of 1/1 in your appsink caps you also need a videoscale element in case the input has a non-1/1 PAR. In any case, please provide a small test program plus sample file to demonstrate the issue.
If I use gst-launch it also works at me. But in my app the pad-added is never called. I use something like: g_signal_connect( G_OBJECT( decoder ), "pad-added", G_CALLBACK(::newPadCallbackPrivate), this); setProperty(reinterpret_cast<GObject *>(aviSrc), "location", m_filename.toLatin1().data()); gst_element_set_state(GST_ELEMENT(m_pipeline), GST_STATE_READY); ok = gst_element_set_state(GST_ELEMENT(m_pipeline), GST_STATE_PAUSED); m_prerollingState = gst_element_get_state (GST_ELEMENT(m_pipeline), nullptr, nullptr, 5 * GST_SECOND); if (m_prerollingState != GST_STATE_CHANGE_SUCCESS) ... normally th pad-added callback is called now. But with this file it is not called. I don't set any aspect ratio.
Please provide a small test case, in C.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!