|
From: Charles 'B. K. <kr...@ac...> - 2001-03-18 18:11:44
|
Oliver Strutynski <oli...@gm...> writes:
> Based on the playdv-code I am currently trying to get RGB data from a DV
> movie for display as a background image in an OpenGL application. At the
> moment I am still creating and initializing the display as it is done in
> playdv.c and I am trying to display the data returned from the call to
> dv_decode_full_frame in OpenGL.
If you just want the RGB data, you don't need andy of the dv_display_X
calls. Instead you should call dv_decode_full_frame with something like:
gint16 pitches[3];
guchar *pixels [3];
pixels[0] = gmalloc(dv_player->decoder->width * dv_player->decoder->height * 3);
pitches[0] = { dv_player->decoder->width };
...
dv_decode_full_frame(dv_player->decoder, dv_player->mmap_region.data_start,
e_dv_color_rgb,
pixels,
&pitches[0]);
...
your_gl_render_fn(...pixels[0]...)
-- Buck
|