mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
ffplay: Remove disabled code.
This commit is contained in:
parent
e169428529
commit
6c6c976fa9
66
ffplay.c
66
ffplay.c
@ -407,44 +407,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))
|
||||
|
||||
@ -747,23 +709,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 = width;
|
||||
rect.h = height;
|
||||
SDL_DisplayYUVOverlay(vp->bmp, &rect);
|
||||
} else {
|
||||
#if 0
|
||||
fill_rectangle(screen,
|
||||
is->xleft, is->ytop, is->width, is->height,
|
||||
QERGB(0x00, 0x00, 0x00));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1503,10 +1454,6 @@ static int output_picture2(VideoState *is, AVFrame *src_frame, double pts1, int6
|
||||
frame_delay += src_frame->repeat_pict * (frame_delay * 0.5);
|
||||
is->video_clock += frame_delay;
|
||||
|
||||
#if defined(DEBUG_SYNC) && 0
|
||||
printf("frame_type=%c clock=%0.3f pts=%0.3f\n",
|
||||
av_get_picture_type_char(src_frame->pict_type), pts, pts1);
|
||||
#endif
|
||||
return queue_picture(is, src_frame, pts, pos);
|
||||
}
|
||||
|
||||
@ -1920,8 +1867,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;
|
||||
|
||||
@ -1945,9 +1890,6 @@ static int subtitle_thread(void *arg)
|
||||
SDL_UnlockMutex(is->subpq_mutex);
|
||||
}
|
||||
av_free_packet(pkt);
|
||||
// if (step)
|
||||
// if (cur_stream)
|
||||
// stream_pause(cur_stream);
|
||||
}
|
||||
the_end:
|
||||
return 0;
|
||||
@ -2270,8 +2212,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;
|
||||
@ -2718,10 +2658,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user