Re: using MFC memory to memery encoder, start stream and queue order problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I rewrite my program, it takes the order as below
1.request buffer.
2.mmap input buffer with OUTPUT
3.output buffer with CAPTURE.
4.filled input buffer with the first frame.
5.enqueue the first frame in the input buffer in OUTPUT side
6.enqueue the output buffer in CAPTURE side
7.start stream
8.dequeue CAPTURE buffer and make output buffer pointer to data of it.
9.get output data from output buffer
/* the buffer get size is 22 below */
10.dequeue OUTPUT
/* timed out, it will never end */
Is there any problem with the order? I don't do any thing simultaneously
below, it seems to difficult to me to understand and not easy to debug.
I am not sure whether the mmap is correct, but I think it it as I don't
get segment fault.


And the thing in the next is like this I think
11.filled input buffer with the next frame
12.enqueue the next frame in the input buffer in OUTPUT side
13.dequeue CAPTURE buffer and make output buffer pointer to data of it.
14.dequeue OUTPUT
goto 11
Is it correct

I doubt the REAME
5. Request CAPTURE and OUTPUT buffers. Due to hardware limitations of MFC on
   some platforms it is recommended to use V4L2_MEMORY_MMAP buffers.
6. Enqueue CAPTURE buffers.
7. Enqueue OUTPUT buffer with first frame.
8. Start streaming (VIDIOC_STREAMON) on both ends.
9. Simultaneously:
I don't need to dequeue the OUTPUT buffer which is with first frame?
   - enqueue buffers with next frames,
   - dequeue used OUTPUT buffers (blocking operation),
   - dequeue buffers with encoded stream (blocking operation),
   - enqueue free CAPTURE buffers.


							Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux