当前位置: 首页>>代码示例>>C++>>正文


C++ LLViewerMediaImpl类代码示例

本文整理汇总了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());
			}
		}
	}
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:29,代码来源:llpanelnearbymedia.cpp

示例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());
			}
		}
	}	
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:27,代码来源:llpanelnearbymedia.cpp

示例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();
			}
		}
	}
}
开发者ID:kow,项目名称:Astra-Viewer-2,代码行数:34,代码来源:llviewermediafocus.cpp

示例4: getTargetMediaImpl

void LLPanelPrimMediaControls::onClickOpen()
{
	LLViewerMediaImpl* impl = getTargetMediaImpl();
	if(impl)
	{
		LLWeb::loadURL(impl->getCurrentMediaURL());
	}	
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例5: focusOnTarget

void LLPanelPrimMediaControls::onClickSkipForward()
{
	focusOnTarget();

	LLViewerMediaImpl* impl = getTargetMediaImpl();

	if (impl)
	{
		impl->skipForward(mSkipStep);
	}
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例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);
	}
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:13,代码来源:llviewermedia.cpp

示例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();
	}
}
开发者ID:mightymarc,项目名称:Phoenix-Viewer-Evil,代码行数:13,代码来源:llviewermedia.cpp

示例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();
	}
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:13,代码来源:llviewermedia.cpp

示例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);
	}
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例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);
	}
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例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;
}
开发者ID:djdevil1989,项目名称:Luna-Viewer,代码行数:17,代码来源:llviewermedia.cpp

示例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());
		}
	}
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:17,代码来源:llpanelnearbymedia.cpp

示例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();
	}
}
开发者ID:mightymarc,项目名称:Phoenix-Viewer-Evil,代码行数:20,代码来源:llviewermedia.cpp

示例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;
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:18,代码来源:llbrowsernotification.cpp

示例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);
		}
	}

}
开发者ID:NickyPerian,项目名称:SingularityViewer,代码行数:20,代码来源:llviewermedia.cpp


注:本文中的LLViewerMediaImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。