summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-08-18 13:57:14 +0800
committerErik Kundiman <erik@megapahit.org>2026-08-18 13:57:14 +0800
commit2fa8281b2d8ce8bdbcacf139ec674480da6c9d81 (patch)
treeffb343fee97f21942123fd322d88fea3ef1a4811 /indra/newview/llviewermedia.cpp
parent742d802f073e81abc6d4cd512e58a4d03b414b83 (diff)
parent214fa765986b4c1e1de1b917581f8508278abd8e (diff)
Merge branch '26.3'
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp34
1 files changed, 28 insertions, 6 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index b491701a36..92bfc9e0f5 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1758,6 +1758,7 @@ void LLViewerMediaImpl::createMediaSource()
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::destroyMediaSource()
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA;
mNeedsNewTexture = true;
// Tell the viewer media texture it's no longer active
@@ -2645,19 +2646,30 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::navigateInternal()
+void LLViewerMediaImpl::navigateInternal(bool should_log)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA;
// Helpful to have media urls in log file. Shouldn't be spammy.
{
// Do not log the query parts
LLURI u(mMediaURL);
std::string sanitized_url = (u.query().empty() ? mMediaURL : u.scheme() + "://" + u.authority() + u.path());
- LL_INFOS() << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << LL_ENDL;
+ if (should_log)
+ {
+ LL_INFOS("Media") << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS("Media") << "media id= " << mTextureId << " url=" << sanitized_url << ", mime_type=" << mMimeType << LL_ENDL;
+ }
}
if(mNavigateSuspended)
{
- LL_WARNS() << "Deferring navigate." << LL_ENDL;
+ if (should_log || !mNavigateSuspendedDeferred)
+ {
+ LL_WARNS() << "Deferring navigate." << LL_ENDL;
+ }
mNavigateSuspendedDeferred = true;
return;
}
@@ -2665,7 +2677,13 @@ void LLViewerMediaImpl::navigateInternal()
if (!mMimeProbe.expired())
{
- LL_WARNS() << "MIME type probe already in progress -- bailing out." << LL_ENDL;
+ if (should_log)
+ {
+ // media periodically suspends and unsuspends (should_log == false),
+ // unsuspend calls this function, it's epxected that sometimes
+ // unsuspend will be attempted while a probe is in flight.
+ LL_WARNS() << "MIME type probe already in progress -- bailing out." << LL_ENDL;
+ }
return;
}
@@ -2726,10 +2744,14 @@ void LLViewerMediaImpl::navigateInternal()
{
loadURI();
}
- else
+ else if (should_log)
{
LL_WARNS("Media") << "Couldn't navigate to: " << mMediaURL << " as there is no media type for: " << mMimeType << LL_ENDL;
}
+ else
+ {
+ LL_DEBUGS("Media") << "Couldn't navigate to: " << mMediaURL << " as there is no media type for: " << mMimeType << LL_ENDL;
+ }
}
void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url)
@@ -3995,7 +4017,7 @@ void LLViewerMediaImpl::setNavigateSuspended(bool suspend)
if(mNavigateSuspendedDeferred)
{
mNavigateSuspendedDeferred = false;
- navigateInternal();
+ navigateInternal(false /*suspend happens periodically, don't log*/);
}
}
}