• H
    [media] vb2: remove the 'fileio = NULL' hack · b2f2f047
    Hans Verkuil 提交于
    The read/write implementation in vb2 reuses existing vb2 functions, but
    it sets q->fileio to NULL before calling them in order to skip the
    'q->fileio != NULL' check.
    
    This works today due to the synchronous nature of read/write, but it
    1) is ugly, and 2) will fail in an asynchronous use-case such as a
    thread queuing and dequeuing buffers. This last example will be necessary
    in order to implement vb2 DVB support.
    
    This patch removes the hack by splitting up the dqbuf/qbuf/streamon/streamoff
    functions into an external and an internal version. The external version
    checks q->fileio and then calls the internal version. The read/write
    implementation now just uses the internal version, removing the need to
    set q->fileio to NULL.
    Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
    b2f2f047
videobuf2-core.c 73.9 KB