本文整理汇总了C++中LLViewerMediaImpl类的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerMediaImpl类的具体用法?C++ LLViewerMediaImpl怎么用?C++ LLViewerMediaImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLViewerMediaImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSelectedMediaMute
void LLPanelNearByMedia::onClickSelectedMediaMute()
{
LLUUID selected_media_id = mMediaList->getValue().asUUID();
if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
gSavedSettings.setBOOL("MuteMusic", mMuteBtn->getValue());
}
else {
LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
if (NULL != impl)
{
F32 volume = impl->getVolume();
if(volume > 0.0)
{
impl->setVolume(0.0);
}
else if (mVolumeSlider->getValueF32() == 0.0)
{
impl->setVolume(1.0);
mVolumeSlider->setValue(1.0);
}
else
{
impl->setVolume(mVolumeSlider->getValueF32());
}
}
}
}
示例2: setDisabled
void LLPanelNearByMedia::onClickSelectedMediaPlay()
{
LLUUID selected_media_id = mMediaList->getValue().asUUID();
// First enable it
setDisabled(selected_media_id, false);
// Special code to make play "unpause" if time-based and playing
if (selected_media_id != PARCEL_AUDIO_LIST_ITEM_UUID)
{
LLViewerMediaImpl *impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
if (NULL != impl)
{
if (impl->isMediaTimeBased() && impl->isMediaPaused())
{
// Aha! It's really time-based media that's paused, so unpause
impl->play();
return;
}
else if (impl->isParcelMedia())
{
LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
}
}
}
}
示例3: focusZoomOnMedia
void LLViewerMediaFocus::focusZoomOnMedia(LLUUID media_id)
{
LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(media_id);
if(impl)
{
// Get the first object from the media impl's object list. This is completely arbitrary, but should suffice.
LLVOVolume *obj = impl->getSomeObject();
if(obj)
{
// This media is attached to at least one object. Figure out which face it's on.
S32 face = obj->getFaceIndexWithMediaImpl(impl, -1);
// We don't have a proper pick normal here, and finding a face's real normal is... complicated.
LLVector3 normal = obj->getApproximateFaceNormal(face);
if(normal.isNull())
{
// If that didn't work, use the inverse of the camera "look at" axis, which should keep the camera pointed in the same direction.
// llinfos << "approximate face normal invalid, using camera direction." << llendl;
normal = LLViewerCamera::getInstance()->getAtAxis();
normal *= (F32)-1.0f;
}
// Attempt to focus/zoom on that face.
setFocusFace(obj, face, impl, normal);
if(mMediaControls.get())
{
mMediaControls.get()->resetZoomLevel();
mMediaControls.get()->nextZoomLevel();
}
}
}
}
示例4: getTargetMediaImpl
void LLPanelPrimMediaControls::onClickOpen()
{
LLViewerMediaImpl* impl = getTargetMediaImpl();
if(impl)
{
LLWeb::loadURL(impl->getCurrentMediaURL());
}
}
示例5: focusOnTarget
void LLPanelPrimMediaControls::onClickSkipForward()
{
focusOnTarget();
LLViewerMediaImpl* impl = getTargetMediaImpl();
if (impl)
{
impl->skipForward(mSkipStep);
}
}
示例6: setVolume
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::setVolume(F32 volume)
{
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->setVolume(volume);
}
}
示例7: clearAllCaches
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::clearAllCaches()
{
// Clear all plugins' caches
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for (; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->clearCache();
}
}
示例8: updateMedia
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::updateMedia()
{
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->update();
}
}
示例9: onScrollDown
void LLPanelPrimMediaControls::onScrollDown(void* user_data)
{
LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data);
this_panel->focusOnTarget();
LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl();
if(impl)
{
impl->scrollWheel(0, 1, MASK_NONE);
}
}
示例10: onScrollLeft
void LLPanelPrimMediaControls::onScrollLeft(void* user_data)
{
LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data);
this_panel->focusOnTarget();
LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl();
if(impl)
{
impl->scrollWheel(1, 0, MASK_NONE);
// impl->handleKeyHere(KEY_LEFT, MASK_NONE);
}
}
示例11: textureHasMedia
//////////////////////////////////////////////////////////////////////////////////////////
// static
bool LLViewerMedia::textureHasMedia(const LLUUID& texture_id)
{
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
if(pimpl->getMediaTextureID() == texture_id)
{
return true;
}
}
return false;
}
示例12: onCommitSelectedMediaVolume
void LLPanelNearByMedia::onCommitSelectedMediaVolume()
{
LLUUID selected_media_id = mMediaList->getValue().asUUID();
if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
F32 vol = mVolumeSlider->getValueF32();
gSavedSettings.setF32("AudioLevelMusic", vol);
}
else {
LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ?
((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
if (NULL != impl)
{
impl->setVolume(mVolumeSlider->getValueF32());
}
}
}
示例13: getCookieStore
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::updateMedia()
{
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
{
lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl;
lldebugs << sUpdatedCookies << llendl;
}
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
pimpl->update();
}
}
示例14: if
bool LLBrowserNotification::processNotification(const LLNotificationPtr& notification)
{
LLUUID media_id = notification->getPayload()["media_id"].asUUID();
LLMediaCtrl* media_instance = LLMediaCtrl::getInstance(media_id);
if (media_instance)
{
media_instance->showNotification(notification);
}
else if (LLViewerMediaFocus::instance().getControlsMediaID() == media_id)
{
LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(media_id);
if (impl)
{
impl->showNotification(notification);
}
}
return false;
}
示例15: getCurrentUserAgent
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::updateBrowserUserAgent()
{
std::string user_agent = getCurrentUserAgent();
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
for(; iter != end; iter++)
{
LLViewerMediaImpl* pimpl = *iter;
LLPluginClassMedia* plugin = pimpl->getMediaPlugin();
if(plugin && plugin->pluginSupportsMediaBrowser())
{
plugin->setBrowserUserAgent(user_agent);
}
}
}