diff options
author | Arno <am@disconnect.de> | 2013-07-28 07:46:16 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-07-28 07:46:16 +0200 |
commit | d6b178b1fdcdac519ded25e3f253d9eeffa84053 (patch) | |
tree | ba9a03e041fa72ccde37367ef07864884f0ced7b /helper.cpp | |
parent | 5cfaa2c755c52c2ccbdd88ea3239dafb120a179b (diff) | |
download | SheMov-d6b178b1fdcdac519ded25e3f253d9eeffa84053.tar.gz SheMov-d6b178b1fdcdac519ded25e3f253d9eeffa84053.tar.bz2 SheMov-d6b178b1fdcdac519ded25e3f253d9eeffa84053.zip |
Implement file properties dialog
Show file properties in Filemanager and Archive, if the file is
available.
Also get rid of the palette stuff in SmGlobals. Just call setPalette()
early enough and set it in SmTreeView.
Diffstat (limited to 'helper.cpp')
-rw-r--r-- | helper.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -223,7 +223,6 @@ namespace Helper { QSettings s; QString ffProbe = s.value("paths/ffprobe").toString(); QStringList args; - QVariantMap retval; args << "-v" << "quiet" << "-print_format" << "json" << "-show_format" << path; QProcess ffproc; ffproc.start(ffProbe, args); @@ -236,6 +235,21 @@ namespace Helper { return jsDoc.object().value("format").toObject().toVariantMap(); } + QJsonDocument streamData(const QString &path){ + QSettings s; + QString ffProbe = s.value("paths/ffprobe").toString(); + QStringList args; + args << "-v" << "quiet" << "-print_format" << "json" << "-show_format" << "-show_streams" << path; + QProcess ffproc; + ffproc.start(ffProbe, args); + if(!ffproc.waitForStarted()){ + return QJsonDocument(); + } + ffproc.waitForFinished(); + QByteArray ffData = ffproc.readAllStandardOutput(); + return QJsonDocument::fromJson(ffData); + } + Duration::Duration() : mHours(0), mMinutes(0), mSeconds(0) {} Duration::Duration(qint64 seconds){ |