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
cd228678
Commit
cd228678
authored
Jan 14, 2010
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sound is now working with more that one track :)
parent
e875537c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
11 deletions
+15
-11
src/Workflow/MainWorkflow.cpp
src/Workflow/MainWorkflow.cpp
+2
-1
src/Workflow/TrackHandler.cpp
src/Workflow/TrackHandler.cpp
+3
-3
src/Workflow/TrackHandler.h
src/Workflow/TrackHandler.h
+4
-1
src/Workflow/TrackWorkflow.cpp
src/Workflow/TrackWorkflow.cpp
+4
-5
src/Workflow/TrackWorkflow.h
src/Workflow/TrackWorkflow.h
+2
-1
No files found.
src/Workflow/MainWorkflow.cpp
View file @
cd228678
...
...
@@ -137,7 +137,8 @@ MainWorkflow::getOutput( TrackType trackType )
{
QReadLocker
lock2
(
m_currentFrameLock
);
m_tracks
[
trackType
]
->
getOutput
(
m_currentFrame
[
trackType
]
);
m_tracks
[
trackType
]
->
getOutput
(
m_currentFrame
[
VideoTrack
],
m_currentFrame
[
trackType
]
);
if
(
trackType
==
MainWorkflow
::
VideoTrack
)
{
m_effectEngine
->
render
();
...
...
src/Workflow/TrackHandler.cpp
View file @
cd228678
...
...
@@ -105,7 +105,7 @@ TrackHandler::getLength() const
}
void
TrackHandler
::
getOutput
(
qint64
currentFrame
)
TrackHandler
::
getOutput
(
qint64
currentFrame
,
qint64
subFrame
)
{
m_tmpAudioBuffer
=
NULL
;
for
(
unsigned
int
i
=
0
;
i
<
m_trackCount
;
++
i
)
...
...
@@ -116,7 +116,7 @@ TrackHandler::getOutput( qint64 currentFrame )
m_effectEngine
->
setVideoInput
(
i
+
1
,
*
TrackHandler
::
nullOutput
);
else
{
void
*
ret
=
m_tracks
[
i
]
->
getOutput
(
currentFrame
);
void
*
ret
=
m_tracks
[
i
]
->
getOutput
(
currentFrame
,
subFrame
);
if
(
ret
==
NULL
)
m_effectEngine
->
setVideoInput
(
i
+
1
,
*
TrackHandler
::
nullOutput
);
else
...
...
@@ -129,7 +129,7 @@ TrackHandler::getOutput( qint64 currentFrame )
}
else
{
void
*
ret
=
m_tracks
[
i
]
->
getOutput
(
currentFrame
);
void
*
ret
=
m_tracks
[
i
]
->
getOutput
(
currentFrame
,
subFrame
);
//m_tmpAudioBuffer is NULl by default, so it will remain NULL if we continue;
if
(
ret
==
NULL
)
continue
;
...
...
src/Workflow/TrackHandler.h
View file @
cd228678
...
...
@@ -49,10 +49,13 @@ class TrackHandler : public QObject
void
startRender
();
/**
* \param currentFrame The current rendering frame (ie the video frame, in all case)
* \param subFrame The type-dependent frame. IE, for a video track,
* it's the same as currentFrame, but for an audio
* track, it will be different.
* \todo This should probably be partialy handled by the trackHandler, as the work
* is exactly the same for both audio and video trackWorkflow in most of the case... or not.
*/
void
getOutput
(
qint64
currentFrame
);
void
getOutput
(
qint64
currentFrame
,
qint64
subFrame
);
void
pause
();
void
unpause
();
void
activateAll
();
...
...
src/Workflow/TrackWorkflow.cpp
View file @
cd228678
...
...
@@ -135,7 +135,6 @@ void* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame,
cw
->
getStateLock
()
->
lockForRead
();
// qDebug() << "TrackWorkflow::renderClip. currentFrame:" << currentFrame << "trackType:" << m_trackType;
// qDebug() << "Rendering clip" << cw << "state:" << cw->getState() << "Type:" << m_trackType;
if
(
cw
->
getState
()
==
ClipWorkflow
::
Rendering
||
cw
->
getState
()
==
ClipWorkflow
::
Paused
||
cw
->
getState
()
==
ClipWorkflow
::
PauseRequired
||
...
...
@@ -244,7 +243,7 @@ void TrackWorkflow::releasePreviousRender()
}
}
void
*
TrackWorkflow
::
getOutput
(
qint64
currentFrame
)
void
*
TrackWorkflow
::
getOutput
(
qint64
currentFrame
,
qint64
subFrame
)
{
releasePreviousRender
();
QReadLocker
lock
(
m_clipsLock
);
...
...
@@ -266,10 +265,10 @@ void* TrackWorkflow::getOutput( qint64 currentFrame )
needRepositioning
=
true
;
m_forceRepositionning
=
false
;
}
else
if
(
m_paused
==
true
&&
current
Frame
!=
m_lastFrame
)
else
if
(
m_paused
==
true
&&
sub
Frame
!=
m_lastFrame
)
needRepositioning
=
true
;
else
needRepositioning
=
(
abs
(
current
Frame
-
m_lastFrame
)
>
1
)
?
true
:
false
;
needRepositioning
=
(
abs
(
sub
Frame
-
m_lastFrame
)
>
1
)
?
true
:
false
;
}
while
(
it
!=
end
)
...
...
@@ -297,7 +296,7 @@ void* TrackWorkflow::getOutput( qint64 currentFrame )
stopClipWorkflow
(
cw
);
++
it
;
}
m_lastFrame
=
current
Frame
;
m_lastFrame
=
sub
Frame
;
return
ret
;
}
...
...
src/Workflow/TrackWorkflow.h
View file @
cd228678
...
...
@@ -58,7 +58,8 @@ class TrackWorkflow : public QObject
TrackWorkflow
(
unsigned
int
trackId
,
MainWorkflow
::
TrackType
type
);
~
TrackWorkflow
();
void
*
getOutput
(
qint64
currentFrame
);
void
*
getOutput
(
qint64
currentFrame
,
qint64
subFrame
);
qint64
getLength
()
const
;
void
stop
();
void
pause
();
...
...
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