summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-22 20:46:45 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-22 20:46:45 +0800
commit60f0e2894f311d310273aef6dc9743bec2fb7308 (patch)
tree698fc42770fa4c8356bc86a63cee1d472282c361 /indra/media_plugins
parentf0de82fcf8a3718f557431610396b4e240787442 (diff)
parent78c6c73770202cedcc92d4b19bccd4ffe9075bef (diff)
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/libvlc/media_plugin_libvlc.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
index a5d8f885fd..8ae9931dd4 100644
--- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
+++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp
@@ -294,6 +294,15 @@ void MediaPluginLibVLC::eventCallbacks(const libvlc_event_t* event, void* ptr)
}
}
break;
+ case libvlc_MediaMetaChanged:
+ auto now_playing = libvlc_media_get_meta(parent->mLibVLCMedia, libvlc_meta_NowPlaying);
+ if (now_playing)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "nowplaying_text");
+ message.setValue("nowplaying", now_playing);
+ parent->sendMessage(message);
+ }
+ break;
}
}
@@ -348,6 +357,11 @@ void MediaPluginLibVLC::playMedia()
libvlc_event_attach(em, libvlc_MediaPlayerLengthChanged, eventCallbacks, this);
libvlc_event_attach(em, libvlc_MediaPlayerTitleChanged, eventCallbacks, this);
}
+ auto event_manager = libvlc_media_event_manager(mLibVLCMedia);
+ if (event_manager)
+ {
+ libvlc_event_attach(event_manager, libvlc_MediaMetaChanged, eventCallbacks, this);
+ }
libvlc_video_set_callbacks(mLibVLCMediaPlayer, lock, unlock, display, &mLibVLCCallbackContext);
libvlc_video_set_format(mLibVLCMediaPlayer, "RV32", mWidth, mHeight, mWidth * mDepth);