gstreamer omxh264encoder error
Guillaume Desmottes
guillaume.desmottes at collabora.com
Mon Aug 12 03:10:16 UTC 2019
That's strange, check the adress actually used by v4l2src and used by
gst-omx.
Maybe more buffers are created on the fly using CREATEBUF?
On 09/08/2019 15:40, Andrea wrote:
> The addresses of the buffers are "fixed", when I get all the information
> (vidioc_s_fmt) I allocate 8 "frames" in memory and they are no longer
> modified. These buffers are passed to gstreamer (userspace) via the mmap
> function:
>
> long length = vma->vm_end - vma->vm_start;
>
> if( length > PAGE_ALIGN(skel->pix_format.sizeimage) ){
> printk(KERN_INFO "ERROR, length (%d) > skel->buffer_size (%d)", length,
> skel->buffer_size);
> return -EINVAL;
> }
>
> vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> vma->vm_flags |= VM_IO;
> int ret = remap_pfn_range(vma, vma->vm_start,
> PFN_DOWN(virt_to_phys(phys_to_virt(lp->paddrY[mmap_idx]))) + vma->vm_pgoff,
> length, vma->vm_page_prot);
>
> skel->buffers[mmap_idx].buffer.flags |= V4L2_BUF_FLAG_MAPPED;
>
> if( mmap_idx < MAX_FRAMES-1 )
> mmap_idx++;
> else
> mmap_idx = 0;
>
> return ret;
>
>
> The addresses used for the 8 frames stored in memory, not remapped to
> userspace by mmap:
> Buf 0: 0xe000000
> Buf 1: 0xe400000
> Buf 2: 0xe800000
> Buf 3: 0xec00000
> Buf 4: 0xf000000
> Buf 5: 0xf400000
> Buf 6: 0xf800000
> Buf 7: 0xfc00000
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list