Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
luyikei
VLMC
Commits
86f08902
Commit
86f08902
authored
Jan 22, 2010
by
Geoffroy Lacarriere
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the export menu
parent
0b3eb5bc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
393 additions
and
20 deletions
+393
-20
src/CMakeLists.txt
src/CMakeLists.txt
+5
-1
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+18
-13
src/Gui/export/Export.cpp
src/Gui/export/Export.cpp
+148
-0
src/Gui/export/Export.h
src/Gui/export/Export.h
+73
-0
src/Gui/export/ui/Export.ui
src/Gui/export/ui/Export.ui
+135
-0
src/Gui/import/ImportController.cpp
src/Gui/import/ImportController.cpp
+1
-1
src/Renderer/WorkflowFileRenderer.cpp
src/Renderer/WorkflowFileRenderer.cpp
+9
-5
src/Renderer/WorkflowFileRenderer.h
src/Renderer/WorkflowFileRenderer.h
+4
-0
No files found.
src/CMakeLists.txt
View file @
86f08902
...
...
@@ -43,6 +43,7 @@ SET(VLMC_SRCS
Gui/import/ImportController.cpp
Gui/import/ImportMediaCellView.cpp
Gui/import/ImportMediaListController.cpp
Gui/export/Export.cpp
Gui/library/ClipListViewController.cpp
Gui/library/ListViewController.cpp
Gui/library/MediaCellView.cpp
...
...
@@ -118,7 +119,8 @@ SET (VLMC_HDRS
Gui/FileInfoListModel.h
Gui/import/ImportController.h
Gui/import/ImportMediaCellView.h
Gui/import/ImportMediaListController.h
Gui/import/ImportMediaListController.h
Gui/export/Export.h
Gui/LanguagePreferences.h
Gui/LCDTimecode.h
Gui/library/ClipListViewController.h
...
...
@@ -183,6 +185,7 @@ SET (VLMC_HDRS
SET
(
VLMC_UIS
Gui/import/ui/ImportController.ui
Gui/export/ui/Export.ui
Gui/library/StackViewNavController.ui
Gui/library/ui/MediaCellView.ui
Gui/library/ui/StackViewNavController.ui
...
...
@@ -227,6 +230,7 @@ INCLUDE_DIRECTORIES(
EffectsEngine/PluginsAPI
Gui
Gui/import
Gui/export
Gui/library
Gui/settings
Gui/timeline
...
...
src/Gui/MainWindow.cpp
View file @
86f08902
...
...
@@ -51,6 +51,7 @@
#include "timeline/Timeline.h"
#include "timeline/TracksView.h"
#include "ImportController.h"
#include "Export.h"
/* Settings / Preferences */
#include "ProjectManager.h"
...
...
@@ -371,19 +372,23 @@ void MainWindow::on_actionRender_triggered()
QMessageBox
::
warning
(
NULL
,
"VLMC Renderer"
,
"There is nothing to render."
);
return
;
}
QString
outputFileName
=
QFileDialog
::
getSaveFileName
(
NULL
,
"Enter the output file name"
,
QDir
::
currentPath
(),
"Videos(*.avi *.mpg)"
);
if
(
outputFileName
.
length
()
==
0
)
return
;
else
{
if
(
m_renderer
)
delete
m_renderer
;
m_renderer
=
new
WorkflowFileRenderer
(
outputFileName
);
m_renderer
->
initializeRenderer
();
m_renderer
->
run
();
}
Export
*
exportMenu
=
new
Export
();
exportMenu
->
exec
();
delete
exportMenu
;
// QString outputFileName =
// QFileDialog::getSaveFileName( NULL, "Enter the output file name",
// QDir::currentPath(), "Videos(*.avi *.mpg)" );
// if ( outputFileName.length() == 0 )
// return ;
// else
// {
// if ( m_renderer )
// delete m_renderer;
// m_renderer = new WorkflowFileRenderer( outputFileName );
// m_renderer->initializeRenderer();
// m_renderer->run();
// }
}
void
MainWindow
::
on_actionNew_Project_triggered
()
...
...
src/Gui/export/Export.cpp
0 → 100644
View file @
86f08902
/*****************************************************************************
* Export.cpp: Export menu
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "ui_Export.h"
#include "Export.h"
#include "WorkflowFileRenderer.h"
#include <QDialogButtonBox>
#include <QDebug>
#include <QFileDialog>
Export
::
Export
(
QWidget
*
parent
)
:
QDialog
(
parent
),
m_ui
(
new
Ui
::
Export
),
m_renderer
(
NULL
)
{
m_ui
->
setupUi
(
this
);
m_ui
->
buttonBox
->
addButton
(
tr
(
"Export"
),
QDialogButtonBox
::
AcceptRole
);
connect
(
m_ui
->
listWidget
,
SIGNAL
(
currentRowChanged
(
int
)
),
this
,
SLOT
(
onIndexChanged
(
int
)
)
);
}
Export
::~
Export
()
{
delete
m_ui
;
delete
m_renderer
;
}
void
Export
::
accept
()
{
QString
outputFileName
=
QFileDialog
::
getSaveFileName
(
NULL
,
"Enter the output file name"
,
QDir
::
currentPath
(),
"Videos(*.avi *.mpg)"
);
if
(
outputFileName
.
length
()
==
0
||
m_exportParam
.
isEmpty
()
)
done
(
Rejected
);
else
{
if
(
m_renderer
)
delete
m_renderer
;
m_exportParam
+=
outputFileName
+
"
\"
}"
;
m_renderer
=
new
WorkflowFileRenderer
(
outputFileName
);
m_renderer
->
setParam
(
m_exportParam
);
m_renderer
->
initializeRenderer
();
m_renderer
->
run
();
}
done
(
Accepted
);
}
void
Export
::
reject
()
{
done
(
Rejected
);
}
void
Export
::
onIndexChanged
(
int
index
)
{
QString
vcodec
,
vb
(
"800"
),
acodec
,
ab
(
"128"
);
switch
(
m_ui
->
listWidget
->
currentRow
()
)
{
case
Video_H264_AAC
:
vcodec
=
"h264"
;
acodec
=
"a52"
;
break
;
case
Video_Dirac_AAC
:
vcodec
=
"drac"
;
acodec
=
"a52"
;
break
;
case
Video_Theora_Vorbis
:
vcodec
=
"theo"
;
acodec
=
"vorb"
;
break
;
case
Video_Theora_Flac
:
vcodec
=
"theo"
;
acodec
=
"flac"
;
break
;
case
Video_MPEG4_AAC
:
vcodec
=
"mp4v"
;
acodec
=
"a52 "
;
break
;
case
Video_MPEG2_MPGA
:
vcodec
=
"mpgv"
;
acodec
=
"mpga"
;
break
;
case
Video_WMV_WMA
:
vcodec
=
"wmv3"
;
acodec
=
"wma2"
;
break
;
case
Audio_Vorbis
:
vcodec
=
""
;
acodec
=
"vorb"
;
break
;
case
Audio_MP3
:
vcodec
=
""
;
acodec
=
"mp3"
;
break
;
case
Audio_AAC
:
vcodec
=
""
;
acodec
=
"a52"
;
break
;
case
Audio_FLAC
:
vcodec
=
""
;
acodec
=
"flac"
;
break
;
default:
return
;
}
m_exportParam
=
":sout=#transcode{vcodec="
+
vcodec
+
",vb="
+
vb
+
",acodec="
+
acodec
+
",ab="
+
ab
+
",no-hurry-up}"
":standard{access=file,mux=ps,dst=
\"
"
;
}
void
Export
::
changeEvent
(
QEvent
*
e
)
{
QDialog
::
changeEvent
(
e
);
switch
(
e
->
type
()
)
{
case
QEvent
::
LanguageChange
:
m_ui
->
retranslateUi
(
this
);
break
;
default:
break
;
}
}
src/Gui/export/Export.h
0 → 100644
View file @
86f08902
/*****************************************************************************
* Export.h: Export menu
*****************************************************************************
* Copyright (C) 2008-2009 the VLMC team
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef EXPORT_H
#define EXPORT_H
#include <QDialog>
#include <QListWidgetItem>
class
WorkflowFileRenderer
;
namespace
Ui
{
class
Export
;
}
enum
Profile
{
Video_H264_AAC
,
Video_Dirac_AAC
,
Video_Theora_Vorbis
,
Video_Theora_Flac
,
Video_MPEG4_AAC
,
Video_MPEG2_MPGA
,
Video_WMV_WMA
,
Audio_Vorbis
,
Audio_MP3
,
Audio_AAC
,
Audio_FLAC
};
class
Export
:
public
QDialog
{
Q_OBJECT
public:
Export
(
QWidget
*
parent
=
0
);
~
Export
();
const
QString
&
exportParam
()
const
{
return
m_exportParam
;
}
protected:
void
changeEvent
(
QEvent
*
e
);
void
accept
();
void
reject
();
private:
Ui
::
Export
*
m_ui
;
QString
m_exportParam
;
WorkflowFileRenderer
*
m_renderer
;
public
slots
:
void
onIndexChanged
(
int
index
);
};
#endif // EXPORT_H
src/Gui/export/ui/Export.ui
0 → 100644
View file @
86f08902
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
Export
</class>
<widget
class=
"QDialog"
name=
"Export"
>
<property
name=
"windowModality"
>
<enum>
Qt::WindowModal
</enum>
</property>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
398
</width>
<height>
284
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Export
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::Cancel
</set>
</property>
</widget>
</item>
<item
row=
"0"
column=
"0"
rowspan=
"2"
colspan=
"2"
>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"title"
>
<string>
Profile
</string>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QListWidget"
name=
"listWidget"
>
<item>
<property
name=
"text"
>
<string>
Video_H264_AAC
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_Dirac_AAC
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_Theora_Vorbis
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_Theora_Flac
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_MPEG4_AAC
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_MPEG2_MPGA
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Video_WMV_WMA
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Audio_Vorbis
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Audio_MP3
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Audio_AAC
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
Audio_FLAC
</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>
buttonBox
</sender>
<signal>
accepted()
</signal>
<receiver>
Export
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
248
</x>
<y>
254
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
157
</x>
<y>
274
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
buttonBox
</sender>
<signal>
rejected()
</signal>
<receiver>
Export
</receiver>
<slot>
reject()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
316
</x>
<y>
260
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
286
</x>
<y>
274
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
src/Gui/import/ImportController.cpp
View file @
86f08902
...
...
@@ -282,7 +282,7 @@ ImportController::reject()
m_mediaListController
->
cleanAll
();
Library
::
getInstance
()
->
deleteTemporaryMedias
();
collapseAllButCurrentPath
();
done
(
Rejected
);
}
void
...
...
src/Renderer/WorkflowFileRenderer.cpp
View file @
86f08902
...
...
@@ -55,11 +55,15 @@ void WorkflowFileRenderer::run()
m_outputFps
=
SettingsManager
::
getInstance
()
->
getValue
(
"VLMC"
,
"VLMCOutPutFPS"
)
->
get
().
toDouble
();
//Media as already been created an mainly initialized by the WorkflowRenderer
QString
transcodeStr
=
":sout=#transcode{vcodec=h264,vb=800,acodec=a52,ab=128,no-hurry-up}"
":standard{access=file,mux=ps,dst=
\"
"
+
m_outputFileName
+
"
\"
}"
;
m_media
->
addOption
(
transcodeStr
.
toStdString
().
c_str
()
);
if
(
m_transcodeStr
.
isEmpty
()
)
{
QString
transcodeStr
=
":sout=#transcode{vcodec=h264,vb=800,acodec=a52,ab=128,no-hurry-up}"
":standard{access=file,mux=ps,dst=
\"
"
+
m_outputFileName
+
"
\"
}"
;
m_media
->
addOption
(
transcodeStr
.
toStdString
().
c_str
()
);
}
else
m_media
->
addOption
(
m_transcodeStr
.
toStdString
().
c_str
()
);
// sprintf( buffer, ":sout-transcode-fps=%f", m_outputFps );
// m_media->addOption( buffer );
...
...
src/Renderer/WorkflowFileRenderer.h
View file @
86f08902
...
...
@@ -45,11 +45,15 @@ public:
void
run
();
virtual
float
getFps
()
const
;
void
setParam
(
QString
param
)
{
m_transcodeStr
=
param
;
}
private:
const
QString
m_outputFileName
;
WorkflowFileRendererDialog
*
m_dialog
;
QImage
*
m_image
;
QTime
m_time
;
QString
m_transcodeStr
;
protected:
virtual
void
*
getLockCallback
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment