Appsrc internal dataflow error.

Justin J. Kim justin.joy.9to5 at gmail.com
Sun Aug 30 01:43:42 PDT 2015


Your caps might have different format so it cannot negotiate properly.

According to source codes of openh264, it accepts only I420 format as an
input, but you used RGB here.


On Sun, Aug 30, 2015 at 6:01 AM, dtmoodie <dtmoodie at gmail.com> wrote:

> I'm trying to stream images from opencv to a gstreamer pipeline.
>
> My caps are as follows:
> GstCaps* caps = gst_caps_new_simple("video/x-raw",
>         "format", G_TYPE_STRING, "RGB24",
>         "width", G_TYPE_INT, imgSize.width,
>         "height", G_TYPE_INT, imgSize.height,
>         "framerate", GST_TYPE_FRACTION, 15, 1,
>         "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
>         NULL);
>
> I've also tried with format = RGB.
> red_mask     = 0x00ff0000
> blue_mask   = 0x000000ff
> green_mask = 0x0000ff00
> endianness
>
> Some examples I'm going off of:
>
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-caps-api.html
> http://www.imgportal.net/home/wp-content/uploads/maris-script1.cpp
>
> My desired pipeline:
> appsrc name=mysource ! openh264enc ! rtph264pay config-interval=1 pt=96 !
> udpsink host=127.0.0.1 port=8004
>
> Pushing data onto the appsrc:
>
> cv::Mat frameimage(user_data->imgSize, CV_8UC3);
> static GstClockTime timestamp = 0;
> GstBuffer *buffer;
> guint buffersize;
> GstFlowReturn ret;
> GstMapInfo info;
> buffersize = frameimage.cols * frameimage.rows * frameimage.channels();
> buffer = gst_buffer_new_and_alloc(buffersize);
> if (gst_buffer_map(buffer, &info, (GstMapFlags)GST_MAP_WRITE)) {
>         memcpy(info.data, frameimage.data, buffersize);
>         gst_buffer_unmap(buffer, &info);
> }
> else
> {
>         BOOST_LOG_TRIVIAL(error) << "Unable to map image data to buffer";
> }
> ret = gst_app_src_push_buffer((GstAppSrc*)user_data->source_OpenCV,
> buffer);
> if (ret != GST_FLOW_OK) {
>         BOOST_LOG_TRIVIAL(error) << "something wrong in cb_need_data";
>         g_main_loop_quit(user_data->glib_MainLoop);
> }
>
> Full source can be found here:
>
> https://github.com/dtmoodie/EagleEye/blob/Dev/Plugins/GStreamer/src/gstreamer.cpp
>
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Appsrc-internal-dataflow-error-tp4673397.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150830/c91e8996/attachment.html>


More information about the gstreamer-devel mailing list