|
@@ -406,44 +406,6 @@ static inline void fill_rectangle(SDL_Surface *screen,
|
|
|
SDL_FillRect(screen, &rect, color);
|
|
|
}
|
|
|
|
|
|
-#if 0
|
|
|
-/* draw only the border of a rectangle */
|
|
|
-void fill_border(VideoState *s, int x, int y, int w, int h, int color)
|
|
|
-{
|
|
|
- int w1, w2, h1, h2;
|
|
|
-
|
|
|
- /* fill the background */
|
|
|
- w1 = x;
|
|
|
- if (w1 < 0)
|
|
|
- w1 = 0;
|
|
|
- w2 = s->width - (x + w);
|
|
|
- if (w2 < 0)
|
|
|
- w2 = 0;
|
|
|
- h1 = y;
|
|
|
- if (h1 < 0)
|
|
|
- h1 = 0;
|
|
|
- h2 = s->height - (y + h);
|
|
|
- if (h2 < 0)
|
|
|
- h2 = 0;
|
|
|
- fill_rectangle(screen,
|
|
|
- s->xleft, s->ytop,
|
|
|
- w1, s->height,
|
|
|
- color);
|
|
|
- fill_rectangle(screen,
|
|
|
- s->xleft + s->width - w2, s->ytop,
|
|
|
- w2, s->height,
|
|
|
- color);
|
|
|
- fill_rectangle(screen,
|
|
|
- s->xleft + w1, s->ytop,
|
|
|
- s->width - w1 - w2, h1,
|
|
|
- color);
|
|
|
- fill_rectangle(screen,
|
|
|
- s->xleft + w1, s->ytop + s->height - h2,
|
|
|
- s->width - w1 - w2, h2,
|
|
|
- color);
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
#define ALPHA_BLEND(a, oldp, newp, s)\
|
|
|
((((oldp << s) * (255 - (a))) + (newp * (a))) / (255 << s))
|
|
|
|
|
@@ -743,23 +705,12 @@ static void video_image_display(VideoState *is)
|
|
|
}
|
|
|
x = (is->width - width) / 2;
|
|
|
y = (is->height - height) / 2;
|
|
|
- if (!is->no_background) {
|
|
|
- /* fill the background */
|
|
|
- // fill_border(is, x, y, width, height, QERGB(0x00, 0x00, 0x00));
|
|
|
- } else {
|
|
|
- is->no_background = 0;
|
|
|
- }
|
|
|
+ is->no_background = 0;
|
|
|
rect.x = is->xleft + x;
|
|
|
rect.y = is->ytop + y;
|
|
|
rect.w = FFMAX(width, 1);
|
|
|
rect.h = FFMAX(height, 1);
|
|
|
SDL_DisplayYUVOverlay(vp->bmp, &rect);
|
|
|
- } else {
|
|
|
-#if 0
|
|
|
- fill_rectangle(screen,
|
|
|
- is->xleft, is->ytop, is->width, is->height,
|
|
|
- QERGB(0x00, 0x00, 0x00));
|
|
|
-#endif
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1899,8 +1850,6 @@ static int subtitle_thread(void *arg)
|
|
|
len1 = avcodec_decode_subtitle2(is->subtitle_st->codec,
|
|
|
&sp->sub, &got_subtitle,
|
|
|
pkt);
|
|
|
-// if (len1 < 0)
|
|
|
-// break;
|
|
|
if (got_subtitle && sp->sub.format == 0) {
|
|
|
sp->pts = pts;
|
|
|
|
|
@@ -1924,9 +1873,6 @@ static int subtitle_thread(void *arg)
|
|
|
SDL_UnlockMutex(is->subpq_mutex);
|
|
|
}
|
|
|
av_free_packet(pkt);
|
|
|
-// if (step)
|
|
|
-// if (cur_stream)
|
|
|
-// stream_toggle_pause(cur_stream);
|
|
|
}
|
|
|
the_end:
|
|
|
return 0;
|
|
@@ -2254,8 +2200,6 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|
|
is->video_stream = stream_index;
|
|
|
is->video_st = ic->streams[stream_index];
|
|
|
|
|
|
-// is->video_current_pts_time = av_gettime();
|
|
|
-
|
|
|
packet_queue_init(&is->videoq);
|
|
|
is->video_tid = SDL_CreateThread(video_thread, is);
|
|
|
break;
|
|
@@ -2694,10 +2638,6 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
|
|
static void toggle_full_screen(void)
|
|
|
{
|
|
|
is_full_screen = !is_full_screen;
|
|
|
- if (!fs_screen_width) {
|
|
|
- /* use default SDL method */
|
|
|
-// SDL_WM_ToggleFullScreen(screen);
|
|
|
- }
|
|
|
video_open(cur_stream);
|
|
|
}
|
|
|
|