Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
451be079
Commit
451be079
authored
May 28, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when using slider without anything loaded
Removed debug
parent
cc5637d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
src/Workflow/MainWorkflow.cpp
src/Workflow/MainWorkflow.cpp
+4
-2
src/Workflow/MainWorkflow.h
src/Workflow/MainWorkflow.h
+8
-5
src/Workflow/TrackWorkflow.cpp
src/Workflow/TrackWorkflow.cpp
+6
-4
src/Workflow/TrackWorkflow.h
src/Workflow/TrackWorkflow.h
+1
-1
src/gui/RenderPreviewWidget.cpp
src/gui/RenderPreviewWidget.cpp
+0
-1
No files found.
src/Workflow/MainWorkflow.cpp
View file @
451be079
...
...
@@ -25,7 +25,7 @@
#include "MainWorkflow.h"
MainWorkflow
::
MainWorkflow
()
MainWorkflow
::
MainWorkflow
()
:
m_renderStarted
(
false
)
{
m_tracks
=
new
TrackWorkflow
*
[
NB_TRACKS
];
for
(
unsigned
int
i
=
0
;
i
<
NB_TRACKS
;
++
i
)
...
...
@@ -43,6 +43,7 @@ void MainWorkflow::addClip( Clip* clip, unsigned int trackId, qint64 start )
void
MainWorkflow
::
startRender
()
{
m_renderStarted
=
true
;
m_currentFrame
=
0
;
emit
frameChanged
(
0
);
m_length
=
m_tracks
[
0
]
->
getLength
();
...
...
@@ -60,8 +61,9 @@ unsigned char* MainWorkflow::getOutput()
void
MainWorkflow
::
setPosition
(
float
pos
)
{
if
(
m_renderStarted
==
false
)
return
;
qint64
frame
=
(
float
)
m_length
*
pos
;
qDebug
()
<<
"Setting current frame to "
<<
frame
<<
'('
<<
m_length
<<
'*'
<<
pos
<<
')'
;
m_tracks
[
0
]
->
setPosition
(
pos
);
m_currentFrame
=
frame
;
emit
frameChanged
(
frame
);
...
...
src/Workflow/MainWorkflow.h
View file @
451be079
...
...
@@ -43,17 +43,20 @@ class MainWorkflow : public QObject
unsigned
char
*
getOutput
();
/**
\brief Set the workflow position
\param pos: The position in vlc position
* \brief Set the workflow position
* \param pos: The position in vlc position
*/
void
setPosition
(
float
pos
);
/**
\return Returns the global length of the workflow
in frames.
*
\return Returns the global length of the workflow
*
in frames.
*/
qint64
getLength
()
const
;
/**
* This boolean describe is a render has been started
*/
bool
m_renderStarted
;
private:
TrackWorkflow
**
m_tracks
;
...
...
src/Workflow/TrackWorkflow.cpp
View file @
451be079
...
...
@@ -148,11 +148,13 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
void
TrackWorkflow
::
setPosition
(
float
pos
)
{
qint64
frame
=
(
float
)
m_length
*
pos
;
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
it
=
m_clips
.
begin
();
const
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
end
=
m_clips
.
end
();
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
next
=
m_clips
.
end
()
;
qint64
frame
=
(
float
)
m_length
*
pos
;
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
it
=
m_clips
.
begin
();
const
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
end
=
m_clips
.
end
();
QMap
<
qint64
,
ClipWorkflow
*>::
iterator
next
=
end
;
if
(
m_mediaPlayer
->
isPlaying
()
==
false
)
return
;
QWriteLocker
lock
(
m_currentLock
);
if
(
frame
>
m_length
)
{
...
...
src/Workflow/TrackWorkflow.h
View file @
451be079
...
...
@@ -85,7 +85,7 @@ class TrackWorkflow : public QObject
QWaitCondition
*
m_waitCondition
;
LibVLCpp
::
MediaPlayer
*
m_mediaPlayer
;
/**
\brief The track length in frames.
*
\brief The track length in frames.
*/
qint64
m_length
;
...
...
src/gui/RenderPreviewWidget.cpp
View file @
451be079
...
...
@@ -96,7 +96,6 @@ void RenderPreviewWidget::togglePlayPause( bool /*forcePause*/ )
startPreview
(
NULL
);
else
{
qDebug
()
<<
m_mediaPlayer
->
isPlaying
();
if
(
m_mediaPlayer
->
isPlaying
()
==
false
)
m_mediaPlayer
->
play
();
else
...
...
Write
Preview
Markdown
is supported
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