Rev 5372 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4438 | Serge | 1 | |
2 | |||
3 | |||
4 | #define BLACK_MAGIC_VIDEO |
||
5 | |||
6 | |||
7 | typedef unsigned int count_t; |
||
8 | |||
9 | |||
10 | |||
11 | |||
12 | #define HAS_TOP (1<<1) |
||
13 | #define HAS_RIGHT (1<<2) |
||
14 | #define HAS_BOTTOM (1<<3) |
||
15 | |||
16 | |||
17 | { |
||
18 | uint32_t caps; |
||
19 | uint32_t ctx_width; |
||
20 | uint32_t ctx_height; |
||
21 | uint32_t win_width; |
||
22 | uint32_t win_height; |
||
23 | |||
24 | |||
25 | rect_t rcvideo; |
||
26 | rect_t rcleft; |
||
27 | rect_t rctop; |
||
28 | rect_t rcright; |
||
29 | rect_t rcbottom; |
||
30 | |||
31 | |||
32 | bitmap_t bitmap[4]; |
||
33 | bitmap_t *last_bitmap; |
||
34 | |||
35 | |||
36 | int target; |
||
37 | |||
38 | |||
39 | enum{ |
||
40 | EMPTY, INIT }state; |
||
41 | enum win_state win_state; |
||
42 | |||
43 | |||
44 | }; |
||
45 | |||
46 | |||
47 | { |
||
48 | CLOSED = 0, |
||
49 | PREPARE, |
||
50 | STOP, |
||
51 | PAUSE, |
||
52 | PLAY, |
||
53 | REWIND, |
||
54 | PLAY_2_STOP, |
||
55 | PLAY_2_PAUSE, |
||
56 | PAUSE_2_PLAY, |
||
57 | REWIND_2_PLAY, |
||
58 | }; |
||
59 | |||
60 | |||
61 | #define ID_STOP 101 |
||
62 | #define ID_PROGRESS 102 |
||
63 | #define ID_VOL_LEVEL 103 |
||
64 | #define ID_VOL_CTRL 104 |
||
65 | |||
66 | |||
67 | { |
||
68 | volatile uint32_t lock; |
||
69 | char *buffer; |
||
70 | volatile uint32_t count; |
||
71 | }astream_t; |
||
72 | |||
73 | |||
74 | { |
||
75 | unsigned int code; |
||
76 | unsigned int sender; |
||
77 | unsigned int stream; |
||
78 | unsigned int offset; |
||
79 | unsigned int size; |
||
80 | unsigned int unused[2]; |
||
81 | }SND_EVENT; |
||
82 | |||
83 | |||
84 | |||
85 | AVPacketList *first_pkt; |
||
86 | AVPacketList *last_pkt; |
||
87 | int size; |
||
88 | int count; |
||
89 | volatile uint32_t lock; |
||
90 | } queue_t; |
||
91 | |||
92 | |||
93 | int get_packet(queue_t *q, AVPacket *pkt); |
||
94 | |||
95 | |||
96 | |||
97 | extern AVRational video_time_base; |
||
98 | |||
99 | |||
100 | void destroy_render(render_t *render); |
||
101 | int init_render(render_t *render, int width, int height); |
||
102 | void render_adjust_size(render_t *render, window_t *win); |
||
103 | void render_set_size(render_t *render, int width, int height); |
||
104 | void render_draw_client(render_t *render); |
||
105 | |||
106 | |||
107 | |||
108 | int audio_thread(void *param); |
||
109 | void set_audio_volume(int left, int right); |
||
110 | |||
111 | |||
112 | int video_thread(void *param); |
||
113 | |||
114 | |||
115 | int decode_audio(AVCodecContext *ctx, queue_t *qa); |
||
116 | |||
117 | |||
118 | |||
119 | |||
120 | |||
121 | |||
122 | |||
123 | |||
124 | |||
125 | { |
||
126 | *val = 0; |
||
127 | } |
||
128 | |||
129 | |||
130 | { |
||
131 | __asm__ __volatile__ ( |
||
132 | "int $0x40" |
||
133 | ::"a"(68),"b"(14),"c"(event)); |
||
134 | } |
||
135 | |||
136 | |||
137 | |||
138 | |||
139 | int draw_text(bitmap_t *winbitmap, int face, char *text, int x, int y, int color); |
||
140 | int draw_text_ext(bitmap_t *winbitmap, int face, char *text, rect_t *rc, int color); |
||
141 | char *get_moviefile();3) |
||
142 | |||
143 |