diff options
author | 2001-02-24 20:28:24 +0000 | |
---|---|---|
committer | 2001-02-24 20:28:24 +0000 | |
commit | d34041569e71fc9bd772354e94dc9d16061072a5 (patch) | |
tree | 8f481cae1c70f32d1756fbe5f39000577b73042d /libvo/vo_md5.c | |
parent | e95a95ece09bac96bdfd37322f96c6f57ef79ebc (diff) |
Initial revision
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_md5.c')
-rw-r--r-- | libvo/vo_md5.c | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/libvo/vo_md5.c b/libvo/vo_md5.c new file mode 100644 index 0000000000..21141e8807 --- /dev/null +++ b/libvo/vo_md5.c @@ -0,0 +1,106 @@ +#define DISP + +/* + * video_out_pgm.c, pgm interface + * + * + * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. + * + * Hacked into mpeg2dec by + * + * Aaron Holtzman <aholtzma@ess.engr.uvic.ca> + * + * 15 & 16 bpp support added by Franck Sicard <Franck.Sicard@solsoft.fr> + * + * Xv image suuport by Gerd Knorr <kraxel@goldbach.in-berlin.de> + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "config.h" +#include "video_out.h" +#include "video_out_internal.h" + +LIBVO_EXTERN (md5) + +static vo_info_t vo_info = +{ + "MD5 sum", + "md5", + "walken", + "" +}; + +extern vo_functions_t video_out_pgm; + +static FILE * md5_file; +static int framenum = -2; + +static uint32_t +init(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", "w"); + return video_out_pgm.init (width, height, d_width,d_height,fullscreen, title, format); +} + +static const vo_info_t* +get_info(void) +{ + return &vo_info; +} + +static void flip_page (void) +{ +} + +//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 0; +} + +extern uint32_t output_pgm_frame (char * fname, uint8_t * src[]); + +static uint32_t draw_frame(uint8_t * src[]) +{ + char buf[100]; + char buf2[100]; + FILE * f; + int i; + + if (++framenum < 0) + return 0; + + sprintf (buf, "%d.pgm", framenum); + output_pgm_frame (buf, src); + + sprintf (buf2, "md5sum %s", buf); + f = popen (buf2, "r"); + i = fread (buf2, 1, sizeof(buf2), f); + pclose (f); + fwrite (buf2, 1, i, md5_file); + + remove (buf); + + return 0; +} + +static uint32_t +query_format(uint32_t format) +{ + switch(format){ + case IMGFMT_YV12: + return 1; + } + return 0; +} + + +static void +uninit(void) +{ +} + + |