From 672c3f35c4e4a9222e74c36f96ca1ffb66636a46 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Fri, 22 Aug 2008 20:34:01 -0400 Subject: [PATCH] Implement 'record' button in Qt intf --- .../gui/qt4/components/interface_widgets.cpp | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index 1bf430a045..a26111ef55 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -440,7 +440,27 @@ void AdvControlsWidget::AtoBLoop( float f_pos, int i_time, int i_length ) } /* FIXME Record function */ -void AdvControlsWidget::record(){} +void AdvControlsWidget::record() +{ + input_thread_t *p_input = THEMIM->getInput(); + if( p_input ) + { + /* This method won't work fine if the stream can't be cut anywhere */ + if( var_Type( p_input, "record-toggle" ) == VLC_VAR_VOID ) + var_TriggerCallback( p_input, "record-toggle" ); + else + { + /* 'record' access-filter is not loaded, we open Save dialog */ + input_item_t *p_item = input_GetItem( p_input ); + if( !p_item ) + return; + + char *psz = input_item_GetURI( p_item ); + if( psz ) + THEDP->streamingDialog( NULL, psz, true ); + } + } +} #if 0 //FIXME Frame by frame function -- 2.39.2