diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-05-15 22:47:07 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-05-15 22:47:07 +0000 |
commit | a3524029bf3681fccd8b221a24849794f30bd26d (patch) | |
tree | 4bc29dcdf8915071dd7aaa6a0604422549c4d0a2 /apps | |
parent | 3cec5e2b6a1039bb065d5f7bc8e9bc3dafe3f904 (diff) |
Accept FS #8994: add another recording filesplit option: stop recording and shutdown
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17531 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 18 | ||||
-rw-r--r-- | apps/lang/nederlands.lang | 18 | ||||
-rw-r--r-- | apps/lang/polski.lang | 18 | ||||
-rw-r--r-- | apps/recorder/recording.c | 16 | ||||
-rw-r--r-- | apps/recorder/recording.h | 3 | ||||
-rw-r--r-- | apps/settings_list.c | 4 |
6 files changed, 73 insertions, 4 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 3c2fae174d..2a087bb5cf 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -11696,3 +11696,21 @@ *: "OK" </voice> </phrase> +<phrase> + id: LANG_STOP_RECORDING_AND_SHUTDOWN + desc: in record timesplit options + user: + <source> + *: none + recording: "Stop Recording And Shutdown" + </source> + <dest> + *: none + recording: "Stop Recording And Shutdown" + </dest> + <voice> + *: none + recording: "Stop Recording And Shutdown" + </voice> +</phrase> +<phrase> diff --git a/apps/lang/nederlands.lang b/apps/lang/nederlands.lang index 9c2d94f595..4193ca8c25 100644 --- a/apps/lang/nederlands.lang +++ b/apps/lang/nederlands.lang @@ -11653,3 +11653,21 @@ *: "OK" </voice> </phrase> +<phrase> + id: LANG_STOP_RECORDING_AND_SHUTDOWN + desc: in record timesplit options + user: + <source> + *: none + recording: "Stop Recording And Shutdown" + </source> + <dest> + *: none + recording: "Stop opname en zet uit" + </dest> + <voice> + *: none + recording: "Stop opname en zet uit" + </voice> +</phrase> +<phrase> diff --git a/apps/lang/polski.lang b/apps/lang/polski.lang index 15f51a7409..cca01eadd5 100644 --- a/apps/lang/polski.lang +++ b/apps/lang/polski.lang @@ -11556,3 +11556,21 @@ swcodec: "Powtarzaj dźwięk klawiszy" </voice> </phrase> +<phrase> + id: LANG_STOP_RECORDING_AND_SHUTDOWN + desc: in record timesplit options + user: + <source> + *: none + recording: "Stop Recording And Shutdown" + </source> + <dest> + *: none + recording: "Zatrzymaj nagrywanie i wyłącz" + </dest> + <voice> + *: none + recording: "Zatrzymaj nagrywanie i wyłącz" + </voice> +</phrase> +<phrase> diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 6a2b9257d4..715a06d823 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -25,6 +25,7 @@ #include "system.h" #include "power.h" +#include "powermgmt.h" #include "lcd.h" #include "led.h" #include "mpeg.h" @@ -717,6 +718,12 @@ void rec_command(enum recording_command cmd) { switch(cmd) { + case RECORDING_CMD_STOP_SHUTDOWN: + pm_activate_clipcount(false); + audio_stop_recording(); + audio_close_recording(); + sys_poweroff(); + break; case RECORDING_CMD_STOP: pm_activate_clipcount(false); audio_stop_recording(); @@ -808,6 +815,10 @@ static void trigger_listener(int trigger_status) /* tell recording_screen to reset the time */ last_seconds = 0; break; + + case 3: /* Stop and shutdown */ + rec_command(RECORDING_CMD_STOP_SHUTDOWN); + break; } if (global_settings.rec_trigger_mode != TRIG_MODE_REARM) @@ -1571,7 +1582,10 @@ bool recording_screen(bool no_source) { peak_meter_trigger(false); peak_meter_set_trigger_listener(NULL); - rec_command(RECORDING_CMD_STOP); + if( global_settings.rec_split_type == 1) + rec_command(RECORDING_CMD_STOP); + else + rec_command(RECORDING_CMD_STOP_SHUTDOWN); } update_countdown = 1; } diff --git a/apps/recorder/recording.h b/apps/recorder/recording.h index a622f01d40..11d6e86e8c 100644 --- a/apps/recorder/recording.h +++ b/apps/recorder/recording.h @@ -49,7 +49,8 @@ enum recording_command start recording */ RECORDING_CMD_START_NEWFILE, /* create unique filename and start recording*/ RECORDING_CMD_PAUSE, - RECORDING_CMD_RESUME + RECORDING_CMD_RESUME, + RECORDING_CMD_STOP_SHUTDOWN /* stop recording and shutdown */ }; /* centralized way to start/stop/... recording */ diff --git a/apps/settings_list.c b/apps/settings_list.c index a08639996c..17ca714e76 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -844,8 +844,8 @@ const struct settings_list settings[] = { {F_T_INT|F_RECSETTING, &global_settings.rec_channels, LANG_CHANNELS, INT(0), "rec channels","stereo,mono",UNUSED}, CHOICE_SETTING(F_RECSETTING, rec_split_type, LANG_SPLIT_TYPE, 0, - "rec split type", "Split,Stop", NULL, 2, - ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING)), + "rec split type", "Split,Stop,Shutdown", NULL, 3, + ID2P(LANG_START_NEW_FILE), ID2P(LANG_STOP_RECORDING),ID2P(LANG_STOP_RECORDING_AND_SHUTDOWN)), CHOICE_SETTING(F_RECSETTING, rec_split_method, LANG_SPLIT_MEASURE, 0, "rec split method", "Time,Filesize", NULL, 2, ID2P(LANG_TIME), ID2P(LANG_REC_SIZE)), |