Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kaffeine
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ManiacTwister
kaffeine
Commits
332ae4b5
Commit
332ae4b5
authored
Apr 15, 2012
by
Christoph Pfister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc backend: emit playback status event in play()
parent
595ad46f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
src/backend-vlc/vlcmediawidget.cpp
src/backend-vlc/vlcmediawidget.cpp
+21
-16
No files found.
src/backend-vlc/vlcmediawidget.cpp
View file @
332ae4b5
...
...
@@ -140,6 +140,7 @@ void VlcMediaWidget::setDeinterlacing(bool deinterlacing)
void
VlcMediaWidget
::
play
(
const
MediaSource
&
source
)
{
addPendingUpdates
(
PlaybackStatus
);
QByteArray
url
=
source
.
getUrl
().
toEncoded
();
playingDvd
=
false
;
...
...
@@ -479,33 +480,37 @@ void VlcMediaWidget::mousePressEvent(QMouseEvent *event)
void
VlcMediaWidget
::
vlcEvent
(
const
libvlc_event_t
*
event
)
{
// FIXME recheck
PendingUpdates
pendingUpdatesToBeAdded
=
0
;
switch
(
event
->
type
)
{
case
libvlc_MediaMetaChanged
:
addPendingUpdates
(
Metadata
)
;
return
;
pendingUpdatesToBeAdded
=
Metadata
;
break
;
case
libvlc_MediaPlayerEncounteredError
:
addPendingUpdates
(
PlaybackStatus
)
;
return
;
pendingUpdatesToBeAdded
=
PlaybackStatus
;
break
;
case
libvlc_MediaPlayerEndReached
:
addPendingUpdates
(
PlaybackFinished
|
PlaybackStatus
);
return
;
pendingUpdatesToBeAdded
=
(
PlaybackFinished
|
PlaybackStatus
);
break
;
case
libvlc_MediaPlayerLengthChanged
:
addPendingUpdates
(
CurrentTotalTime
)
;
return
;
pendingUpdatesToBeAdded
=
CurrentTotalTime
;
break
;
case
libvlc_MediaPlayerSeekableChanged
:
addPendingUpdates
(
Seekable
)
;
return
;
pendingUpdatesToBeAdded
=
Seekable
;
break
;
case
libvlc_MediaPlayerStopped
:
addPendingUpdates
(
PlaybackStatus
)
;
return
;
pendingUpdatesToBeAdded
=
PlaybackStatus
;
break
;
case
libvlc_MediaPlayerTimeChanged
:
addPendingUpdates
(
CurrentTotalTime
)
;
return
;
pendingUpdatesToBeAdded
=
CurrentTotalTime
;
break
;
}
Log
(
"VlcMediaWidget::vlcEvent: unknown event type"
)
<<
event
->
type
;
if
(
pendingUpdatesToBeAdded
!=
0
)
{
addPendingUpdates
(
pendingUpdatesToBeAdded
);
}
else
{
Log
(
"VlcMediaWidget::vlcEvent: unknown event type"
)
<<
event
->
type
;
}
}
void
VlcMediaWidget
::
vlcEventHandler
(
const
libvlc_event_t
*
event
,
void
*
instance
)
...
...
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