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
462b086c
Commit
462b086c
authored
May 27, 2010
by
Hugo Beauzée-Luyssen
Browse files
WorkflowRenderer: Detect when something went wrong.
parent
9ec88dcd
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/LibVLCpp/VLCMediaPlayer.cpp
View file @
462b086c
...
@@ -113,7 +113,7 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
...
@@ -113,7 +113,7 @@ void MediaPlayer::callbacks( const libvlc_event_t* ev
self
->
emit
snapshotTaken
(
event
->
u
.
media_player_snapshot_taken
.
psz_filename
);
self
->
emit
snapshotTaken
(
event
->
u
.
media_player_snapshot_taken
.
psz_filename
);
break
;
break
;
case
libvlc_MediaPlayerEncounteredError
:
case
libvlc_MediaPlayerEncounteredError
:
qDebug
()
<<
"
libvlc_MediaPlayerEncounteredError received."
qDebug
()
<<
'['
<<
(
void
*
)
self
<<
"]
libvlc_MediaPlayerEncounteredError received."
<<
"This is not looking good..."
;
<<
"This is not looking good..."
;
self
->
emit
errorEncountered
();
self
->
emit
errorEncountered
();
break
;
break
;
...
...
src/Renderer/GenericRenderer.h
View file @
462b086c
...
@@ -212,6 +212,15 @@ signals:
...
@@ -212,6 +212,15 @@ signals:
* \sa stopped();
* \sa stopped();
*/
*/
void
endReached
();
void
endReached
();
/**
* \brief Emited when something went wrong with the render.
*
* The cause may vary depending on the underlying renderer, though this will
* almost always be caused by a missing codec.
*/
void
error
();
};
};
#endif // GENERICRENDERER_H
#endif // GENERICRENDERER_H
src/Renderer/WorkflowRenderer.cpp
View file @
462b086c
...
@@ -68,6 +68,7 @@ void WorkflowRenderer::initializeRenderer()
...
@@ -68,6 +68,7 @@ void WorkflowRenderer::initializeRenderer()
//Media player part: to update PreviewWidget
//Media player part: to update PreviewWidget
connect
(
m_mediaPlayer
,
SIGNAL
(
playing
()
),
this
,
SIGNAL
(
playing
()
),
Qt
::
DirectConnection
);
connect
(
m_mediaPlayer
,
SIGNAL
(
playing
()
),
this
,
SIGNAL
(
playing
()
),
Qt
::
DirectConnection
);
connect
(
m_mediaPlayer
,
SIGNAL
(
paused
()
),
this
,
SIGNAL
(
paused
()
),
Qt
::
DirectConnection
);
connect
(
m_mediaPlayer
,
SIGNAL
(
paused
()
),
this
,
SIGNAL
(
paused
()
),
Qt
::
DirectConnection
);
connect
(
m_mediaPlayer
,
SIGNAL
(
errorEncountered
()
),
this
,
SLOT
(
errorEncountered
()
)
);
//FIXME:: check if this doesn't require Qt::QueuedConnection
//FIXME:: check if this doesn't require Qt::QueuedConnection
connect
(
m_mediaPlayer
,
SIGNAL
(
stopped
()
),
this
,
SIGNAL
(
endReached
()
)
);
connect
(
m_mediaPlayer
,
SIGNAL
(
stopped
()
),
this
,
SIGNAL
(
endReached
()
)
);
}
}
...
@@ -409,3 +410,10 @@ WorkflowRenderer::mainWorkflowLenghtChanged( qint64 /*newLength*/ )
...
@@ -409,3 +410,10 @@ WorkflowRenderer::mainWorkflowLenghtChanged( qint64 /*newLength*/ )
// }
// }
// m_oldLength = newLength;
// m_oldLength = newLength;
}
}
void
WorkflowRenderer
::
errorEncountered
()
{
stop
();
emit
error
();
}
src/Renderer/WorkflowRenderer.h
View file @
462b086c
...
@@ -304,6 +304,13 @@ class WorkflowRenderer : public GenericRenderer
...
@@ -304,6 +304,13 @@ class WorkflowRenderer : public GenericRenderer
*/
*/
void
mainWorkflowLenghtChanged
(
qint64
newLength
);
void
mainWorkflowLenghtChanged
(
qint64
newLength
);
/**
* \brief Used to catch an error in the rendering part
*
* Most likely, this will be called if the required codec aren't found.
* This will stop the render and emit the error() signal.
*/
void
errorEncountered
();
};
};
#endif // WORKFLOWRENDERER_H
#endif // WORKFLOWRENDERER_H
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