Mercurial > mplayer.hg
comparison libass/ass_render.c @ 27410:33b9d3402d3e
Don't print drawing commands on screen.
Drawing mode is not implemented in libass.
author | eugeni |
---|---|
date | Fri, 08 Aug 2008 20:08:02 +0000 |
parents | fa56dd3b3cfd |
children | 0e90b97bee00 |
comparison
equal
deleted
inserted
replaced
27409:e2de11109139 | 27410:33b9d3402d3e |
---|---|
159 int clip_x0, clip_y0, clip_x1, clip_y1; | 159 int clip_x0, clip_y0, clip_x1, clip_y1; |
160 char detect_collisions; | 160 char detect_collisions; |
161 uint32_t fade; // alpha from \fad | 161 uint32_t fade; // alpha from \fad |
162 char be; // blur edges | 162 char be; // blur edges |
163 int shadow; | 163 int shadow; |
164 int drawing_mode; // not implemented; when != 0 text is discarded, except for style override tags | |
164 | 165 |
165 effect_t effect_type; | 166 effect_t effect_type; |
166 int effect_timing; | 167 int effect_timing; |
167 int effect_skip_timing; | 168 int effect_skip_timing; |
168 | 169 |
1026 int val; | 1027 int val; |
1027 if (mystrtoi(&p, 10, &val)) | 1028 if (mystrtoi(&p, 10, &val)) |
1028 render_context.shadow = val; | 1029 render_context.shadow = val; |
1029 else | 1030 else |
1030 render_context.shadow = render_context.style->Shadow; | 1031 render_context.shadow = render_context.style->Shadow; |
1032 } else if (mystrcmp(&p, "pbo")) { | |
1033 (void)strtol(p, &p, 10); // ignored | |
1034 } else if (mystrcmp(&p, "p")) { | |
1035 int val; | |
1036 if (!mystrtoi(&p, 10, &val)) | |
1037 val = 0; | |
1038 render_context.drawing_mode = !!val; | |
1031 } | 1039 } |
1032 | 1040 |
1033 return p; | 1041 return p; |
1034 | 1042 |
1035 #undef skip | 1043 #undef skip |
1201 render_context.clip_y0 = 0; | 1209 render_context.clip_y0 = 0; |
1202 render_context.clip_x1 = frame_context.track->PlayResX; | 1210 render_context.clip_x1 = frame_context.track->PlayResX; |
1203 render_context.clip_y1 = frame_context.track->PlayResY; | 1211 render_context.clip_y1 = frame_context.track->PlayResY; |
1204 render_context.detect_collisions = 1; | 1212 render_context.detect_collisions = 1; |
1205 render_context.fade = 0; | 1213 render_context.fade = 0; |
1214 render_context.drawing_mode = 0; | |
1206 render_context.effect_type = EF_NONE; | 1215 render_context.effect_type = EF_NONE; |
1207 render_context.effect_timing = 0; | 1216 render_context.effect_timing = 0; |
1208 render_context.effect_skip_timing = 0; | 1217 render_context.effect_skip_timing = 0; |
1209 | 1218 |
1210 apply_transition_effects(event); | 1219 apply_transition_effects(event); |
1748 p = event->Text; | 1757 p = event->Text; |
1749 // Event parsing. | 1758 // Event parsing. |
1750 while (1) { | 1759 while (1) { |
1751 // get next char, executing style override | 1760 // get next char, executing style override |
1752 // this affects render_context | 1761 // this affects render_context |
1753 code = get_next_char(&p); | 1762 do { |
1763 code = get_next_char(&p); | |
1764 } while (code && render_context.drawing_mode); // skip everything in drawing mode | |
1754 | 1765 |
1755 // face could have been changed in get_next_char | 1766 // face could have been changed in get_next_char |
1756 if (!render_context.font) { | 1767 if (!render_context.font) { |
1757 free_render_context(); | 1768 free_render_context(); |
1758 return 1; | 1769 return 1; |