Juuso Alasuutari <juuso.alasuutari(a)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>