From 8cffc7853ad6d1f4bfc9a255b210a1d356157ae3 Mon Sep 17 00:00:00 2001 From: ivo Date: Wed, 29 Sep 2004 01:46:30 +0000 Subject: Removal of vo_pgm and vo_md5, because they have been replaced by vo_pnm and vo_md5sum. If one tries to use the old video output drivers, a message is printed to direct them to the new drivers. Manual page is updated (or is this called downdated? :-) ). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13508 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 23 -------- help/help_mp-en.h | 4 ++ libvo/Makefile | 2 +- libvo/video_out.c | 8 +-- libvo/vo_md5.c | 132 -------------------------------------------- libvo/vo_pgm.c | 150 -------------------------------------------------- 6 files changed, 9 insertions(+), 310 deletions(-) delete mode 100644 libvo/vo_md5.c delete mode 100644 libvo/vo_pgm.c diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index ed612d063a..cea58b3758 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2774,18 +2774,6 @@ Activate prebuffering, not yet supported. .PD 1 . .TP -.B md5\ \ \ \ -Generates images from each frame with the help of \-vo pgm and writes -their MD5 sums into a file. -Useful for debugging. -.PD 0 -.RSs -.IPs filename -Allows specifying the output filename (default: ./md5). -.RE -.PD 1 -. -.TP .B md5sum\ Calculate MD5 sums of each frame and write them to a file. Supports RGB24 and YV12 colorspaces. @@ -2906,17 +2894,6 @@ Must be equal to or larger than 1 (default: 1000). .PD 1 . .TP -.B pgm\ \ \ \ -Output each frame into a PGM file in the current directory. -Each file takes the frame number padded with leading zeros as name. -Only supports the YV12 format. -The resulting image is (width) * (height * 1.5) of the original -image. -At coordinates 0,0 for width,height you have the Y plane, at -coordinates 0,height for width/2,height/2 you have the U plane -and at width/2,height for width/2,height/2 you have the V plane. -. -.TP .B png (also see \-z) Output each frame into a PNG file in the current directory. Each file takes the frame number padded with leading zeros as name. diff --git a/help/help_mp-en.h b/help/help_mp-en.h index 1d28369ee0..5400c2c684 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -801,6 +801,10 @@ static char help_text[]= #define MSGTR_VO_YUV4MPEG_InterlacedBFFMode "Using interlaced output mode, bottom-field first." #define MSGTR_VO_YUV4MPEG_ProgressiveMode "Using (default) progressive frame mode." +// Old vo drivers that have been replaced + +#define MSGTR_VO_PGM_HasBeenReplaced "The pgm video output driver has been replaced by -vo pnm:pgmyuv.\n" +#define MSGTR_VO_MD5_HasBeenReplaced "The md5 video output driver has been replaced by -vo md5sum.\n" // ======================= AO Audio Output drivers ======================== diff --git a/libvo/Makefile b/libvo/Makefile index c2506871f7..643e6c7ce6 100644 --- a/libvo/Makefile +++ b/libvo/Makefile @@ -3,7 +3,7 @@ include config.mak LIBNAME = libvo.a -SRCS=geometry.c aspect.c aclib.c osd.c font_load.c gtf.c spuenc.c video_out.c vo_null.c vo_pgm.c vo_md5.c vo_mpegpes.c vo_yuv4mpeg.c $(OPTIONAL_SRCS) sub.c font_load_ft.c vo_pnm.c vo_md5sum.c md5sum.c +SRCS=geometry.c aspect.c aclib.c osd.c font_load.c gtf.c spuenc.c video_out.c vo_null.c vo_mpegpes.c vo_yuv4mpeg.c $(OPTIONAL_SRCS) sub.c font_load_ft.c vo_pnm.c vo_md5sum.c md5sum.c OBJS=$(SRCS:.c=.o) ifeq ($(VIDIX),yes) diff --git a/libvo/video_out.c b/libvo/video_out.c index 446823aa86..44dcbd07cb 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -76,8 +76,6 @@ extern vo_functions_t video_out_null; extern vo_functions_t video_out_zr; extern vo_functions_t video_out_zr2; extern vo_functions_t video_out_bl; -extern vo_functions_t video_out_pgm; -extern vo_functions_t video_out_md5; extern vo_functions_t video_out_syncfb; extern vo_functions_t video_out_fbdev; extern vo_functions_t video_out_fbdev2; @@ -217,8 +215,6 @@ vo_functions_t* video_out_drivers[] = #endif &video_out_null, // &video_out_odivx, - &video_out_pgm, - &video_out_md5, &video_out_mpegpes, &video_out_yuv4mpeg, #ifdef HAVE_VESA @@ -264,6 +260,10 @@ vo_functions_t* init_best_video_out(char** vo_list){ while(vo_list[0][0]){ char* vo=strdup(vo_list[0]); vo_subdevice=strchr(vo,':'); + if (!strcmp(vo, "pgm")) + mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_PGM_HasBeenReplaced); + if (!strcmp(vo, "md5")) + mp_msg(MSGT_CPLAYER, MSGL_ERR, MSGTR_VO_MD5_HasBeenReplaced); if(vo_subdevice){ vo_subdevice[0]=0; ++vo_subdevice; diff --git a/libvo/vo_md5.c b/libvo/vo_md5.c deleted file mode 100644 index 17334c384b..0000000000 --- a/libvo/vo_md5.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * video_out_pgm.c, pgm interface - * - * - * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. - * - * Hacked into mpeg2dec by - * - * Aaron Holtzman - * - * 15 & 16 bpp support added by Franck Sicard - * - * Xv image suuport by Gerd Knorr - */ - -#include -#include -#include -#include - -#include "config.h" -#include "video_out.h" -#include "video_out_internal.h" - -static vo_info_t info = -{ - "MD5 sum", - "md5", - "walken", - "" -}; - -LIBVO_EXTERN (md5) - -extern vo_functions_t video_out_pgm; -extern char vo_pgm_filename[24]; - -static FILE * md5_file = NULL; -static char * md5_filename = NULL; - -static uint32_t -config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) -{ - md5_file = fopen (md5_filename?md5_filename:"md5", "w"); - if (!md5_file) - return -1; - return video_out_pgm.config (width, height, d_width,d_height,fullscreen, title, format); -} - -static void draw_osd(void) -{ -} - -static void flip_page (void) -{ - char buf2[100]; - FILE * f; - int i; - - video_out_pgm.flip_page(); - - snprintf (buf2, 100, "md5sum %s", vo_pgm_filename); - f = popen (buf2, "r"); - if (!f) { - snprintf (buf2, 100, "md5 %s", vo_pgm_filename); - f = popen(buf2, "r"); - } - if (f) { - i = fread (buf2, 1, sizeof(buf2), f); - pclose (f); - fwrite (buf2, 1, i, md5_file); - } - remove (vo_pgm_filename); -} - -//static uint32_t draw_slice(uint8_t * src[], uint32_t slice_num) -static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y) -{ - return video_out_pgm.draw_slice(image,stride,w,h,x,y); -} - -//extern uint32_t output_pgm_frame (char * fname, uint8_t * src[]); - -static uint32_t draw_frame(uint8_t * src[]) -{ - return 0; -} - -static uint32_t -query_format(uint32_t format) -{ - return video_out_pgm.control(VOCTRL_QUERY_FORMAT, &format); -} - - -static void -uninit(void) -{ - video_out_pgm.uninit(); - if (md5_file) - { - fflush(md5_file); - fclose(md5_file); - md5_file = NULL; - } - if (md5_filename) - { - free(md5_filename); - md5_filename = NULL; - } -} - - -static void check_events(void) -{ -} - -static uint32_t preinit(const char *arg) -{ - if(arg) - md5_filename = strdup(arg); - return 0; -} - -static uint32_t control(uint32_t request, void *data, ...) -{ - switch (request) { - case VOCTRL_QUERY_FORMAT: - return query_format(*((uint32_t*)data)); - } - return VO_NOTIMPL; -} diff --git a/libvo/vo_pgm.c b/libvo/vo_pgm.c deleted file mode 100644 index 16fc5789d3..0000000000 --- a/libvo/vo_pgm.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * video_out_pgm.c, pgm interface - * - * - * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. - * - * Hacked into mpeg2dec by - * - * Aaron Holtzman - * - * 15 & 16 bpp support added by Franck Sicard - * - * Xv image suuport by Gerd Knorr - */ - -#include -#include -#include -#include - -#include "config.h" -#include "video_out.h" -#include "video_out_internal.h" - -static vo_info_t info = -{ - "PGM file", - "pgm", - "walken", - "" -}; - -LIBVO_EXTERN (pgm) - -static int image_width; -static int image_height; -static char header[1024]; -static int framenum = 0; - -static uint8_t *image=NULL; - -char vo_pgm_filename[24]; - -static uint32_t -config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) -{ - image_height = height; - image_width = width; - image=malloc(width*height*3/2); - - snprintf (header, 1024, "P5\n\n%d %d\n255\n", width, height*3/2); - - return 0; -} - -static void draw_osd(void) -{ -} - -static void flip_page (void) -{ - FILE * f; - - snprintf (vo_pgm_filename, 24, "%08d.pgm", framenum++); - - f = fopen (vo_pgm_filename, "wb"); if (f == NULL) return; - fwrite (header, strlen (header), 1, f); - fwrite (image, image_width, image_height*3/2, f); - fclose (f); - - return; -} - -static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y) -{ - int i; - // copy Y: - uint8_t *dst=image+image_width*y+x; - uint8_t *src=srcimg[0]; - for(i=0;i