diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-13 18:23:38 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-12-13 18:23:38 +0200 |
commit | 7fbb3f69b1b166954eed0a3be24f7ecb021f0b5a (patch) | |
tree | d0dfd2f64945cd50a253c97cb33ac9360ed81223 /indra | |
parent | bde862084d76eb4b9d773e10fdde6bfd3df57f7a (diff) | |
parent | 8d34a4f8c12d624deb72878d7a6682e306f71d1a (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra')
-rw-r--r-- | indra/media_plugins/libvlc/media_plugin_libvlc.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 0bd323eb58..ebcdde2960 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -84,6 +84,7 @@ private: float mCurTime; float mDuration; + EStatus mVlcStatus; }; //////////////////////////////////////////////////////////////////////////////// @@ -111,6 +112,7 @@ MediaPluginBase(host_send_func, host_user_data) mURL = std::string(); + mVlcStatus = STATUS_NONE; setStatus(STATUS_NONE); } @@ -209,28 +211,28 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr) switch (event->type) { case libvlc_MediaPlayerOpening: - parent->setStatus(STATUS_LOADING); + parent->mVlcStatus = STATUS_LOADING; break; case libvlc_MediaPlayerPlaying: parent->mDuration = (float)(libvlc_media_get_duration(parent->mLibVLCMedia)) / 1000.0f; - parent->setStatus(STATUS_PLAYING); + parent->mVlcStatus = STATUS_PLAYING; break; case libvlc_MediaPlayerPaused: - parent->setStatus(STATUS_PAUSED); + parent->mVlcStatus = STATUS_PAUSED; break; case libvlc_MediaPlayerStopped: - parent->setStatus(STATUS_DONE); + parent->mVlcStatus = STATUS_DONE; break; case libvlc_MediaPlayerEndReached: - parent->setStatus(STATUS_DONE); + parent->mVlcStatus = STATUS_DONE; break; case libvlc_MediaPlayerEncounteredError: - parent->setStatus(STATUS_ERROR); + parent->mVlcStatus = STATUS_ERROR; break; case libvlc_MediaPlayerTimeChanged: @@ -446,6 +448,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) } else if (message_name == "idle") { + setStatus(mVlcStatus); } else if (message_name == "cleanup") { @@ -567,7 +570,7 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string) { if (mLibVLCMediaPlayer) { - libvlc_media_player_pause(mLibVLCMediaPlayer); + libvlc_media_player_set_pause(mLibVLCMediaPlayer, 1); } } else if (message_name == "seek") diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ec06cc432f..bf98650afd 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -810,7 +810,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) sAnyMediaShowing = true; } - if (!pimpl->getUsedInUI() && pimpl->hasMedia() && (!pimpl->isMediaPaused() || !pimpl->isMediaTimeBased())) + if (!pimpl->getUsedInUI() && pimpl->hasMedia() && pimpl->isMediaPlaying()) { sAnyMediaPlaying = true; } @@ -949,7 +949,6 @@ void LLViewerMedia::setAllMediaPaused(bool val) if (pimpl->isMediaTimeBased() && pimpl->isMediaPaused()) { pimpl->play(); - return; } } else if (pimpl->isMediaTimeBased() && pimpl->mMediaSource) |