Invalid buffer size error when convert from gst-launch pipeline to C code with imxvideoconvert_ipu

Tran Tu camtubk05 at gmail.com
Tue May 24 03:15:55 UTC 2016


Hi all,

I do the study test to rezise the raw video in fullhd to wvga and streaming
it over RTP/UDP
The pipeline I use is:
"filersc  blocksize=4147200 location=/home/root/file.raw ! video/x-raw,
format=(string){I420},width=1920, height=1080, framerate=30/1 !
imxvideoconvert_ipu  livestreaming=true ! video/x-raw, width=1280,
height=720 ! imxvpuenc_h264 gop-size=30 bitrate=2000 ! h264parse !
rtph264pay name=pay0 pt=96 timestamp-offset=0 ! udpsink host=192.168.2.10
port=5000"

I can run successfully with gst-launch. But when I convert this to object
model in C programming, I got the following error:
*video/video-frame.c:155:gst_video_frame_map_id: invalid buffer size 70700 <
3110400
:<imxvideoconvert_ipu0> posting message: Internal GStreamer error: code not
implemented.  Please file a bug at
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.*

Below is the way I construct the pipeline:

    GstElement *Pipeline = NULL;
    GstElement *FileSrc = NULL;
    GstCaps *Filtercaps = NULL;
    GstElement *Filter = NULL;
    GstElement *VideoConvert = NULL;
    GstCaps *H264caps = NULL;
    GstElement *FilterH264 = NULL;
    GstElement *EncodePlugin = NULL;

 Pipeline = gst_pipeline_new("streaming-pipeline");
    if (!Pipeline)
    {
        return NULL;
    }

    /* Create the source element */
    FileSrc = gst_element_factory_make("filesrc", "filesrc");
    if (!FileSrc)
    {
        return -1;
    }

    /* Setting properties for source element */
    g_object_set(G_OBJECT(FileSrc), "blocksize", "4147200", (const
char*)NULL);
    g_object_set(G_OBJECT(FileSrc), "device", "camera1", (const char*)NULL);
    g_object_set(G_OBJECT(FileSrc), "location", "/home/root/file.raw",
(const char*)NULL);

    /* Create the capfilters element */
    Filter = gst_element_factory_make("capsfilter", NULL);
    if (!Filter)
    {
        return -1;
    }

    /* Configure property for capfiler element */

    Filtercaps = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT,
1920, "height",
            G_TYPE_INT, 1080, "framerate", GST_TYPE_FRACTION, 30,
            1, "format", G_TYPE_STRING, "I420", NULL);
    g_object_set(G_OBJECT(Filter), "caps", Filtercaps, NULL);
    gst_caps_unref(Filtercaps);

    /* Create plugin to convert video */
    VideoConvert = gst_element_factory_make("imxvideoconvert_ipu", NULL);
    if (!VideoConvert)
    {
        return -1;
    }
    /* Set property for the converter */
    g_object_set(G_OBJECT(VideoConvert), "livestreaming", true, (const
char*)NULL);

    /* Create the capfilters element for converter plugin */
    FilterH264 = gst_element_factory_make("capsfilter", NULL);

    if (!FilterH264)
    {
       return -1;

    }

    /* Configure property for capfiler element */
    H264caps = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT, 1280,
"height",
            G_TYPE_INT, 720, NULL);
    g_object_set(G_OBJECT(FilterH264), "caps", H264caps, NULL);
    gst_caps_unref(H264caps);
    STRMN_WriteLog(LOG_LEVEL_INFO, "caps filter for converter created\n");

    /* Create the encode plugin element for H264 codec */
    EncodePlugin = gst_element_factory_make("imxvpuenc_h264", NULL);
    if (!EncodePlugin)
    {
        return -1;
    }
    ...

  Can anybody help me to show out whether I can use two capsfilters for
imxvideoconvert_ipu? And why the invalid buffer received only occurs in the
C code?

Thanks alot for your support.

Best regard,
Tran Tu




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Invalid-buffer-size-error-when-convert-from-gst-launch-pipeline-to-C-code-with-imxvideoconvert-ipu-tp4677734.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list