[LAD] FW: [piksel] The future of videojack ?

Nedko Arnaudov nedko at arnaudov.name
Tue May 6 22:41:30 UTC 2008


Juuso Alasuutari <juuso.alasuutari at gmail.com> writes:

> /*
>   * Set the video frame rate to num1/num2
>   */
> int
> jack_set_video_rate (jack_client_t  *client,
>                       jack_nframes_t  num1,
>                       jack_nframes_t  num2);

I think we should have this as part of control API instead. Unless we
allow changing of sample rate on-the-fly too.

> /*
>   * Set the video processing callback function
>   */
> int
> jack_set_video_callback (jack_client_t       *client,
>                           JackProcessCallback  video_callback,
>                           void                *arg);

I think we could reuse audio process callback.

> /*
>   * Get the number of frames in a video port buffer
>   */
> jack_nframes_t
> jack_video_get_frame_count (void *port_buffer);
>
> /*
>   * Get a frame from a video port buffer
>   */
> int
> jack_video_get_frame (jack_video_frame_t *frame,
>                        void               *port_buffer,
>                        jack_nframes_t      event_index);

I think instead of port_buffer (void *) we should use jack_port_t.
Also I think we could use jack_port_get_buffer() instead of inventing
new function (jack_video_get_frame).

> /*
>   * A video frame type
>   */
> typedef struct _jack_video_frame_t jack_video_frame_t;
> struct _jack_video_frame_t
> {
> 	/* The video frame's timestamp (corresponds to
> 	   an audio frame index within the same period) */
> 	jack_nframes_t  time;
>
> 	/* The size (in bytes) of the raw frame data */
> 	size_t          size;
>
> 	/* Pointer to raw video frame data. Can be of any format;
> 	   it is up to the application to manage that stuff */
> 	void           *raw_data_ptr;
> };

I think we should either have frame size as part of global setup or we
should leave that to reside in data pointed by raw_data_ptr (varsize
frames).

With jack_port_get_buffer() instead of jack_video_get_frame(), I think
it would be better to have:

/* Return timestamp of video frame (corresponds to
   an audio frame index within the same period) */
jack_nframes_t
jack_video_get_frame_offset(
    jack_port_t * video_port,
    jack_nframes_t frame);

-- 
Nedko Arnaudov <GnuPG KeyID: DE1716B0>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20080507/5d623a2e/attachment.pgp>


More information about the Linux-audio-dev mailing list