Skip to content

Commit

Permalink
cp: update video input settings when loading a performance file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Nov 25, 2011
1 parent 9f4a0b5 commit 1047f8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/gui/cp.c
Expand Up @@ -72,6 +72,7 @@ static void on_config_change()
/* reload config for controls that need modification of some state */
load_audio_config();
load_dmx_config();
load_videoin_config();
}

static void loadok_callback(void *arg)
Expand Down
6 changes: 3 additions & 3 deletions src/gui/videoin.c
Expand Up @@ -114,7 +114,7 @@ static void format_callback(mtk_event *e, void *arg)
set_format((int)arg);
}

static void load_config()
void load_videoin_config()
{
set_format(config_read_int("vin_format", VIDEO_FORMAT_CVBS6));

Expand Down Expand Up @@ -187,7 +187,7 @@ static void close_videoin_window()
{
input_delete_callback(preview_update);
mtk_cmd(appid, "w.close()");
load_config();
load_videoin_config();
close(video_fd);
w_open = 0;
resmgr_release(RESOURCE_VIDEOIN);
Expand Down Expand Up @@ -323,7 +323,7 @@ void open_videoin_window()
}

w_open = 1;
load_config();
load_videoin_config();
next_update = rtems_clock_get_ticks_since_boot() + UPDATE_PERIOD;
input_add_callback(preview_update);
mtk_cmd(appid, "w.open()");
Expand Down
3 changes: 2 additions & 1 deletion src/gui/videoin.h
@@ -1,6 +1,6 @@
/*
* Flickernoise
* Copyright (C) 2010 Sebastien Bourdeauducq
* Copyright (C) 2010, 2011 Sebastien Bourdeauducq
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -20,5 +20,6 @@

void init_videoin();
void open_videoin_window();
void load_videoin_config();

#endif /* __VIDEOIN_H */

0 comments on commit 1047f8b

Please sign in to comment.