Gstreamer dev : custom source based on basesrc

Geek-Gst vinod.kesti at mailinator.com
Wed Jan 23 06:05:16 UTC 2019


Duchassin,

This asserts are due to padtemplate. Check your stats pad registry once.

Some corrections in gst_pciesrc_fill. Specify what is the size to be read
from read() and in the end set the buffer size.

gst_pciesrc_fill (GstBaseSrc * src, guint64 offset, guint size, 
GstBuffer * buf) 
{ 
   GstPciesrc *pciesrc = GST_PCIESRC (src); 

   GST_DEBUG_OBJECT (pciesrc, "fill"); 

   if(fd != -1) 
   { 
       GstMapInfo info; 

     //Read the global device 
     gst_buffer_map (buf, &info, GST_MAP_WRITE); 
     info.size = size;
     int rc = read(fd, info.data, info.size); 

     gst_buffer_unmap (buf, &info); 
     gst_buffer_resize (buf, 0, size);
     GST_DEBUG_OBJECT (pciesrc, "info.size = %d", info.size); 
     GST_DEBUG_OBJECT (pciesrc, "rc = %d", rc); 
   } 

   return GST_FLOW_OK; 
} 




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list