Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
46cadb56
Commit
46cadb56
authored
Aug 21, 2016
by
luyikei
Browse files
ThumbnailWorker: Fix emitting a wrong position
parent
4bcd3d1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Workflow/MainWorkflow.cpp
View file @
46cadb56
...
...
@@ -304,7 +304,7 @@ MainWorkflow::takeThumbnail( const QString& uuid, quint32 pos )
{
auto
clip
=
m_sequenceWorkflow
->
clip
(
uuid
);
auto
worker
=
new
ThumbnailWorker
(
uuid
,
clip
->
media
()
->
fileInfo
()
->
absoluteFilePath
(),
clip
->
begin
()
+
pos
,
clip
->
input
()
->
width
(),
clip
->
begin
()
,
pos
,
clip
->
input
()
->
width
(),
clip
->
input
()
->
height
()
);
auto
t
=
new
QThread
;
worker
->
moveToThread
(
t
);
...
...
src/Workflow/ThumbnailWorker.cpp
View file @
46cadb56
...
...
@@ -5,10 +5,13 @@
#include
"Backend/MLT/MLTInput.h"
ThumbnailWorker
::
ThumbnailWorker
(
const
QString
&
uuid
,
const
QString
&
filePath
,
qint64
pos
,
quint32
width
,
quint32
height
,
QObject
*
parent
)
ThumbnailWorker
::
ThumbnailWorker
(
const
QString
&
uuid
,
const
QString
&
filePath
,
qint64
begin
,
qint64
pos
,
quint32
width
,
quint32
height
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_uuid
(
uuid
)
,
m_filePath
(
filePath
)
,
m_begin
(
begin
)
,
m_pos
(
pos
)
,
m_width
(
width
)
,
m_height
(
height
)
...
...
@@ -20,6 +23,7 @@ void
ThumbnailWorker
::
run
()
{
Backend
::
MLT
::
MLTInput
input
(
qPrintable
(
m_filePath
)
);
input
.
setBegin
(
m_begin
);
input
.
setPosition
(
m_pos
);
auto
image
=
input
.
image
(
m_width
,
m_height
);
QImage
qImg
(
image
,
m_width
,
m_height
,
...
...
src/Workflow/ThumbnailWorker.h
View file @
46cadb56
...
...
@@ -9,7 +9,9 @@ class ThumbnailWorker : public QObject
{
Q_OBJECT
public:
explicit
ThumbnailWorker
(
const
QString
&
uuid
,
const
QString
&
filePath
,
qint64
pos
,
quint32
width
,
quint32
height
,
QObject
*
parent
=
0
);
explicit
ThumbnailWorker
(
const
QString
&
uuid
,
const
QString
&
filePath
,
qint64
begin
,
qint64
pos
,
quint32
width
,
quint32
height
,
QObject
*
parent
=
0
);
signals:
void
imageReady
(
const
QString
&
uuid
,
qint64
pos
,
const
QPixmap
&
pixmap
);
...
...
@@ -20,6 +22,7 @@ public slots:
private:
QString
m_uuid
;
QString
m_filePath
;
qint64
m_begin
;
qint64
m_pos
;
quint32
m_width
;
quint32
m_height
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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