本文整理汇总了C++中LLPluginClassMedia类的典型用法代码示例。如果您正苦于以下问题:C++ LLPluginClassMedia类的具体用法?C++ LLPluginClassMedia怎么用?C++ LLPluginClassMedia使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LLPluginClassMedia类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getMediaPlugin
////////////////////////////////////////////////////////////////////////////////
// virtual
void
LLViewerMediaImpl::paste()
{
LLPluginClassMedia* plugin = getMediaPlugin();
if (plugin)
plugin->paste();
}
示例2: needsRender
BOOL LLWebBrowserTexture::needsRender()
{
bool texture_dirty = false;
if ( mWebBrowserCtrl->getFrequentUpdates() ||
mWebBrowserCtrl->getAlwaysRefresh() ||
mWebBrowserCtrl->getForceUpdate() )
{
// All of these force an update
return TRUE;
}
// If the texture needs updating, render needs to be called.
if (mMediaSource && mMediaSource->hasMedia())
{
LLPluginClassMedia* media = mMediaSource->getMediaPlugin();
if(media->textureValid() && media->getDirty())
{
texture_dirty = true;
}
}
return texture_dirty;
}
示例3: buildURLHistory
void LLFloaterHelpBrowser::buildURLHistory()
{
// Get all of the entries in the "browser" collection
LLSD browser_history = LLURLHistory::getURLHistory("browser");
// initialize URL history in the plugin
LLPluginClassMedia *plugin = mBrowser->getMediaPlugin();
if (plugin)
{
plugin->initializeUrlHistory(browser_history);
}
}
示例4: onClickPlay
//static
void LLFloaterMediaBrowser::onClickPlay(void* user_data)
{
LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
LLPluginClassMedia* plugin = self->mBrowser->getMediaPlugin();
if(plugin)
{
if(plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING)
{
plugin->pause();
}
else
{
plugin->start();
}
}
}
示例5: mouseButton
void mouseButton( int button, int state, int x, int y )
{
// Texture has been scaled so it's 1:1 with screen pixels, so no need to scale mouse coords here.
// x = ( x * mAppTextureWidth ) / mAppWindowWidth;
// y = ( y * mAppTextureHeight ) / mAppWindowHeight;
if ( button == GLUT_LEFT_BUTTON )
{
if ( state == GLUT_DOWN )
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, x, y, getModifiers());
else if ( state == GLUT_UP )
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, x, y, getModifiers());
}
// force a GLUT update
glutPostRedisplay();
};
示例6: 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);
}
}
}
示例7: mouseMove
void mouseMove( int x , int y )
{
// Texture has been scaled so it's 1:1 with screen pixels, so no need to scale mouse coords here.
// x = ( x * mAppTextureWidth ) / mAppWindowWidth;
// y = ( y * mAppTextureHeight ) / mAppWindowHeight;
// GLUT complains if I get the keyboard modifiers here, so just pretend there aren't any.
mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, x, y, 0);
// force a GLUT update
glutPostRedisplay();
};
示例8: createTexture
void createTexture()
{
// create the texture used to display the browser data
if(mMediaSource->textureValid())
{
mAppTextureWidth = mMediaSource->getTextureWidth();
mAppTextureHeight = mMediaSource->getTextureHeight();
mAppTextureCoordsOpenGL = mMediaSource->getTextureCoordsOpenGL();
if(mAppTexture != 0)
{
glDeleteTextures( 1, &mAppTexture );
mAppTexture = 0;
}
glGenTextures( 1, &mAppTexture );
glBindTexture( GL_TEXTURE_2D, mAppTexture );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexImage2D( GL_TEXTURE_2D, 0,
mMediaSource->getTextureFormatInternal(),
mAppTextureWidth,
mAppTextureHeight,
0,
mMediaSource->getTextureFormatPrimary(),
mMediaSource->getTextureFormatType(),
NULL );
}
}