Hi,

it appears the sources you attached to the message did not go through the moderation.. btw a few comments below.

..snip..

> *//Possible problem*
> * **size = 352*288*(3/2);*
> * **buffer = gst_buffer_try_new_and_alloc (size);*

is there a particular reason for allocating this from the application? The pipeline is usually handling buffer allocation/release automagically.

> * **if (buffer==NULL){*
> * **  g_printerr("failed to allocate memory\n");*
> * **}*
> *//Possible problem *
> * **gst_buffer_set_caps (buffer,caps);*
>  *//Set up the video encoding parameters*
> * **caps = gst_caps_new_simple ("video/x-raw-yuv",*
> * **"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),*
> * **"width",  G_TYPE_INT, 352,*
> * **"height", G_TYPE_INT, 288,*
> * **"framerate", GST_TYPE_FRACTION, 25, 1, NULL);*
> * **if ( !caps ) {*
> * **g_printerr("Failed to create caps\n");*
> * **return 0;*
> * **}*
>  err = gst_element_link_filtered(filesrc, time, caps);

what is the time element? It's possible caps are not propagated to the encoder if not directly connected to the filesrc.

Moreover, I didn't catch where you're setting the blocksize property in your filesrc to "size".

..Snip..

> There is something wrong or missing in this function? How can I make
> what I want to work?

See my comments above ;)

P.S. Maybe you could attach (or better copy to pastebin) the output when setting GST-DEBUG to 2 from the shell prior executing your binary.

Regards


>
> Please, I need help.
>
> thanks for the previous answers and thanks in advance