+ QFileDialog *qfd = new QFileDialog( NULL,
+ qtr( "Choose a filename to save playlist" ),
+ qfu( p_intf->p_libvlc->psz_homedir ),
+ qtr( "XSPF playlist (*.xspf);; " ) +
+ qtr( "M3U playlist (*.m3u);; Any (*.*) " ) );
+ qfd->setFileMode( QFileDialog::AnyFile );
+ qfd->setAcceptMode( QFileDialog::AcceptSave );
+ qfd->setConfirmOverwrite( true );
+
+ if( qfd->exec() == QDialog::Accepted )
+ {
+ if( qfd->selectedFiles().count() > 0 )
+ {
+ static const char psz_xspf[] = "export-xspf",
+ psz_m3u[] = "export-m3u";
+ const char *psz_module;
+
+ QString file = qfd->selectedFiles().first();
+ QString filter = qfd->selectedFilter();
+
+ if( file.contains( ".xsp" ) ||
+ ( filter.contains( ".xspf" ) && !file.contains( ".m3u" ) ) )
+ {
+ psz_module = psz_xspf;
+ if( !file.contains( ".xsp" ) )
+ file.append( ".xspf" );
+ }
+ else
+ {
+ psz_module = psz_m3u;
+ if( !file.contains( ".m3u" ) )
+ file.append( ".m3u" );
+ }
+
+ playlist_Export( THEPL, qtu( file ), THEPL->p_local_category,
+ psz_module);
+ }
+ }
+ delete qfd;
+}
+
+
+/****************************************************************************
+ * Sout emulation
+ ****************************************************************************/
+
+void DialogsProvider::streamingDialog( QString mrl, bool b_transcode_only )
+{
+ SoutDialog *s = new SoutDialog( p_intf->p_sys->p_mi, p_intf,
+ b_transcode_only );
+ if( s->exec() == QDialog::Accepted )
+ {
+ msg_Err( p_intf, "Sout mrl %s", qta( s->getMrl() ) );
+ /* Just do it */
+ int i_len = strlen( qtu( s->getMrl() ) ) + 10;
+ char *psz_option = (char*)malloc( i_len );
+ snprintf( psz_option, i_len - 1, "%s", qtu( s->getMrl() ) );
+
+ playlist_AddExt( THEPL, qtu( mrl ), "Streaming",
+ PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END,
+ -1, &psz_option, 1, VLC_TRUE, VLC_FALSE );
+ }
+ delete s;