diff options
-rw-r--r-- | src/video_out/video_out_aa.c | 10 | ||||
-rw-r--r-- | src/video_out/video_out_syncfb.c | 4 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 24 |
3 files changed, 30 insertions, 8 deletions
diff --git a/src/video_out/video_out_aa.c b/src/video_out/video_out_aa.c index c1e884b18..179157e7c 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.6 2001/06/13 18:25:27 guenter Exp $ + * $Id: video_out_aa.c,v 1.7 2001/06/14 18:32:57 guenter Exp $ * * video_out_aa.c, ascii-art output plugin for xine * @@ -127,6 +127,8 @@ static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, aa_frame_t *frame = (aa_frame_t *) img; + /* printf ("aa_update_format...\n"); */ + if ((frame->width != width) || (frame->height != height) || (frame->format != format)) { @@ -154,6 +156,9 @@ static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, frame->vo_frame.base[0] = malloc_aligned(16,image_size, (void**) &frame->mem[0]); frame->vo_frame.base[1] = malloc_aligned(16,image_size/4, (void**) &frame->mem[1]); frame->vo_frame.base[2] = malloc_aligned(16,image_size/4, (void**) &frame->mem[2]); + + /* printf ("allocated yuv memory for %d x %d image\n", width, height); */ + } else if (format == IMGFMT_YUY2) { image_size = width * 2 * height; frame->vo_frame.base[0] = malloc_aligned(16,image_size, (void**) &frame->mem[0]); @@ -165,6 +170,8 @@ static void aa_update_frame_format (vo_driver_t *this, vo_frame_t *img, frame->ratio_code = ratio_code; } + + /* printf ("aa_update_format done\n"); */ } static void aa_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { @@ -217,6 +224,7 @@ static void aa_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { aa_imgheight (this->context)); aa_flush (this->context); + } static int aa_get_property (vo_driver_t *this_gen, int property) { diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index d2ba25a35..fa09ddf99 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.4 2001/05/30 18:32:15 joachim_koenig Exp $ + * $Id: video_out_syncfb.c,v 1.5 2001/06/14 18:32:57 guenter Exp $ * * video_out_syncfb.c, Matrox G400 video extension interface for xine * @@ -866,7 +866,7 @@ static vo_info_t vo_info_mga = { "Syncfb", "xine video output plugin using MGA Teletux (syncfb) video extension", VISUAL_TYPE_X11, - 10 + 20 }; vo_info_t *get_video_out_plugin_info() { diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 9d69399de..7ab6a5c83 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.22 2001/06/11 00:50:36 guenter Exp $ + * $Id: load_plugins.c,v 1.23 2001/06/14 18:32:57 guenter Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -35,6 +35,7 @@ #include <dlfcn.h> #include <string.h> #include <errno.h> +#include <stdlib.h> #include "xine_internal.h" #include "demuxers/demux.h" @@ -472,6 +473,8 @@ char **xine_list_video_output_plugins (int visual_type) { char **plugin_ids; int num_plugins = 0; DIR *dir; + int i,j; + int plugin_prios[50]; plugin_ids = xmalloc (50 * sizeof (char *)); plugin_ids[0] = NULL; @@ -522,12 +525,23 @@ char **xine_list_video_output_plugins (int visual_type) { /* printf("video output plugin found : %s (%s)\n", vo_info->id, vo_info->description); */ - /* FIXME: sort the list by vo_info->priority */ + /* sort the list by vo_info->priority */ - plugin_ids[num_plugins] = (char *) - malloc (strlen(vo_info->id)+1); + i = 0; + while ( (i<num_plugins) && (vo_info->priority<plugin_prios[i]) ) + i++; + + j = num_plugins; + while (j>i) { + plugin_ids[j] = plugin_ids[j-1]; + plugin_prios[j] = plugin_prios[j-1]; + j--; + } + + plugin_ids[i] = (char *) malloc (strlen(vo_info->id)+1); + strcpy (plugin_ids[i], vo_info->id); + plugin_prios[i] = vo_info->priority; - strcpy (plugin_ids[num_plugins], vo_info->id); num_plugins++; plugin_ids[num_plugins] = NULL; } |