本文整理汇总了C++中LLViewerMediaImpl::isParcelMedia方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerMediaImpl::isParcelMedia方法的具体用法?C++ LLViewerMediaImpl::isParcelMedia怎么用?C++ LLViewerMediaImpl::isParcelMedia使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerMediaImpl
的用法示例。
在下文中一共展示了LLViewerMediaImpl::isParcelMedia方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSelectedMediaPlay
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());
}
}
}
}
示例2: refreshList
void LLPanelNearByMedia::refreshList()
{
bool all_items_deleted = false;
if(!mMediaList)
{
// None of this makes any sense if the media list isn't there.
return;
}
// Check whether the debug column has been shown/hidden.
bool debug_info_visible = gSavedSettings.getBOOL("MediaPerformanceManagerDebug");
if(debug_info_visible != mDebugInfoVisible)
{
mDebugInfoVisible = debug_info_visible;
// Clear all items so the list gets regenerated.
mMediaList->deleteAllItems();
mParcelAudioItem = NULL;
mParcelMediaItem = NULL;
all_items_deleted = true;
updateColumns();
}
refreshParcelItems();
// Get the canonical list from LLViewerMedia
LLViewerMedia::impl_list impls = LLViewerMedia::getPriorityList();
LLViewerMedia::impl_list::iterator priority_iter;
U32 enabled_count = 0;
U32 disabled_count = 0;
// iterate over the impl list, creating rows as necessary.
for(priority_iter = impls.begin(); priority_iter != impls.end(); priority_iter++)
{
LLViewerMediaImpl *impl = *priority_iter;
// If we just emptied out the list, every flag needs to be reset.
if(all_items_deleted)
{
impl->setInNearbyMediaList(false);
}
if (!impl->isParcelMedia())
{
LLUUID media_id = impl->getMediaTextureID();
S32 proximity = impl->getProximity();
// This is expensive (i.e. a linear search) -- don't use it here. We now use mInNearbyMediaList instead.
//S32 index = mMediaList->getItemIndex(media_id);
if (proximity < 0 || !shouldShow(impl))
{
if (impl->getInNearbyMediaList())
{
// There's a row for this impl -- remove it.
removeListItem(media_id);
impl->setInNearbyMediaList(false);
}
}
else
{
if (!impl->getInNearbyMediaList())
{
// We don't have a row for this impl -- add one.
addListItem(media_id);
impl->setInNearbyMediaList(true);
}
}
// Update counts
if (impl->isMediaDisabled())
{
disabled_count++;
}
else {
enabled_count++;
}
}
}
mDisableAllCtrl->setEnabled((gSavedSettings.getBOOL("AudioStreamingMusic") ||
gSavedSettings.getBOOL("AudioStreamingMedia")) &&
(LLViewerMedia::isAnyMediaShowing() ||
LLViewerMedia::isParcelMediaPlaying() ||
LLViewerMedia::isParcelAudioPlaying()));
mEnableAllCtrl->setEnabled( (gSavedSettings.getBOOL("AudioStreamingMusic") ||
gSavedSettings.getBOOL("AudioStreamingMedia")) &&
(disabled_count > 0 ||
// parcel media (if we have it, and it isn't playing, enable "start")
(LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) ||
// parcel audio (if we have it, and it isn't playing, enable "start")
(LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying())));
// Iterate over the rows in the control, updating ones whose impl exists, and deleting ones whose impl has gone away.
std::vector<LLScrollListItem*> items = mMediaList->getAllData();
for (std::vector<LLScrollListItem*>::iterator item_it = items.begin();
item_it != items.end();
++item_it)
{
//.........这里部分代码省略.........
示例3: updateControls
void LLPanelNearByMedia::updateControls()
{
LLUUID selected_media_id = mMediaList->getValue().asUUID();
if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
if (!LLViewerMedia::hasParcelAudio() || !gSavedSettings.getBOOL("AudioStreamingMusic"))
{
// disable controls if audio streaming music is disabled from preference
showDisabledControls();
}
else {
showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(),
false, // include_zoom
false, // is_zoomed
gSavedSettings.getBOOL("MuteMusic"),
gSavedSettings.getF32("AudioLevelMusic") );
}
}
else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID)
{
if (!LLViewerMedia::hasParcelMedia() || !gSavedSettings.getBOOL("AudioStreamingMedia"))
{
// disable controls if audio streaming media is disabled from preference
showDisabledControls();
}
else {
LLViewerMediaImpl* impl = LLViewerParcelMedia::getParcelMedia();
if (NULL == impl)
{
// Just means it hasn't started yet
showBasicControls(false, false, false, false, 0);
}
else if (impl->isMediaTimeBased())
{
showTimeBasedControls(impl->isMediaPlaying(),
false, // include_zoom
false, // is_zoomed
impl->getVolume() == 0.0,
impl->getVolume() );
}
else {
// non-time-based parcel media
showBasicControls(LLViewerMedia::isParcelMediaPlaying(),
false,
false,
impl->getVolume() == 0.0,
impl->getVolume());
}
}
}
else {
LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(selected_media_id);
if (NULL == impl || !gSavedSettings.getBOOL("AudioStreamingMedia"))
{
showDisabledControls();
}
else {
if (impl->isMediaTimeBased())
{
showTimeBasedControls(impl->isMediaPlaying(),
! impl->isParcelMedia(), // include_zoom
LLViewerMediaFocus::getInstance()->isZoomed(),
impl->getVolume() == 0.0,
impl->getVolume());
}
else {
showBasicControls(!impl->isMediaDisabled(),
! impl->isParcelMedia(), // include_zoom
LLViewerMediaFocus::getInstance()->isZoomed(),
impl->getVolume() == 0.0,
impl->getVolume());
}
}
}
}