本文整理汇总了C++中VlcProc::getStreamArtVar方法的典型用法代码示例。如果您正苦于以下问题:C++ VlcProc::getStreamArtVar方法的具体用法?C++ VlcProc::getStreamArtVar怎么用?C++ VlcProc::getStreamArtVar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VlcProc
的用法示例。
在下文中一共展示了VlcProc::getStreamArtVar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CtrlFlat
CtrlImage::CtrlImage( intf_thread_t *pIntf, GenericBitmap &rBitmap,
CmdGeneric &rCommand, resize_t resizeMethod,
const UString &rHelp, VarBool *pVisible, bool art ):
CtrlFlat( pIntf, rHelp, pVisible ),
m_pBitmap( &rBitmap ), m_pOriginalBitmap( &rBitmap ),
m_rCommand( rCommand ), m_resizeMethod( resizeMethod ), m_art( art ),
m_x( 0 ), m_y( 0 )
{
if( m_art )
{
// art file if any will overwrite the original image
VlcProc *pVlcProc = VlcProc::instance( getIntf() );
ArtManager* pArtManager = ArtManager::instance( getIntf() );
// add observer
pVlcProc->getStreamArtVar().addObserver( this );
// retrieve initial state of art file
std::string str = pVlcProc->getStreamArtVar().get();
GenericBitmap* pArt = (GenericBitmap*) pArtManager->getArtBitmap( str );
if( pArt )
{
m_pBitmap = pArt;
msg_Dbg( getIntf(), "art file %s to be displayed (wxh = %ix%i)",
str.c_str(), m_pBitmap->getWidth(), m_pBitmap->getHeight() );
}
}
// Create the initial image
m_pImage = OSFactory::instance( getIntf() )->createOSGraphics(
m_pBitmap->getWidth(),
m_pBitmap->getHeight() );
m_pImage->drawBitmap( *m_pBitmap );
}
示例2: onUpdate
void CtrlImage::onUpdate( Subject<VarString> &rVariable, void* arg )
{
(void)arg;
VlcProc *pVlcProc = VlcProc::instance( getIntf() );
if( &rVariable == &pVlcProc->getStreamArtVar() )
{
std::string str = ((VarString&)rVariable).get();
ArtManager* pArtManager = ArtManager::instance( getIntf() );
GenericBitmap* pArt = (GenericBitmap*) pArtManager->getArtBitmap( str );
m_pBitmap = pArt ? pArt : m_pOriginalBitmap;
msg_Dbg( getIntf(), "art file %s to be displayed (wxh = %ix%i)",
str.c_str(),
m_pBitmap->getWidth(),
m_pBitmap->getHeight() );
delete m_pImage;
m_pImage = OSFactory::instance( getIntf() )->createOSGraphics(
m_pBitmap->getWidth(),
m_pBitmap->getHeight() );
m_pImage->drawBitmap( *m_pBitmap );
notifyLayout();
}
}
示例3: getIntf
CtrlImage::~CtrlImage()
{
delete m_pImage;
if( m_art )
{
VlcProc *pVlcProc = VlcProc::instance( getIntf() );
pVlcProc->getStreamArtVar().delObserver( this );
}
}