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