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
075d4367
Commit
075d4367
authored
Jun 11, 2009
by
Hugo Beauzee-Luyssen
Browse files
Corrected behaviour for pause/stop/play again in ClipPreviewWidget
parent
9054c492
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/gui/ClipPreviewWidget.cpp
View file @
075d4367
...
...
@@ -42,7 +42,7 @@ void ClipPreviewWidget::startPreview( Media* media )
m_mediaPlayer
->
setMedia
(
m_vlcMedia
);
connect
(
m_mediaPlayer
,
SIGNAL
(
stopped
()
),
this
,
SLOT
(
__video
Paus
ed
()
)
);
connect
(
m_mediaPlayer
,
SIGNAL
(
stopped
()
),
this
,
SLOT
(
__video
Stopp
ed
()
)
);
connect
(
m_mediaPlayer
,
SIGNAL
(
paused
()
),
this
,
SLOT
(
__videoPaused
()
)
);
connect
(
m_mediaPlayer
,
SIGNAL
(
playing
()
),
this
,
SLOT
(
__videoPlaying
()
)
);
connect
(
m_mediaPlayer
,
SIGNAL
(
positionChanged
()
),
this
,
SLOT
(
__positionChanged
()
)
);
...
...
@@ -75,16 +75,16 @@ void ClipPreviewWidget::togglePlayPause( bool forcePause )
{
if
(
m_clipLoaded
==
false
)
return
;
if
(
m_isRendering
==
false
)
m_isRendering
=
true
;
if
(
m_paused
==
false
)
if
(
m_paused
==
false
&&
m_isRendering
==
true
)
{
m_mediaPlayer
->
pause
();
m_paused
=
true
;
}
else
if
(
forcePause
==
false
)
{
if
(
m_isRendering
==
false
)
m_isRendering
=
true
;
m_mediaPlayer
->
play
();
m_paused
=
false
;
}
...
...
@@ -116,6 +116,11 @@ void ClipPreviewWidget::__videoPaused()
emit
paused
();
}
void
ClipPreviewWidget
::
__videoStopped
()
{
emit
stopped
();
}
void
ClipPreviewWidget
::
__videoPlaying
()
{
emit
playing
();
...
...
src/gui/ClipPreviewWidget.h
View file @
075d4367
...
...
@@ -56,6 +56,7 @@ public slots:
void
__videoPaused
();
void
__videoPlaying
();
void
__endReached
();
void
__videoStopped
();
};
#endif // CLIPPREVIEWWIDGET_H
src/gui/PreviewWidget.cpp
View file @
075d4367
...
...
@@ -81,7 +81,7 @@ void PreviewWidget::connectPreview( GenericPreviewWidget* target )
{
//WARNING: the slots must NOT be virtual, since this is called from the constructor
// which would be unsafe... if not fatal...
connect
(
target
,
SIGNAL
(
stopped
()
),
this
,
SLOT
(
video
Paus
ed
()
)
);
connect
(
target
,
SIGNAL
(
stopped
()
),
this
,
SLOT
(
video
Stopp
ed
()
)
);
connect
(
target
,
SIGNAL
(
paused
()
),
this
,
SLOT
(
videoPaused
()
)
);
connect
(
target
,
SIGNAL
(
playing
()
),
this
,
SLOT
(
videoPlaying
()
)
);
connect
(
target
,
SIGNAL
(
positionChanged
(
float
)
),
this
,
SLOT
(
positionChanged
(
float
)
)
);
...
...
@@ -195,12 +195,18 @@ void PreviewWidget::on_pushButtonPlay_clicked()
m_currentPreviewRenderer
->
togglePlayPause
();
}
void
PreviewWidget
::
videoPaused
()
void
PreviewWidget
::
videoPaused
()
{
m_ui
->
pushButtonPlay
->
setIcon
(
QIcon
(
":/images/play"
)
);
}
void
PreviewWidget
::
videoPlaying
()
void
PreviewWidget
::
videoStopped
()
{
m_ui
->
pushButtonPlay
->
setIcon
(
QIcon
(
":/images/play"
)
);
m_ui
->
seekSlider
->
setValue
(
0
);
}
void
PreviewWidget
::
videoPlaying
()
{
m_ui
->
pushButtonPlay
->
setIcon
(
QIcon
(
":/images/pause"
)
);
}
...
...
src/gui/PreviewWidget.h
View file @
075d4367
...
...
@@ -75,6 +75,7 @@ private slots:
void
seekSliderReleased
();
void
videoPaused
();
void
videoPlaying
();
void
videoStopped
();
void
endReached
();
void
changedTab
(
int
);
...
...
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