From d6b178b1fdcdac519ded25e3f253d9eeffa84053 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 28 Jul 2013 07:46:16 +0200 Subject: 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. --- helper.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'helper.cpp') 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){ -- cgit v1.2.3-70-g09d2