#define HAVE_AV_CONFIG_H
#include "avformat.h"
+#include "version.h"
#include "cmdutils.h"
#include <SDL.h>
codec = avcodec_find_decoder(enc->codec_id);
enc->debug_mv = debug_mv;
enc->debug = debug;
- if(debug)
- av_log_set_level(AV_LOG_DEBUG);
enc->workaround_bugs = workaround_bugs;
enc->lowres = lowres;
if(lowres) enc->flags |= CODEC_FLAG_EMU_EDGE;
}
}
-void dump_stream_info(AVFormatContext *s)
+static void dump_stream_info(const AVFormatContext *s)
{
if (s->track != 0)
fprintf(stderr, "Track: %d\n", s->track);
SDL_DestroyMutex(is->video_decoder_mutex);
}
-void stream_cycle_channel(VideoState *is, int codec_type)
+static void stream_cycle_channel(VideoState *is, int codec_type)
{
AVFormatContext *ic = is->ic;
int start_index, stream_index;
}
-void toggle_full_screen(void)
+static void toggle_full_screen(void)
{
int w, h, flags;
is_full_screen = !is_full_screen;
- flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
- if (is_full_screen) {
- w = fs_screen_width;
- h = fs_screen_height;
- flags |= SDL_FULLSCREEN;
+ if (!fs_screen_width) {
+ /* use default SDL method */
+ SDL_WM_ToggleFullScreen(screen);
} else {
- w = screen_width;
- h = screen_height;
- flags |= SDL_RESIZABLE;
+ /* use the recorded resolution */
+ flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
+ if (is_full_screen) {
+ w = fs_screen_width;
+ h = fs_screen_height;
+ flags |= SDL_FULLSCREEN;
+ } else {
+ w = screen_width;
+ h = screen_height;
+ flags |= SDL_RESIZABLE;
+ }
+ screen = SDL_SetVideoMode(w, h, 0, flags);
+ cur_stream->width = w;
+ cur_stream->height = h;
}
- screen = SDL_SetVideoMode(w, h, 0, flags);
- cur_stream->width = w;
- cur_stream->height = h;
}
-void toggle_pause(void)
+static void toggle_pause(void)
{
if (cur_stream)
stream_pause(cur_stream);
step = 0;
}
-void step_to_next_frame(void)
+static void step_to_next_frame(void)
{
if (cur_stream) {
if (cur_stream->paused)
step = 1;
}
-void do_exit(void)
+static void do_exit(void)
{
if (cur_stream) {
stream_close(cur_stream);
exit(0);
}
-void toggle_audio_display(void)
+static void toggle_audio_display(void)
{
if (cur_stream) {
cur_stream->show_audio = !cur_stream->show_audio;
}
/* handle an event sent by the GUI */
-void event_loop(void)
+static void event_loop(void)
{
SDL_Event event;
double incr, pos, frac;
static void opt_debug(const char *arg)
{
+ av_log_set_level(atoi(arg));
debug = atoi(arg);
}
}
if (!display_disable) {
+#ifdef HAVE_SDL_VIDEO_SIZE
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
fs_screen_width = vi->current_w;
fs_screen_height = vi->current_h;
-
+#endif
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
if (is_full_screen && fs_screen_width) {
w = fs_screen_width;