Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
51406579
Commit
51406579
authored
Nov 08, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix path of audio thumb for monitor overlay
parent
da07c913
Pipeline
#10117
passed with stage
in 19 minutes and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/monitorproxy.cpp
View file @
51406579
...
...
@@ -310,7 +310,7 @@ void MonitorProxy::setClipProperties(ClipType::ProducerType type, bool hasAV, co
}
}
void
MonitorProxy
::
setAudioThumb
(
const
Q
String
thumbPath
)
void
MonitorProxy
::
setAudioThumb
(
const
Q
Url
thumbPath
)
{
m_audioThumb
=
thumbPath
;
emit
audioThumbChanged
();
...
...
src/monitor/monitorproxy.h
View file @
51406579
...
...
@@ -28,6 +28,7 @@
#include "definitions.h"
#include <QImage>
#include <QUrl>
#include <QObject>
class
GLWidget
;
...
...
@@ -42,7 +43,7 @@ class MonitorProxy : public QObject
Q_PROPERTY
(
int
zoneOut
READ
zoneOut
WRITE
setZoneOut
NOTIFY
zoneChanged
)
Q_PROPERTY
(
int
rulerHeight
READ
rulerHeight
NOTIFY
rulerHeightChanged
)
Q_PROPERTY
(
QString
markerComment
READ
markerComment
NOTIFY
markerCommentChanged
)
Q_PROPERTY
(
Q
String
audioThumb
MEMBER
m_audioThumb
NOTIFY
audioThumbChanged
)
Q_PROPERTY
(
Q
Url
audioThumb
MEMBER
m_audioThumb
NOTIFY
audioThumbChanged
)
Q_PROPERTY
(
int
overlayType
READ
overlayType
WRITE
setOverlayType
NOTIFY
overlayTypeChanged
)
/** @brief: Returns true if current clip in monitor has Audio and Video
* */
...
...
@@ -91,7 +92,7 @@ public:
Q_INVOKABLE
QString
toTimecode
(
int
frames
)
const
;
Q_INVOKABLE
double
fps
()
const
;
void
setClipProperties
(
ClipType
::
ProducerType
type
,
bool
hasAV
,
const
QString
clipName
);
void
setAudioThumb
(
const
Q
String
thumbPath
=
Q
String
());
void
setAudioThumb
(
const
Q
Url
thumbPath
=
Q
Url
());
signals:
void
positionChanged
();
...
...
@@ -121,7 +122,7 @@ private:
int
m_zoneIn
;
int
m_zoneOut
;
bool
m_hasAV
;
Q
String
m_audioThumb
;
Q
Url
m_audioThumb
;
QString
m_markerComment
;
QString
m_clipName
;
int
m_clipType
;
...
...
src/utils/thumbnailcache.cpp
View file @
51406579
...
...
@@ -134,16 +134,16 @@ QImage ThumbnailCache::getAudioThumbnail(const QString &binId, bool volatileOnly
return
QImage
();
}
const
Q
String
ThumbnailCache
::
getAudioThumbPath
(
const
QString
&
binId
)
const
const
Q
Url
ThumbnailCache
::
getAudioThumbPath
(
const
QString
&
binId
)
const
{
QMutexLocker
locker
(
&
m_mutex
);
bool
ok
=
false
;
auto
key
=
getAudioKey
(
binId
,
&
ok
);
QDir
thumbFolder
=
getDir
(
true
,
&
ok
);
if
(
ok
&&
thumbFolder
.
exists
(
key
))
{
return
Q
StringLiteral
(
"file://"
)
+
thumbFolder
.
absoluteFilePath
(
key
);
return
Q
Url
::
fromLocalFile
(
thumbFolder
.
absoluteFilePath
(
key
)
)
;
}
return
Q
String
();
return
Q
Url
();
}
QImage
ThumbnailCache
::
getThumbnail
(
const
QString
&
binId
,
int
pos
,
bool
volatileOnly
)
const
...
...
src/utils/thumbnailcache.hpp
View file @
51406579
...
...
@@ -23,6 +23,7 @@
#include "definitions.h"
#include <QDir>
#include <QUrl>
#include <QImage>
#include <QMutex>
#include <memory>
...
...
@@ -60,7 +61,7 @@ public:
*/
QImage
getThumbnail
(
const
QString
&
binId
,
int
pos
,
bool
volatileOnly
=
false
)
const
;
QImage
getAudioThumbnail
(
const
QString
&
binId
,
bool
volatileOnly
=
false
)
const
;
const
Q
String
getAudioThumbPath
(
const
QString
&
binId
)
const
;
const
Q
Url
getAudioThumbPath
(
const
QString
&
binId
)
const
;
/* @brief Get a given thumbnail from the cache
@param binId is the id of the queried clip
...
...
Write
Preview
Supports
Markdown
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