Hello!
I am working on raspberry pi.
When i try play video using video/videoPlayerExample with my own video I got some error.
My video is *.mov downloaded from the internet 480p (16:9).
My error is
[ error ] ofGstVideoUtils: preproll_cb(): error preproll buffer size :!1230720 != init size 1229760
so I opened that file
int stride = 0;
if(pixels.isAllocated() && pixels.getWidth()*pixels.getHeight()*pixels.getBytesPerPixel()!=(int)size){
GstCaps *caps = gst_sample_get_caps(sample);
GstVideoInfo vinfo;
gst_video_info_init (&vinfo);
gst_video_info_from_caps (&vinfo, caps);
GstVideoFrame f;
gst_video_frame_map(&f,&vinfo,_buffer,GST_MAP_READ);
stride = f.info.stride[0];
gst_video_frame_unmap(&f);
if(stride == (pixels.getWidth() * pixels.getHeight() * pixels.getBytesPerPixel())) {
ofLogError("ofGstVideoUtils") << "buffer_cb(): error on new buffer, buffer size: " << size << "!= init size: " << pixels.getWidth()*pixels.getHeight()*pixels.getBytesPerPixel();
gst_sample_unref (sample);
return GST_FLOW_ERROR;
}
}
Honsestly i do not have any idea how it works…
Maybe someone have idea why it doesn’t want work ?