diff --git a/src/shell-recorder.c b/src/shell-recorder.c index 449590caf..aaf585b15 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -1708,6 +1708,7 @@ shell_recorder_set_pipeline (ShellRecorder *recorder, /** * shell_recorder_record: * @recorder: the #ShellRecorder + * @filename_used: (out) (allow-none): actual filename used for recording * * Starts recording, Starting the recording may fail if the output file * cannot be opened, or if the output stream cannot be created @@ -1724,7 +1725,8 @@ shell_recorder_set_pipeline (ShellRecorder *recorder, * Return value: %TRUE if recording was succesfully started */ gboolean -shell_recorder_record (ShellRecorder *recorder) +shell_recorder_record (ShellRecorder *recorder, + char **filename_used) { g_return_val_if_fail (SHELL_IS_RECORDER (recorder), FALSE); g_return_val_if_fail (recorder->stage != NULL, FALSE); @@ -1733,6 +1735,9 @@ shell_recorder_record (ShellRecorder *recorder) if (!recorder_open_pipeline (recorder)) return FALSE; + if (filename_used) + *filename_used = g_strdup (recorder->current_pipeline->filename); + recorder_connect_stage_callbacks (recorder); recorder->start_time = get_wall_time(); diff --git a/src/shell-recorder.h b/src/shell-recorder.h index 9bff65774..a94d59c8f 100644 --- a/src/shell-recorder.h +++ b/src/shell-recorder.h @@ -36,7 +36,8 @@ void shell_recorder_set_file_template (ShellRecorder *recorder, const char *file_template); void shell_recorder_set_pipeline (ShellRecorder *recorder, const char *pipeline); -gboolean shell_recorder_record (ShellRecorder *recorder); +gboolean shell_recorder_record (ShellRecorder *recorder, + char **filename_used); void shell_recorder_close (ShellRecorder *recorder); void shell_recorder_pause (ShellRecorder *recorder); gboolean shell_recorder_is_recording (ShellRecorder *recorder); diff --git a/src/test-recorder.c b/src/test-recorder.c index 66f8baf0f..86f937942 100644 --- a/src/test-recorder.c +++ b/src/test-recorder.c @@ -48,7 +48,7 @@ on_stage_realized (ClutterActor *stage, { recorder = shell_recorder_new (CLUTTER_STAGE (stage)); shell_recorder_set_file_template (recorder, "test-recorder.webm"); - shell_recorder_record (recorder); + shell_recorder_record (recorder, NULL); } int main (int argc, char **argv)