Re: [RFC PATCH v7 3/7] media: videobuf2: Add set_timestamp to struct vb2_queue

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

 



Hi Junghak,

On Fri, Oct 16, 2015 at 03:27:39PM +0900, Junghak Sung wrote:
> diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
> index f1e7169..6ef7da7 100644
> --- a/include/media/videobuf2-core.h
> +++ b/include/media/videobuf2-core.h
> @@ -431,6 +431,7 @@ struct vb2_buf_ops {
>   *		called since poll() needs to return POLLERR in that situation.
>   * @is_multiplanar: set if buffer type is multiplanar
>   * @is_output:	set if buffer type is output
> + * @copy_timestamp: set if vb2-core should set timestamps
>   * @last_buffer_dequeued: used in poll() and DQBUF to immediately return if the
>   *		last decoded buffer was already dequeued. Set for capture queues
>   *		when a buffer with the V4L2_BUF_FLAG_LAST is dequeued.
> @@ -480,6 +481,7 @@ struct vb2_queue {
>  	unsigned int			waiting_for_buffers:1;
>  	unsigned int			is_multiplanar:1;
>  	unsigned int			is_output:1;
> +	unsigned int			set_timestamp:1;
>  	unsigned int			last_buffer_dequeued:1;
>  
>  	struct vb2_fileio_data		*fileio;

V4L2 buffers use struct timeval with µs precision. Generally speaking, if us
precision is preferred elsewhere, the non-V4l2 specific portion could use
that. The conversion could be done in the videobuf2-v4l2.c.

This could be also changed later on if needed, but please use struct
timespec in new APIs instead of struct timeval. V4L2 events use it, for
instance.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
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