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"
+
+ id: LANG_STOP_RECORDING_AND_SHUTDOWN
+ desc: in record timesplit options
+ user:
+
+
+ *: none
+ recording: "Stop Recording And Shutdown"
+
+
+ *: none
+ recording: "Stop Recording And Shutdown"
+
+
+
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"
+
+ id: LANG_STOP_RECORDING_AND_SHUTDOWN
+ desc: in record timesplit options
+ user:
+
+
+ *: none
+ recording: "Stop opname en zet uit"
+
+
+ *: none
+ recording: "Stop opname en zet uit"
+
+
+
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"
+
+ id: LANG_STOP_RECORDING_AND_SHUTDOWN
+ desc: in record timesplit options
+ user:
+
+
+ *: none
+ recording: "Zatrzymaj nagrywanie i wyłącz"
+
+
+ *: none
+ recording: "Zatrzymaj nagrywanie i wyłącz"
+
+
+
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)),