diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-05-31 18:33:28 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-05-31 18:33:28 +0000 |
commit | af85be8db56a088a7689baf9f4d1d67c2ee0decf (patch) | |
tree | 9576e1b0c2b3872fe6b26562fcd1ce98eeba8b9b | |
parent | 0306990681bdf214741c6ab2798b47bf8e578c97 (diff) | |
download | xine-lib-af85be8db56a088a7689baf9f4d1d67c2ee0decf.tar.gz xine-lib-af85be8db56a088a7689baf9f4d1d67c2ee0decf.tar.bz2 |
update video out api to allow better frame management (explicit locking)
img->displayed is obsolete now, drivers should use img->free.
CVS patchset: 4994
CVS date: 2003/05/31 18:33:28
26 files changed, 88 insertions, 85 deletions
diff --git a/src/dxr3/dxr3_mpeg_encoders.c b/src/dxr3/dxr3_mpeg_encoders.c index 109853c35..7f4279baa 100644 --- a/src/dxr3/dxr3_mpeg_encoders.c +++ b/src/dxr3/dxr3_mpeg_encoders.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: dxr3_mpeg_encoders.c,v 1.11 2003/05/25 18:36:51 mroi Exp $ + * $Id: dxr3_mpeg_encoders.c,v 1.12 2003/05/31 18:33:28 miguelfreitas Exp $ */ /* mpeg encoders for the dxr3 video out plugin. @@ -270,7 +270,7 @@ static int rte_on_display_frame(dxr3_driver_t *drv, dxr3_frame_t *frame) this->rte_ptr = rte_push_video_data(this->context, this->rte_ptr, frame->vo_frame.vpts / 90000.0); } - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); return 1; } @@ -475,7 +475,7 @@ static int fame_on_display_frame(dxr3_driver_t *drv, dxr3_frame_t *frame) if ((frame->vo_frame.width != this->fp.width) || (frame->oheight != this->fp.height)) { /* probably an old frame for a previous context. ignore it */ - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); return 1; } @@ -488,7 +488,7 @@ static int fame_on_display_frame(dxr3_driver_t *drv, dxr3_frame_t *frame) size = fame_encode_frame(this->context, &this->yuv, NULL); #endif - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); if (drv->fd_video == CLOSED_FOR_ENCODER) { snprintf (tmpstr, sizeof(tmpstr), "%s_mv%s", drv->class->devname, drv->class->devnum); diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c index fc4025854..ee9a795d1 100644 --- a/src/dxr3/video_out_dxr3.c +++ b/src/dxr3/video_out_dxr3.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_dxr3.c,v 1.81 2003/05/30 14:29:02 mroi Exp $ + * $Id: video_out_dxr3.c,v 1.82 2003/05/31 18:33:28 miguelfreitas Exp $ */ /* mpeg1 encoding video out plugin for the dxr3. @@ -88,9 +88,9 @@ static vo_info_t vo_info_dxr3_aa = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ #ifdef HAVE_X11 - { PLUGIN_VIDEO_OUT, 14, "dxr3", XINE_VERSION_CODE, &vo_info_dxr3_x11, &dxr3_x11_init_plugin }, + { PLUGIN_VIDEO_OUT, 15, "dxr3", XINE_VERSION_CODE, &vo_info_dxr3_x11, &dxr3_x11_init_plugin }, #endif - { PLUGIN_VIDEO_OUT, 14, "aadxr3", XINE_VERSION_CODE, &vo_info_dxr3_aa, &dxr3_aa_init_plugin }, + { PLUGIN_VIDEO_OUT, 15, "aadxr3", XINE_VERSION_CODE, &vo_info_dxr3_aa, &dxr3_aa_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -903,7 +903,7 @@ static void dxr3_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen) if (this->fd_video == CLOSED_FOR_DECODER) { /* no need to encode, when the device is already reserved for the decoder */ - frame_gen->displayed(frame_gen); + frame_gen->free(frame_gen); } else { if (this->need_update) { /* we cannot do this earlier, because vo_frame.duration is only valid here */ @@ -912,7 +912,7 @@ static void dxr3_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen) this->need_update = 0; } /* for non-mpeg, the encoder plugin is responsible for calling - * frame_gen->displayed(frame_gen) ! */ + * frame_gen->free(frame_gen) ! */ this->enc->on_display_frame(this, frame); } @@ -924,7 +924,7 @@ static void dxr3_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen) this->enc->on_unneeded(this); this->need_update = 0; } - frame_gen->displayed(frame_gen); + frame_gen->free(frame_gen); } } diff --git a/src/libffmpeg/xine_encoder.c b/src/libffmpeg/xine_encoder.c index dcd8290ff..1c0c7abce 100644 --- a/src/libffmpeg/xine_encoder.c +++ b/src/libffmpeg/xine_encoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_encoder.c,v 1.3 2003/05/30 14:10:49 mroi Exp $ + * $Id: xine_encoder.c,v 1.4 2003/05/31 18:33:29 miguelfreitas Exp $ */ /* mpeg encoders for the dxr3 video out plugin. */ @@ -262,7 +262,7 @@ static int lavc_on_display_frame(dxr3_driver_t *drv, dxr3_frame_t *frame) if (frame->vo_frame.bad_frame) return 1; /* ignore old frames */ if ((frame->vo_frame.width != this->context->width) || (frame->oheight != this->context->height)) { - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); printf("LAVC ignoring frame !!!\n"); return 1; } @@ -273,7 +273,7 @@ static int lavc_on_display_frame(dxr3_driver_t *drv, dxr3_frame_t *frame) /* do the encoding */ size = avcodec_encode_video(this->context, this->ffmpeg_buffer, DEFAULT_BUFFER_SIZE, this->picture); - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); if (drv->fd_video == CLOSED_FOR_ENCODER) { snprintf (tmpstr, sizeof(tmpstr), "%s_mv%s", drv->class->devname, drv->class->devnum); diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index f191d352f..cab57acb7 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_goom.c,v 1.30 2003/04/30 06:58:50 tmattern Exp $ + * $Id: xine_goom.c,v 1.31 2003/05/31 18:33:28 miguelfreitas Exp $ * * GOOM post plugin. * @@ -108,7 +108,7 @@ post_info_t goom_special_info = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 2, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, + { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 3, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 935647368..2794f0058 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mosaico.c,v 1.10 2003/03/14 16:14:24 skaboy Exp $ + * $Id: mosaico.c,v 1.11 2003/05/31 18:33:29 miguelfreitas Exp $ */ /* @@ -47,7 +47,7 @@ post_info_t mosaico_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "mosaico", MOVERSION, &mosaico_special_info, &mosaico_init_plugin }, + { PLUGIN_POST, 3, "mosaico", MOVERSION, &mosaico_special_info, &mosaico_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c index b116eb4c4..4b60c948c 100644 --- a/src/post/mosaico/switch.c +++ b/src/post/mosaico/switch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: switch.c,v 1.2 2003/03/15 14:10:44 skaboy Exp $ + * $Id: switch.c,v 1.3 2003/05/31 18:33:29 miguelfreitas Exp $ */ /* @@ -41,7 +41,7 @@ post_info_t switch_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "switch", SWVERSION, &switch_special_info, &switch_init_plugin }, + { PLUGIN_POST, 3, "switch", SWVERSION, &switch_special_info, &switch_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 278118702..ee4bd1042 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -39,7 +39,7 @@ post_info_t expand_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, + { PLUGIN_POST, 3, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 8d299a57a..114c22e0b 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: invert.c,v 1.8 2003/02/22 14:21:37 mroi Exp $ + * $Id: invert.c,v 1.9 2003/05/31 18:33:30 miguelfreitas Exp $ */ /* @@ -37,7 +37,7 @@ post_info_t invert_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, + { PLUGIN_POST, 3, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index 7f576af3e..f5f11e739 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.6 2003/04/30 06:58:51 tmattern Exp $ + * $Id: fooviz.c,v 1.7 2003/05/31 18:33:30 miguelfreitas Exp $ * */ @@ -362,6 +362,6 @@ post_info_t fooviz_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, + { PLUGIN_POST, 3, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/visualizations/visualizations.c b/src/post/visualizations/visualizations.c index d8653563a..2241aeea4 100644 --- a/src/post/visualizations/visualizations.c +++ b/src/post/visualizations/visualizations.c @@ -19,7 +19,7 @@ * * This file contains plugin entries for several visualization post plugins. * - * $Id: visualizations.c,v 1.2 2003/01/14 03:41:00 tmmm Exp $ + * $Id: visualizations.c,v 1.3 2003/05/31 18:33:30 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -43,7 +43,7 @@ post_info_t fftscope_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 2, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, - { PLUGIN_POST, 2, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, + { PLUGIN_POST, 3, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, + { PLUGIN_POST, 3, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index a164fcecd..363793abc 100644 --- a/src/video_out/video_out_aa.c +++ b/src/video_out/video_out_aa.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_aa.c,v 1.34 2003/03/06 16:49:31 guenter Exp $ + * $Id: video_out_aa.c,v 1.35 2003/05/31 18:33:30 miguelfreitas Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -215,7 +215,7 @@ static void aa_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { } } - frame->vo_frame.displayed (&frame->vo_frame); + frame->vo_frame.free (&frame->vo_frame); aa_fastrender(this->context, 0, 0, aa_imgwidth (this->context), @@ -328,6 +328,6 @@ static vo_info_t vo_info_aa = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "aa", XINE_VERSION_CODE, &vo_info_aa, init_class }, + { PLUGIN_VIDEO_OUT, 15, "aa", XINE_VERSION_CODE, &vo_info_aa, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c index e64cb667b..92ff0b1a4 100644 --- a/src/video_out/video_out_directfb.c +++ b/src/video_out/video_out_directfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_directfb.c,v 1.16 2003/03/06 16:49:31 guenter Exp $ + * $Id: video_out_directfb.c,v 1.17 2003/05/31 18:33:30 miguelfreitas Exp $ * * DirectFB based output plugin. * Rich Wareham <richwareham@users.sourceforge.net> @@ -384,7 +384,7 @@ static void directfb_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen directfb_frame_t *frame = (directfb_frame_t *) frame_gen; if( this->cur_frame ) - this->cur_frame->vo_frame.displayed (&this->cur_frame->vo_frame); + this->cur_frame->vo_frame.free (&this->cur_frame->vo_frame); this->cur_frame = frame; if ( (frame->width != this->last_frame_width) || @@ -400,7 +400,7 @@ static void directfb_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen directfb_render_image (this, frame); - frame->vo_frame.displayed (&frame->vo_frame); + frame->vo_frame.free (&frame->vo_frame); this->cur_frame = NULL; } diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c index 55691f287..9d7e44a94 100755 --- a/src/video_out/video_out_directx.c +++ b/src/video_out/video_out_directx.c @@ -968,7 +968,7 @@ static void win32_display_frame( vo_driver_t * vo_driver, vo_frame_t * vo_frame if( !win32_driver->contents ) { - vo_frame->displayed( vo_frame ); + vo_frame->free( vo_frame ); return; } @@ -1089,7 +1089,7 @@ static void win32_display_frame( vo_driver_t * vo_driver, vo_frame_t * vo_frame // tag our frame as displayed if((win32_driver->current != NULL) && (win32_driver->current != vo_frame)) { - vo_frame->displayed(&win32_driver->current->vo_frame); + vo_frame->free(&win32_driver->current->vo_frame); } win32_driver->current = vo_frame; } @@ -1279,6 +1279,6 @@ static vo_info_t vo_info_win32 = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "vo_directx", XINE_VERSION_CODE, &vo_info_win32, init_class }, + { PLUGIN_VIDEO_OUT, 15, "vo_directx", XINE_VERSION_CODE, &vo_info_win32, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c index b88d915a5..aa63a3381 100644 --- a/src/video_out/video_out_fb.c +++ b/src/video_out/video_out_fb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_fb.c,v 1.25 2003/03/19 15:29:27 holstsn Exp $ + * $Id: video_out_fb.c,v 1.26 2003/05/31 18:33:30 miguelfreitas Exp $ * * video_out_fb.c, frame buffer xine driver by Miguel Freitas * @@ -582,7 +582,7 @@ static void fb_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen) if(this->use_zero_copy) { if(this->old_frame) - this->old_frame->vo_frame.displayed + this->old_frame->vo_frame.free (&this->old_frame->vo_frame); this->old_frame = this->cur_frame; this->cur_frame = frame; @@ -605,7 +605,7 @@ static void fb_display_frame(vo_driver_t *this_gen, vo_frame_t *frame_gen) dst += this->fb_bytes_per_line; } - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); } } @@ -1053,7 +1053,7 @@ plugin_info_t xine_plugin_info[] = /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_OUT, - 14, + 15, "fb", XINE_VERSION_CODE, &vo_info_fb, fb_init_class diff --git a/src/video_out/video_out_none.c b/src/video_out/video_out_none.c index c94c0e8e3..2cb01977b 100644 --- a/src/video_out/video_out_none.c +++ b/src/video_out/video_out_none.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_none.c,v 1.13 2003/03/04 10:30:29 mroi Exp $ + * $Id: video_out_none.c,v 1.14 2003/05/31 18:33:31 miguelfreitas Exp $ * * Was originally part of toxine frontend. * ...but has now been adapted to xine coding style standards ;) @@ -169,7 +169,7 @@ static void none_display_frame(vo_driver_t *vo_driver, vo_frame_t *vo_frame) { /* none_driver_t *driver = (none_driver_t *)vo_driver; */ none_frame_t *frame = (none_frame_t *)vo_frame; - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); } static int none_get_property(vo_driver_t *vo_driver, int property) { @@ -302,6 +302,6 @@ static vo_info_t vo_info_none = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "none", XINE_VERSION_CODE, &vo_info_none, init_class }, + { PLUGIN_VIDEO_OUT, 15, "none", XINE_VERSION_CODE, &vo_info_none, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index 870f2b6d3..8ec4447f7 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_opengl.c,v 1.25 2003/02/28 02:51:51 storri Exp $ + * $Id: video_out_opengl.c,v 1.26 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_glut.c, glut based OpenGL rendering interface for xine * Matthias Hopf <mat@mshopf.de> @@ -731,7 +731,7 @@ static void opengl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) * multiple threads rendering in many OpenGL implementations) */ /* FIXME: check that */ #if 1 - frame->vo_frame.displayed (&frame->vo_frame); + frame->vo_frame.free (&frame->vo_frame); #endif DEBUGF ((stderr, "done display_frame\n")); } @@ -999,7 +999,7 @@ static vo_info_t vo_info_opengl = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "opengl", XINE_VERSION_CODE, + { PLUGIN_VIDEO_OUT, 15, "opengl", XINE_VERSION_CODE, &vo_info_opengl, opengl_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index 009036f6e..cf1289c22 100644 --- a/src/video_out/video_out_pgx64.c +++ b/src/video_out/video_out_pgx64.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_pgx64.c,v 1.27 2003/05/12 07:07:12 komadori Exp $ + * $Id: video_out_pgx64.c,v 1.28 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_pgx64.c, Sun PGX64/PGX24 output plugin for xine * @@ -472,7 +472,7 @@ static void pgx64_display_frame(pgx64_driver_t *this, pgx64_frame_t *frame) } if ((this->current != NULL) && (this->current != frame)) { - frame->vo_frame.displayed(&this->current->vo_frame); + frame->vo_frame.free(&this->current->vo_frame); } this->current = frame; } @@ -886,8 +886,8 @@ static pgx64_driver_class_t* pgx64fb_init_class(xine_t *xine, void *visual_gen) plugin_info_t xine_plugin_info[] = { #ifdef HAVE_X11 - {PLUGIN_VIDEO_OUT, 14, "pgx64", XINE_VERSION_CODE, &vo_info_pgx64, (void*)pgx64_init_class}, + {PLUGIN_VIDEO_OUT, 15, "pgx64", XINE_VERSION_CODE, &vo_info_pgx64, (void*)pgx64_init_class}, #endif - {PLUGIN_VIDEO_OUT, 14, "pgx64fb", XINE_VERSION_CODE, &vo_info_pgx64fb, (void*)pgx64fb_init_class}, + {PLUGIN_VIDEO_OUT, 15, "pgx64fb", XINE_VERSION_CODE, &vo_info_pgx64fb, (void*)pgx64fb_init_class}, {PLUGIN_NONE, 0, "", 0, NULL, NULL} }; diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index 7729cba3a..b83a18dec 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_sdl.c,v 1.24 2003/05/14 16:27:22 mroi Exp $ + * $Id: video_out_sdl.c,v 1.25 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_sdl.c, Simple DirectMedia Layer * @@ -344,7 +344,7 @@ static void sdl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { clip_rect.h = this->sc.output_height; SDL_DisplayYUVOverlay (frame->overlay, &clip_rect); - frame->vo_frame.displayed (&frame->vo_frame); + frame->vo_frame.free (&frame->vo_frame); pthread_mutex_unlock(&this->mutex); } @@ -595,6 +595,6 @@ static vo_info_t vo_info_sdl = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "sdl", XINE_VERSION_CODE, &vo_info_sdl, init_class }, + { PLUGIN_VIDEO_OUT, 15, "sdl", XINE_VERSION_CODE, &vo_info_sdl, init_class }, { PLUGIN_NONE, 0, "" , 0 , NULL, NULL} }; diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index ba241b580..064895fd2 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_syncfb.c,v 1.84 2003/01/29 15:34:28 miguelfreitas Exp $ + * $Id: video_out_syncfb.c,v 1.85 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -299,7 +299,7 @@ static void write_frame_sfb(syncfb_driver_t* this, syncfb_frame_t* frame) break; } - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); } void free_framedata(syncfb_frame_t* frame) @@ -603,7 +603,7 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) if(this->overlay_state) { if(this->bufinfo.id != -1) { printf("video_out_syncfb: error. (invalid syncfb image buffer state)\n"); - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); return; } @@ -613,7 +613,7 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) if(this->bufinfo.id == -1) { printf("video_out_syncfb: error. (syncfb module couldn't allocate image buffer)\n"); - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); /* * there are several "fixable" situations when this request will fail. @@ -634,7 +634,7 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) printf("video_out_syncfb: error. (commit ioctl failed)\n"); } else - frame->vo_frame.displayed(&frame->vo_frame); + frame->vo_frame.free(&frame->vo_frame); this->bufinfo.id = -1; } @@ -1057,7 +1057,7 @@ static vo_info_t vo_info_syncfb = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "SyncFB", XINE_VERSION_CODE, &vo_info_syncfb, init_class }, + { PLUGIN_VIDEO_OUT, 15, "SyncFB", XINE_VERSION_CODE, &vo_info_syncfb, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c index ab4262e5c..551451aef 100644 --- a/src/video_out/video_out_vidix.c +++ b/src/video_out/video_out_vidix.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_vidix.c,v 1.43 2003/05/02 01:10:10 jstembridge Exp $ + * $Id: video_out_vidix.c,v 1.44 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_vidix.c * @@ -641,7 +641,7 @@ static void vidix_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { this->next_frame=(this->next_frame+1)%this->vidix_play.num_frames; } - frame->vo_frame.displayed(frame_gen); + frame->vo_frame.free(frame_gen); pthread_mutex_unlock(&this->mutex); } @@ -1228,10 +1228,10 @@ static vo_info_t vo_info_vidixfb = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ #ifdef HAVE_X11 - { PLUGIN_VIDEO_OUT, 14, "vidix", XINE_VERSION_CODE, &vo_info_vidix, vidix_init_class }, + { PLUGIN_VIDEO_OUT, 15, "vidix", XINE_VERSION_CODE, &vo_info_vidix, vidix_init_class }, #endif #ifdef HAVE_FB - { PLUGIN_VIDEO_OUT, 14, "vidixfb", XINE_VERSION_CODE, &vo_info_vidixfb, vidixfb_init_class }, + { PLUGIN_VIDEO_OUT, 15, "vidixfb", XINE_VERSION_CODE, &vo_info_vidixfb, vidixfb_init_class }, #endif { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 14d17299f..b4bb0ec5d 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.110 2003/05/26 11:33:01 hadess Exp $ + * $Id: video_out_xshm.c,v 1.111 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -734,7 +734,7 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { || (this->cur_frame->sc.output_yoffset != frame->sc.output_yoffset) ) clean_output_area (this, frame); - this->cur_frame->vo_frame.displayed (&this->cur_frame->vo_frame); + this->cur_frame->vo_frame.free (&this->cur_frame->vo_frame); } this->cur_frame = frame; @@ -1289,6 +1289,6 @@ static vo_info_t vo_info_xshm = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, + { PLUGIN_VIDEO_OUT, 15, "xshm", XINE_VERSION_CODE, &vo_info_xshm, xshm_init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index c90826281..b62e192c5 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.168 2003/05/26 11:35:52 hadess Exp $ + * $Id: video_out_xv.c,v 1.169 2003/05/31 18:33:31 miguelfreitas Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -636,7 +636,7 @@ static void xv_add_recent_frame (xv_driver_t *this, xv_frame_t *frame) { i = VO_NUM_RECENT_FRAMES-1; if( this->recent_frames[i] ) - this->recent_frames[i]->vo_frame.displayed + this->recent_frames[i]->vo_frame.free (&this->recent_frames[i]->vo_frame); for( ; i ; i-- ) @@ -654,7 +654,7 @@ static void xv_flush_recent_frames (xv_driver_t *this) { for( i=0; i < VO_NUM_RECENT_FRAMES; i++ ) { if( this->recent_frames[i] ) - this->recent_frames[i]->vo_frame.displayed + this->recent_frames[i]->vo_frame.free (&this->recent_frames[i]->vo_frame); this->recent_frames[i] = NULL; } @@ -1466,7 +1466,7 @@ static vo_info_t vo_info_xv = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_VIDEO_OUT, 14, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, + { PLUGIN_VIDEO_OUT, 15, "xv", XINE_VERSION_CODE, &vo_info_xv, init_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index d060fefb1..8c247e706 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.c,v 1.11 2003/02/06 00:09:20 miguelfreitas Exp $ + * $Id: post.c,v 1.12 2003/05/31 18:33:31 miguelfreitas Exp $ */ /* @@ -146,10 +146,10 @@ static int post_frame_draw(vo_frame_t *vo_img, xine_stream_t *stream) { return vo_img->draw(vo_img, stream); } -static void post_frame_displayed(vo_frame_t *vo_img) { +static void post_frame_lock(vo_frame_t *vo_img) { post_video_port_t *port = (post_video_port_t *)vo_img->port; post_restore_video_frame(vo_img, port); - vo_img->displayed(vo_img); + vo_img->lock(vo_img); } static void post_frame_dispose(vo_frame_t *vo_img) { @@ -165,7 +165,7 @@ void post_intercept_video_frame(vo_frame_t *frame, post_video_port_t *port) { port->original_frame.copy = frame->copy; port->original_frame.field = frame->field; port->original_frame.draw = frame->draw; - port->original_frame.displayed = frame->displayed; + port->original_frame.lock = frame->lock; port->original_frame.dispose = frame->dispose; frame->port = &port->port; @@ -173,7 +173,7 @@ void post_intercept_video_frame(vo_frame_t *frame, post_video_port_t *port) { frame->copy = frame->copy ? post_frame_copy : NULL; /* this one can be NULL */ frame->field = post_frame_field; frame->draw = post_frame_draw; - frame->displayed = post_frame_displayed; + frame->lock = post_frame_lock; frame->dispose = post_frame_dispose; } @@ -183,7 +183,7 @@ void post_restore_video_frame(vo_frame_t *frame, post_video_port_t *port) { frame->copy = port->original_frame.copy; frame->field = port->original_frame.field; frame->draw = port->original_frame.draw; - frame->displayed = port->original_frame.displayed; + frame->lock = port->original_frame.lock; frame->dispose = port->original_frame.dispose; } diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index f00b55f67..894ef9180 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: post.h,v 1.8 2003/05/28 12:20:16 miguelfreitas Exp $ + * $Id: post.h,v 1.9 2003/05/31 18:33:31 miguelfreitas Exp $ * * post plugin definitions * @@ -38,7 +38,7 @@ # include <xine/xineutils.h> #endif -#define POST_PLUGIN_IFACE_VERSION 2 +#define POST_PLUGIN_IFACE_VERSION 3 typedef struct post_class_s post_class_t; diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 360c383b9..fa4e80180 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.159 2003/05/11 12:59:38 tmattern Exp $ + * $Id: video_out.c,v 1.160 2003/05/31 18:33:31 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -1477,7 +1477,7 @@ xine_video_port_t *vo_new_port (xine_t *xine, vo_driver_t *driver, img->port = &this->vo; img->free = vo_frame_dec_lock; - img->displayed = vo_frame_dec_lock; + img->lock = vo_frame_inc_lock; img->draw = vo_frame_draw; img->extra_info = &this->extra_info_base[i]; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index c8f06212a..faef454ea 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.h,v 1.87 2003/05/20 13:50:57 mroi Exp $ + * $Id: video_out.h,v 1.88 2003/05/31 18:33:32 miguelfreitas Exp $ * * * xine version of video_out.h @@ -75,7 +75,7 @@ struct vo_frame_s { * member functions */ - /* this frame is no longer used by the decoder */ + /* this frame is no longer used by the decoder, video driver, etc */ void (*free) (vo_frame_t *vo_img); /* tell video driver to copy/convert a slice of this frame, may be NULL */ @@ -89,8 +89,11 @@ struct vo_frame_s { returns number of frames to skip if decoder is late */ int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream); - /* this frame is no longer used by the video driver */ - void (*displayed) (vo_frame_t *vo_img); + /* lock frame as reference, must be paired with free. + * most decoders/drivers do not need to call this function since + * newly allocated frames are already locked once. + */ + void (*lock) (vo_frame_t *vo_img); /* free memory/resources for this frame */ void (*dispose) (vo_frame_t *vo_img); @@ -280,7 +283,7 @@ struct xine_video_port_s { * from generic vo functions. */ -#define VIDEO_OUT_DRIVER_IFACE_VERSION 14 +#define VIDEO_OUT_DRIVER_IFACE_VERSION 15 struct vo_driver_s { |