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
This commit is contained in:
Peter D'Hoye 2008-05-15 22:47:07 +00:00
parent 3cec5e2b6a
commit a3524029bf
6 changed files with 73 additions and 4 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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;
}

View file

@ -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 */

View file

@ -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)),