Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
4943285a
Commit
4943285a
authored
Sep 04, 2009
by
Geoffroy Lacarriere
Browse files
Merge branch 'master' of git@github.com:VLMC/vlmc into geoff_project_saving
parents
8be363f6
bca0bccc
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/LibVLCpp/VLCMediaPlayer.cpp
View file @
4943285a
...
...
@@ -93,6 +93,7 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
self
->
emit
paused
();
break
;
case
libvlc_MediaPlayerStopped
:
// qDebug() << "Media player stopped";
self
->
emit
stopped
();
break
;
case
libvlc_MediaPlayerEndReached
:
...
...
src/Media/Clip.cpp
View file @
4943285a
...
...
@@ -157,3 +157,11 @@ void Clip::setEnd( float end )
Q_ASSERT
(
end
<=
1.0
f
);
m_end
=
end
;
}
Clip
*
Clip
::
split
(
float
newEnd
)
{
Clip
*
newClip
=
new
Clip
(
this
,
newEnd
,
m_end
);
m_end
=
newEnd
;
computeLength
();
return
newClip
;
}
src/Media/Clip.h
View file @
4943285a
...
...
@@ -99,6 +99,14 @@ class Clip : public QObject
const
QString
&
getNotes
()
const
;
void
setNotes
(
const
QString
&
notes
);
/**
* \brief Split this clip in two parts.
* \param newEnd The new end for this Clip. This will be the beginning of the
* newly created Clip.
* \returns The remaining part as a new Clip.
*/
Clip
*
split
(
float
newEnd
);
private:
void
computeLength
();
...
...
src/Renderer/WorkflowRenderer.cpp
View file @
4943285a
...
...
@@ -131,6 +131,8 @@ void WorkflowRenderer::stopPreview()
void
WorkflowRenderer
::
startPreview
()
{
if
(
m_mainWorkflow
->
getLength
()
<=
0
)
return
;
m_mediaPlayer
->
setMedia
(
m_media
);
//Workflow part
...
...
src/Workflow/ClipWorkflow.cpp
View file @
4943285a
...
...
@@ -73,6 +73,7 @@ void ClipWorkflow::checkStateChange()
if
(
m_requiredState
!=
ClipWorkflow
::
None
)
{
m_state
=
m_requiredState
;
// qDebug() << "Applying required state change:" << m_state;
m_requiredState
=
ClipWorkflow
::
None
;
checkSynchronisation
(
m_state
);
}
...
...
@@ -99,7 +100,9 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
cw
->
m_renderWaitCond
->
wake
();
cw
->
emit
renderComplete
(
cw
);
// qDebug() << "Entering cond wait";
cw
->
m_waitCond
->
wait
(
cw
->
m_condMutex
);
// qDebug() << "Leaving condwait";
cw
->
m_stateLock
->
lockForWrite
();
if
(
cw
->
m_state
==
Sleeping
)
cw
->
m_state
=
Rendering
;
...
...
@@ -271,6 +274,7 @@ void ClipWorkflow::setState( State state )
{
{
QWriteLocker
lock
(
m_stateLock
);
// qDebug() << "Setting state to" << state;
m_state
=
state
;
}
checkSynchronisation
(
state
);
...
...
src/Workflow/MainWorkflow.cpp
View file @
4943285a
...
...
@@ -76,13 +76,17 @@ void MainWorkflow::addClip( Clip* clip, unsigned int trackId, qint64 start )
Q_ASSERT_X
(
trackId
<
m_trackCount
,
"MainWorkflow::addClip"
,
"The specified trackId isn't valid, for it's higher than the number of tracks"
);
//if the track is deactivated, we need to reactivate it :
m_tracks
[
trackId
]
->
addClip
(
clip
,
start
);
//if the track is deactivated, we need to reactivate it.
if
(
m_tracks
[
trackId
].
deactivated
()
==
true
)
activateTrack
(
trackId
);
m_tracks
[
trackId
]
->
addClip
(
clip
,
start
);
//Now check if this clip addition has changed something about the workflow's length
if
(
m_tracks
[
trackId
]
->
getLength
()
>
m_length
)
m_length
=
m_tracks
[
trackId
]
->
getLength
();
//Inform the GUI
emit
clipAdded
(
clip
,
trackId
,
start
);
}
...
...
src/Workflow/TrackWorkflow.cpp
View file @
4943285a
...
...
@@ -221,7 +221,10 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
cw
->
getState
()
==
ClipWorkflow
::
EndReached
)
{
cw
->
getStateLock
()
->
unlock
();
cw
->
queryStateChange
(
ClipWorkflow
::
Stopping
);
{
QMutexLocker
lock
(
cw
->
getSleepMutex
()
);
cw
->
queryStateChange
(
ClipWorkflow
::
Stopping
);
}
cw
->
wake
();
cw
->
stop
();
}
...
...
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