]>
Commit | Line | Data |
---|---|---|
b2f663f0 JB |
1 | --- vlc-3.0.16/modules/video_output/caca.c.orig 2017-11-24 16:29:18.000000000 +0100 |
2 | +++ vlc-3.0.16/modules/video_output/caca.c 2022-01-30 19:43:25.433547548 +0100 | |
3 | @@ -74,9 +74,9 @@ static void Place(vout_display_t *, vout | |
4 | ||
5 | /* */ | |
6 | struct vout_display_sys_t { | |
7 | - cucul_canvas_t *cv; | |
8 | + caca_canvas_t *cv; | |
9 | caca_display_t *dp; | |
10 | - cucul_dither_t *dither; | |
11 | + caca_dither_t *dither; | |
12 | ||
13 | picture_pool_t *pool; | |
14 | vout_display_event_thread_t *et; | |
15 | @@ -153,9 +153,9 @@ static int Open(vlc_object_t *object) | |
16 | if (!sys) | |
17 | goto error; | |
18 | ||
19 | - sys->cv = cucul_create_canvas(0, 0); | |
20 | + sys->cv = caca_create_canvas(0, 0); | |
21 | if (!sys->cv) { | |
22 | - msg_Err(vd, "cannot initialize libcucul"); | |
23 | + msg_Err(vd, "cannot initialize libcaca"); | |
24 | goto error; | |
25 | } | |
26 | ||
27 | @@ -209,11 +209,11 @@ error: | |
28 | if (sys->pool) | |
29 | picture_pool_Release(sys->pool); | |
30 | if (sys->dither) | |
31 | - cucul_free_dither(sys->dither); | |
32 | + caca_free_dither(sys->dither); | |
33 | if (sys->dp) | |
34 | caca_free_display(sys->dp); | |
35 | if (sys->cv) | |
36 | - cucul_free_canvas(sys->cv); | |
37 | + caca_free_canvas(sys->cv); | |
38 | ||
39 | free(sys); | |
40 | } | |
41 | @@ -235,9 +235,9 @@ static void Close(vlc_object_t *object) | |
42 | if (sys->pool) | |
43 | picture_pool_Release(sys->pool); | |
44 | if (sys->dither) | |
45 | - cucul_free_dither(sys->dither); | |
46 | + caca_free_dither(sys->dither); | |
47 | caca_free_display(sys->dp); | |
48 | - cucul_free_canvas(sys->cv); | |
49 | + caca_free_canvas(sys->cv); | |
50 | ||
51 | #if defined(_WIN32) | |
52 | FreeConsole(); | |
53 | @@ -266,7 +266,7 @@ static void Prepare(vout_display_t *vd, | |
54 | ||
55 | if (!sys->dither) { | |
56 | /* Create the libcaca dither object */ | |
57 | - sys->dither = cucul_create_dither(32, | |
58 | + sys->dither = caca_create_dither(32, | |
59 | vd->source.i_visible_width, | |
60 | vd->source.i_visible_height, | |
61 | picture->p[0].i_pitch, | |
62 | @@ -284,12 +284,12 @@ static void Prepare(vout_display_t *vd, | |
63 | vout_display_place_t place; | |
64 | Place(vd, &place); | |
65 | ||
66 | - cucul_set_color_ansi(sys->cv, CUCUL_COLOR_DEFAULT, CUCUL_COLOR_BLACK); | |
67 | - cucul_clear_canvas(sys->cv); | |
68 | + caca_set_color_ansi(sys->cv, CACA_DEFAULT, CACA_BLACK); | |
69 | + caca_clear_canvas(sys->cv); | |
70 | ||
71 | const int crop_offset = vd->source.i_y_offset * picture->p->i_pitch + | |
72 | vd->source.i_x_offset * picture->p->i_pixel_pitch; | |
73 | - cucul_dither_bitmap(sys->cv, place.x, place.y, | |
74 | + caca_dither_bitmap(sys->cv, place.x, place.y, | |
75 | place.width, place.height, | |
76 | sys->dither, | |
77 | &picture->p->p_pixels[crop_offset]); | |
78 | @@ -328,7 +328,7 @@ static int Control(vout_display_t *vd, i | |
79 | ||
80 | case VOUT_DISPLAY_CHANGE_SOURCE_CROP: | |
81 | if (sys->dither) | |
82 | - cucul_free_dither(sys->dither); | |
83 | + caca_free_dither(sys->dither); | |
84 | sys->dither = NULL; | |
85 | return VLC_SUCCESS; | |
86 | ||
87 | @@ -366,8 +366,8 @@ static void Place(vout_display_t *vd, vo | |
88 | ||
89 | vout_display_PlacePicture(place, &vd->source, vd->cfg, false); | |
90 | ||
91 | - const int canvas_width = cucul_get_canvas_width(sys->cv); | |
92 | - const int canvas_height = cucul_get_canvas_height(sys->cv); | |
93 | + const int canvas_width = caca_get_canvas_width(sys->cv); | |
94 | + const int canvas_height = caca_get_canvas_height(sys->cv); | |
95 | const int display_width = caca_get_display_width(sys->dp); | |
96 | const int display_height = caca_get_display_height(sys->dp); | |
97 |