Gstreamer Linux cpp mulitifilesrc ! pngdec - odd behaviour
milan.panic
milan.panic at rt-rk.com
Fri Mar 31 11:53:26 UTC 2017
Hi, I am pretty new to GStreamer.
I want to create video from pictures using GStreamer in C++:
I have created cpp code and it works on windows os - irrelevant details
ommited:
chPipelineString = g_strdup_printf("multifilesrc location=%s/%d.png index =
0 caps = image/png,framerate=\(fraction\)%d/1 ! pngdec ! videoconvert !
videoscale ! video/x-raw ! videorate ! theoraenc ! oggmux ! filesink
location=%s", pchInputDirectory, fFps, pchVideoPath);
pInternal->pipeline = gst_parse_launch(chPipelineString, &error);
gst_element_set_state(pInternal->pipeline, GST_STATE_PLAYING);
pInternal->bus = gst_element_get_bus(pInternal->pipeline);
pInternal->msg = gst_bus_timed_pop_filtered(pInternal->bus,
GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_EOS|GST_MESSAGE_ERROR));
if (pInternal->msg != NULL){
gst_message_unref(pInternal->msg);
if (GST_MESSAGE_TYPE(pInternal->msg)==GST_MESSAGE_ERROR)
std::cout << "error in reading" << std::endl;
}
On linux (Ubuntu 14.04), I have linked my code, started it, and I have error
when processing, actually it goes into "error in reading".
Does anyone have any idea what might be the cause?
Even more odd is that I tried the same thing with gst-launch-1.0:
gst-launch-1.0 multifilesrc location="session_images/%d.png" index = 0 caps
= "image/png,framerate=25/1" ! pngdec ! videoconvert ! videoscale !
video/x-raw ! videorate ! theoraenc ! oggmux ! filesink
location="response/1_Response.mp4"
and it produced valid video.
What I checked:
- Same libraries are linked during execution of my program and gst-launch so
that is excluded.
-
gst-launch-1.0 version 1.2.4
GStreamer 1.4.5
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
GDB stack when (GstMessageType)(GST_MESSAGE_EOS|GST_MESSAGE_ERROR)) is
changed to GST_MESSAGE_EOS - segmentation fault:
#0 __sigsetjmp () at ../sysdeps/x86_64/setjmp.S:26
#1 0x00007fffde801d12 in ?? ()
from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpng.so
Thanks,
Milan
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-Linux-cpp-mulitifilesrc-pngdec-odd-behaviour-tp4682480.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list