summaryrefslogtreecommitdiffstats
path: root/tools/qmlviewer/main.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-05-05 07:44:43 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-05-05 07:44:43 (GMT)
commit089f01e07cea648bc56a6b825d70a54abfe15fd3 (patch)
tree96292c6d5681e6e541c9202f17eb9e3cbca4e264 /tools/qmlviewer/main.cpp
parentfab8fa152901cb84132f11b52f950c0dbb6d7a23 (diff)
downloadQt-089f01e07cea648bc56a6b825d70a54abfe15fd3.zip
Qt-089f01e07cea648bc56a6b825d70a54abfe15fd3.tar.gz
Qt-089f01e07cea648bc56a6b825d70a54abfe15fd3.tar.bz2
ffmpeg support
still image based for now, streaming next
Diffstat (limited to 'tools/qmlviewer/main.cpp')
-rw-r--r--tools/qmlviewer/main.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index c5676ab..26ff213 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -27,11 +27,15 @@ void usage()
qWarning(" -v, -version ............................. display version");
qWarning(" -frameless ............................... run with no window frame");
qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
- qWarning(" -recorddither ordered|threshold|floyd .... set dither mode used for recording");
+ qWarning(" -recordfile <output> ..................... set output file");
+ qWarning(" - ImageMagick 'convert' for GIF)");
+ qWarning(" - png file for raw frames");
+ qWarning(" - 'ffmpeg' for other formats");
+ qWarning(" -recorddither ordered|threshold|floyd .... set GIF dither recording mode");
qWarning(" -recordperiod <milliseconds> ............. set time between recording frames");
- qWarning(" -autorecord [from-]<tomilliseconds> ...... set recording to start and stop automatically");
+ qWarning(" -autorecord [from-]<tomilliseconds> ...... set recording to start and stop");
qWarning(" -devicekeys .............................. use numeric keys (see F1)");
- qWarning(" -cache ................................... enable a disk cache of remote content");
+ qWarning(" -cache ................................... disk cache remote content");
qWarning(" -recordtest <directory> .................. record an autotest");
qWarning(" -runtest <directory> ..................... run a previously recorded test");
qWarning(" ");
@@ -66,7 +70,8 @@ int main(int argc, char ** argv)
int period = 0;
int autorecord_from = 0;
int autorecord_to = 0;
- QString dither = "threshold";
+ QString dither = "none";
+ QString recordfile = "animation.gif";
QString skin;
bool devkeys = false;
bool cache = false;
@@ -83,6 +88,10 @@ int main(int argc, char ** argv)
cache = true;
} else if (arg == "-recordperiod") {
period = QString(argv[++i]).toInt();
+ } else if (arg == "-recordfile") {
+ recordfile = QString(argv[++i]);
+ } else if (arg == "-recorddither") {
+ dither = QString(argv[++i]);
} else if (arg == "-autorecord") {
QString range = QString(argv[++i]);
int dash = range.indexOf('-');
@@ -119,6 +128,7 @@ int main(int argc, char ** argv)
QmlViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget);
viewer.setCacheEnabled(cache);
viewer.openQml(fileName);
+ viewer.setRecordFile(recordfile);
if (period>0)
viewer.setRecordPeriod(period);
if (autorecord_to)