diff options
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
-rw-r--r-- | apps/plugins/mpegplayer/stream_mgr.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c index 8d2e42f62b..c473db3ce3 100644 --- a/apps/plugins/mpegplayer/stream_mgr.c +++ b/apps/plugins/mpegplayer/stream_mgr.c | |||
@@ -20,7 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "plugin.h" | 21 | #include "plugin.h" |
22 | #include "mpegplayer.h" | 22 | #include "mpegplayer.h" |
23 | #include "gray.h" | 23 | #include "grey.h" |
24 | #include "mpeg_settings.h" | 24 | #include "mpeg_settings.h" |
25 | 25 | ||
26 | static struct event_queue stream_mgr_queue NOCACHEBSS_ATTR; | 26 | static struct event_queue stream_mgr_queue NOCACHEBSS_ATTR; |
@@ -712,7 +712,7 @@ bool stream_show_vo(bool show) | |||
712 | GRAY_VIDEO_INVALIDATE_ICACHE(); | 712 | GRAY_VIDEO_INVALIDATE_ICACHE(); |
713 | GRAY_INVALIDATE_ICACHE(); | 713 | GRAY_INVALIDATE_ICACHE(); |
714 | 714 | ||
715 | gray_show(show); | 715 | grey_show(show); |
716 | 716 | ||
717 | GRAY_FLUSH_ICACHE(); | 717 | GRAY_FLUSH_ICACHE(); |
718 | #endif | 718 | #endif |
@@ -801,11 +801,10 @@ bool stream_set_gray_rect(const struct vo_rect *rc) | |||
801 | 801 | ||
802 | vo_lock(); | 802 | vo_lock(); |
803 | 803 | ||
804 | gray_init(rb, stream_mgr.graymem, stream_mgr.graysize, | 804 | grey_init(rb, stream_mgr.graymem, stream_mgr.graysize, false, |
805 | false, rc_gray.r - rc_gray.l, rc_gray.b - rc_gray.t, | 805 | rc_gray.r - rc_gray.l, rc_gray.b - rc_gray.t, NULL); |
806 | 32, 2<<8, NULL); | ||
807 | 806 | ||
808 | gray_set_position(rc_gray.l, rc_gray.t); | 807 | grey_set_position(rc_gray.l, rc_gray.t); |
809 | 808 | ||
810 | vo_unlock(); | 809 | vo_unlock(); |
811 | 810 | ||
@@ -818,7 +817,7 @@ bool stream_set_gray_rect(const struct vo_rect *rc) | |||
818 | 817 | ||
819 | if (vis) | 818 | if (vis) |
820 | { | 819 | { |
821 | gray_show(true); | 820 | grey_show(true); |
822 | parser_send_video_msg(VIDEO_DISPLAY_SHOW, true); | 821 | parser_send_video_msg(VIDEO_DISPLAY_SHOW, true); |
823 | } | 822 | } |
824 | } | 823 | } |
@@ -836,7 +835,7 @@ void stream_gray_show(bool show) | |||
836 | GRAY_VIDEO_INVALIDATE_ICACHE(); | 835 | GRAY_VIDEO_INVALIDATE_ICACHE(); |
837 | GRAY_INVALIDATE_ICACHE(); | 836 | GRAY_INVALIDATE_ICACHE(); |
838 | 837 | ||
839 | gray_show(show); | 838 | grey_show(show); |
840 | 839 | ||
841 | GRAY_FLUSH_ICACHE(); | 840 | GRAY_FLUSH_ICACHE(); |
842 | 841 | ||
@@ -1095,16 +1094,14 @@ int stream_init(void) | |||
1095 | 1094 | ||
1096 | /* Initialize non-allocator blocks first */ | 1095 | /* Initialize non-allocator blocks first */ |
1097 | #ifndef HAVE_LCD_COLOR | 1096 | #ifndef HAVE_LCD_COLOR |
1098 | int grayscales; | 1097 | bool success; |
1099 | 1098 | ||
1100 | /* This can run on another processor - align data */ | 1099 | /* This can run on another processor - align data */ |
1101 | memsize = CACHEALIGN_BUFFER(&mem, memsize); | 1100 | memsize = CACHEALIGN_BUFFER(&mem, memsize); |
1102 | stream_mgr.graymem = mem; | 1101 | stream_mgr.graymem = mem; |
1103 | 1102 | ||
1104 | /* initialize the grayscale buffer: 32 bitplanes for 33 shades of gray. */ | 1103 | success = grey_init(rb, mem, memsize, false, LCD_WIDTH, |
1105 | grayscales = gray_init(rb, mem, memsize, false, | 1104 | LCD_HEIGHT, &stream_mgr.graysize); |
1106 | LCD_WIDTH, LCD_HEIGHT, | ||
1107 | 32, 2<<8, &stream_mgr.graysize) + 1; | ||
1108 | 1105 | ||
1109 | /* This can run on another processor - align size */ | 1106 | /* This can run on another processor - align size */ |
1110 | stream_mgr.graysize = CACHEALIGN_UP(stream_mgr.graysize); | 1107 | stream_mgr.graysize = CACHEALIGN_UP(stream_mgr.graysize); |
@@ -1112,9 +1109,9 @@ int stream_init(void) | |||
1112 | mem += stream_mgr.graysize; | 1109 | mem += stream_mgr.graysize; |
1113 | memsize -= stream_mgr.graysize; | 1110 | memsize -= stream_mgr.graysize; |
1114 | 1111 | ||
1115 | if (grayscales < 33 || (ssize_t)memsize <= 0) | 1112 | if (!success || (ssize_t)memsize <= 0) |
1116 | { | 1113 | { |
1117 | rb->splash(HZ, "graylib init failed!"); | 1114 | rb->splash(HZ, "greylib init failed!"); |
1118 | stream_mgr.graymem = NULL; | 1115 | stream_mgr.graymem = NULL; |
1119 | return STREAM_ERROR; | 1116 | return STREAM_ERROR; |
1120 | } | 1117 | } |
@@ -1188,6 +1185,6 @@ void stream_exit(void) | |||
1188 | 1185 | ||
1189 | #ifndef HAVE_LCD_COLOR | 1186 | #ifndef HAVE_LCD_COLOR |
1190 | if (stream_mgr.graymem != NULL) | 1187 | if (stream_mgr.graymem != NULL) |
1191 | gray_release(); | 1188 | grey_release(); |
1192 | #endif | 1189 | #endif |
1193 | } | 1190 | } |