annotate libvo/vo_md5.c @ 674:10fc57f7e368

FAQ filename fixed
author arpi_esp
date Mon, 30 Apr 2001 02:38:41 +0000
parents 2313c6ea006f
children c1daff266657
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * video_out_pgm.c, pgm interface
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * Hacked into mpeg2dec by
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 * 15 & 16 bpp support added by Franck Sicard <Franck.Sicard@solsoft.fr>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 * Xv image suuport by Gerd Knorr <kraxel@goldbach.in-berlin.de>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #include <string.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #include "config.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 #include "video_out.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 #include "video_out_internal.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 LIBVO_EXTERN (md5)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 static vo_info_t vo_info =
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 "MD5 sum",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 "md5",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 "walken",
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 ""
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 extern vo_functions_t video_out_pgm;
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
35 extern char vo_pgm_filename[24];
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 static FILE * md5_file;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 static uint32_t
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 md5_file = fopen ("md5", "w");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 return video_out_pgm.init (width, height, d_width,d_height,fullscreen, title, format);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 static const vo_info_t*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 get_info(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 return &vo_info;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 static void flip_page (void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 {
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
54 char buf2[100];
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
55 FILE * f;
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
56 int i;
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
57
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
58 video_out_pgm.flip_page();
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
59
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
60 sprintf (buf2, "md5sum %s", vo_pgm_filename);
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
61 f = popen (buf2, "r");
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
62 i = fread (buf2, 1, sizeof(buf2), f);
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
63 pclose (f);
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
64 fwrite (buf2, 1, i, md5_file);
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
65
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
66 remove (vo_pgm_filename);
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
67
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 //static uint32_t draw_slice(uint8_t * src[], uint32_t slice_num)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 {
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
73 return video_out_pgm.draw_slice(image,stride,w,h,x,y);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
76 //extern uint32_t output_pgm_frame (char * fname, uint8_t * src[]);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 static uint32_t draw_frame(uint8_t * src[])
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 return 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 static uint32_t
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 query_format(uint32_t format)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 {
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
86 return video_out_pgm.query_format(format);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 static void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 uninit(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 {
491
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
93 video_out_pgm.uninit();
2313c6ea006f YV12 is working again
arpi_esp
parents: 31
diff changeset
94 fclose(md5_file);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 15
diff changeset
98 static void check_events(void)
1fc618eba830 added check_events() interface
arpi_esp
parents: 15
diff changeset
99 {
1fc618eba830 added check_events() interface
arpi_esp
parents: 15
diff changeset
100 }
1fc618eba830 added check_events() interface
arpi_esp
parents: 15
diff changeset
101
1fc618eba830 added check_events() interface
arpi_esp
parents: 15
diff changeset
102