本文整理汇总了C++中LLParcel::setMediaURL方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::setMediaURL方法的具体用法?C++ LLParcel::setMediaURL怎么用?C++ LLParcel::setMediaURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::setMediaURL方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processParcelMediaUpdate
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void ** )
{
LLUUID media_id;
std::string media_url;
std::string media_type;
S32 media_width = 0;
S32 media_height = 0;
U8 media_auto_scale = FALSE;
U8 media_loop = FALSE;
msg->getUUID( "DataBlock", "MediaID", media_id );
char media_url_buffer[257];
msg->getString( "DataBlock", "MediaURL", 255, media_url_buffer );
media_url = media_url_buffer;
msg->getU8("DataBlock", "MediaAutoScale", media_auto_scale);
if (msg->has("DataBlockExtended")) // do we have the extended data?
{
char media_type_buffer[257];
msg->getString("DataBlockExtended", "MediaType", 255, media_type_buffer);
media_type = media_type_buffer;
msg->getU8("DataBlockExtended", "MediaLoop", media_loop);
msg->getS32("DataBlockExtended", "MediaWidth", media_width);
msg->getS32("DataBlockExtended", "MediaHeight", media_height);
}
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
BOOL same = FALSE;
if (parcel)
{
same = ((parcel->getMediaURL() == media_url) &&
(parcel->getMediaType() == media_type) &&
(parcel->getMediaID() == media_id) &&
(parcel->getMediaWidth() == media_width) &&
(parcel->getMediaHeight() == media_height) &&
(parcel->getMediaAutoScale() == media_auto_scale) &&
(parcel->getMediaLoop() == media_loop));
if (!same)
{
// temporarily store these new values in the parcel
parcel->setMediaURL(media_url);
parcel->setMediaType(media_type);
parcel->setMediaID(media_id);
parcel->setMediaWidth(media_width);
parcel->setMediaHeight(media_height);
parcel->setMediaAutoScale(media_auto_scale);
parcel->setMediaLoop(media_loop);
play(parcel);
}
}
}
示例2: onCommitAny
// static
void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandMedia *self = (LLPanelLandMedia *)userdata;
LLParcel* parcel = self->mParcel->getParcel();
if (!parcel)
{
return;
}
// Extract data from UI
std::string media_url = self->mMediaURLEdit->getText();
std::string media_desc = self->mMediaDescEdit->getText();
std::string mime_type = self->childGetText("mime_type");
U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
U8 media_loop = self->mMediaLoopCheck->get();
F32 media_reset_time = (F32)self->mMediaResetCtrl->get();
S32 media_width = (S32)self->mMediaWidthCtrl->get();
S32 media_height = (S32)self->mMediaHeightCtrl->get();
LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
U8 navigate_allow = ! self->mRadioNavigateControl->getSelectedIndex();
U8 navigate_filter = self->mMediaURLFilterCheck->get();
self->childSetText("mime_type", mime_type);
// Remove leading/trailing whitespace (common when copying/pasting)
LLStringUtil::trim(media_url);
// Push data into current parcel
parcel->setMediaURL(media_url);
parcel->setMediaType(mime_type);
parcel->setMediaDesc(media_desc);
parcel->setMediaWidth(media_width);
parcel->setMediaHeight(media_height);
parcel->setMediaID(media_id);
parcel->setMediaAutoScale ( media_auto_scale );
parcel->setMediaLoop ( media_loop );
parcel->setMediaURLFilterEnable(navigate_filter);
parcel->setMediaAllowNavigate(navigate_allow);
parcel->setMediaURLTimeout(media_reset_time);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
// Might have changed properties, so let's redraw!
self->refresh();
}
示例3: onCommitAny
// static
void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
{
LLPanelLandMedia *self = (LLPanelLandMedia *)userdata;
LLParcel* parcel = self->mParcel->getParcel();
if (!parcel)
{
return;
}
// Extract data from UI
std::string media_url = self->mMediaURLEdit->getText();
std::string media_desc = self->mMediaDescEdit->getText();
std::string mime_type = self->getChild<LLUICtrl>("mime_type")->getValue().asString();
U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
U8 media_loop = self->mMediaLoopCheck->get();
U8 obscure_media = self->mMediaUrlCheck->get();
S32 media_width = (S32)self->mMediaWidthCtrl->get();
S32 media_height = (S32)self->mMediaHeightCtrl->get();
LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
self->getChild<LLUICtrl>("mime_type")->setValue(mime_type);
// Remove leading/trailing whitespace (common when copying/pasting)
LLStringUtil::trim(media_url);
// Push data into current parcel
parcel->setMediaURL(media_url);
parcel->setMediaType(mime_type);
parcel->setMediaDesc(media_desc);
parcel->setMediaWidth(media_width);
parcel->setMediaHeight(media_height);
parcel->setMediaID(media_id);
parcel->setMediaAutoScale ( media_auto_scale );
parcel->setMediaLoop ( media_loop );
parcel->setObscureMedia( obscure_media );
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
// Might have changed properties, so let's redraw!
self->refresh();
}
示例4: onClickAssign
void LLFloaterMediaBrowser::onClickAssign(void* user_data)
{
LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (!parcel)
{
return;
}
std::string media_url = self->mAddressCombo->getValue().asString();
LLStringUtil::trim(media_url);
parcel->setMediaURL(media_url);
parcel->setMediaType(std::string("text/html"));
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel, true );
// now check for video
LLViewerParcelMedia::update( parcel );
}
示例5: onClickAssign
void LLFloaterMediaBrowser::onClickAssign(void* user_data)
{
LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (!parcel)
{
return;
}
std::string media_url = self->mAddressCombo->getValue().asString();
LLStringUtil::trim(media_url);
if(parcel->getMediaType() != "text/html")
{
parcel->setMediaURL(media_url);
parcel->setMediaCurrentURL(media_url);
parcel->setMediaType(std::string("text/html"));
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel, true );
LLViewerParcelMedia::sendMediaNavigateMessage(media_url);
LLViewerParcelMedia::stop();
// LLViewerParcelMedia::update( parcel );
}
LLViewerParcelMedia::sendMediaNavigateMessage(media_url);
}
示例6: processParcelMediaUpdate
//////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void ** )
{
LLUUID media_id;
std::string media_url;
std::string media_type;
S32 media_width = 0;
S32 media_height = 0;
U8 media_auto_scale = FALSE;
U8 media_loop = FALSE;
msg->getUUID( "DataBlock", "MediaID", media_id );
char media_url_buffer[257];
msg->getString( "DataBlock", "MediaURL", 255, media_url_buffer );
media_url = media_url_buffer;
msg->getU8("DataBlock", "MediaAutoScale", media_auto_scale);
if (msg->has("DataBlockExtended")) // do we have the extended data?
{
char media_type_buffer[257];
msg->getString("DataBlockExtended", "MediaType", 255, media_type_buffer);
media_type = media_type_buffer;
msg->getU8("DataBlockExtended", "MediaLoop", media_loop);
msg->getS32("DataBlockExtended", "MediaWidth", media_width);
msg->getS32("DataBlockExtended", "MediaHeight", media_height);
}
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
BOOL same = FALSE;
if (parcel)
{
same = ((parcel->getMediaURL() == media_url) &&
(parcel->getMediaType() == media_type) &&
(parcel->getMediaID() == media_id) &&
(parcel->getMediaWidth() == media_width) &&
(parcel->getMediaHeight() == media_height) &&
(parcel->getMediaAutoScale() == media_auto_scale) &&
(parcel->getMediaLoop() == media_loop));
if (!same)
{
// temporarily store these new values in the parcel
parcel->setMediaURL(media_url);
parcel->setMediaType(media_type);
parcel->setMediaID(media_id);
parcel->setMediaWidth(media_width);
parcel->setMediaHeight(media_height);
parcel->setMediaAutoScale(media_auto_scale);
parcel->setMediaLoop(media_loop);
// Don't filter or play if not already playing.
if (sMediaImpl.notNull())
{
if (gSavedSettings.getBOOL("MediaEnableFilter"))
{
llinfos << "Parcel media changed. Filtering media URL." << llendl;
filterMediaUrl(parcel);
}
else
{
llinfos << "Parcel media changed. Media filter disabled, playing." << llendl;
play(parcel);
}
}
}
}
}