Regarding buffer size

Shilpa Chandrappa elites.shilpa at gmail.com
Thu Jan 2 06:43:32 PST 2014


Hi,

I am receiving rtsp video streams(video format: H264) to buffer using
appsink. To confirm whether data is received correctly I wrote the data from
buffer to a file and file played successfully. But when I am printing the
size of buffer I am getting lot of variation. Could anyone explain what this
size refers to ? Is this frame size of h264 data ?


Code snippet to print the Buffer size .
==========================


Appsink Pull Buffer Code

static void new_buffer (GstElement *sink, CustomData *data) {
  GstBuffer *buffer;

    g_signal_emit_by_name (sink, "pull-buffer", &buffer);
    if (buffer) {

      gint size=GST_BUFFER_SIZE(buffer);
      g_print("\nsize=%d \n",size);

      fwrite(GST_BUFFER_DATA(buffer), 1, GST_BUFFER_SIZE(buffer),data->fp);

      gst_buffer_unref (buffer);
   }
}

==========================

Result
==========================
size=74037

size=15268

size=12435

size=11429

size=11687

size=11056

size=10762

size=10938

size=10400

size=10569

size=10409

size=10134

size=10098

size=10193

size=10191

size=9934

size=10143

size=10070

size=9880

size=9834

size=9576

size=9804

size=10188

size=9576

size=9835

size=10203

size=10203

size=10153

size=9807

size=9781

size=55

size=8

==========================


Thanks,
Shilpa



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Regarding-buffer-size-tp4664396.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list