summaryrefslogtreecommitdiffstats
path: root/helper.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-07-28 07:46:16 +0200
committerArno <am@disconnect.de>2013-07-28 07:46:16 +0200
commitd6b178b1fdcdac519ded25e3f253d9eeffa84053 (patch)
treeba9a03e041fa72ccde37367ef07864884f0ced7b /helper.cpp
parent5cfaa2c755c52c2ccbdd88ea3239dafb120a179b (diff)
downloadSheMov-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.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/helper.cpp b/helper.cpp
index 1881102..3856bfc 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -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){