I was using Gstreamer to encode h265 on TX1 . i use appsrc to get the yuv420 data , but after a while my program killed by linux , here is my pushbuffer programe
void PushBuffer()
{
GstFlowReturn ret;
GstBuffer buffer;
int size = WIDTHHEIGHT;
GstMapInfo info;
buffer = gst_buffer_new_allocate(NULL, size, NULL); //分配空间
gst_buffer_map(buffer, &info, GST_MAP_WRITE);
unsigned char* buf = info.data;
memmove(buf, rawdata, size);
gst_buffer_unmap(buffer, &info);
ret = gst_app_src_push_buffer(GST_APP_SRC(appsrc), buffer);
if(ret < 0)
{
puts(" pushbuffer error\n");
}
}