[vlc-devel] commit: Implement 'record' button in Qt intf (Jean-Philippe Andre )
git version control
git at videolan.org
Sat Aug 23 02:33:09 CEST 2008
vlc | branch: master | Jean-Philippe Andre <jpeg at via.ecp.fr> | Fri Aug 22 20:34:01 2008 -0400| [672c3f35c4e4a9222e74c36f96ca1ffb66636a46] | committer: Jean-Philippe Andre
Implement 'record' button in Qt intf
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=672c3f35c4e4a9222e74c36f96ca1ffb66636a46
---
modules/gui/qt4/components/interface_widgets.cpp | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 1bf430a..a26111e 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
More information about the vlc-devel
mailing list