Kaydet (Commit) 3d246af8 authored tarafından Minh Ngo's avatar Minh Ngo

Avmedia/VLC: Fixing a bug with a keyframe attaching

Change-Id: Iee28b510a79600e20a7e711d78ca20a216ccc3aa
üst ccea730a
......@@ -312,7 +312,7 @@ void MediaWindowImpl::Resize()
if( xPlayerWindow.is() )
xPlayerWindow->setPosSize( 0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0 );
maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize );
maChildWindow.SetPosSizePixel( Point( 0, 0 ), aPlayerWindowSize );
}
// ---------------------------------------------------------------------
......@@ -373,7 +373,7 @@ void MediaWindowImpl::Paint( const Rectangle& )
if( pLogo && !pLogo->IsEmpty() && ( aVideoRect.GetWidth() > 0 ) && ( aVideoRect.GetHeight() > 0 ) )
{
Size aLogoSize( pLogo->GetSizePixel() );
const Color aBackgroundColor( 0, 0, 0 );
const Color aBackgroundColor( 67, 67, 67 );
SetLineColor( aBackgroundColor );
SetFillColor( aBackgroundColor );
......
......@@ -189,7 +189,6 @@ namespace
void SAL_CALL VLCPlayer::setWindowID( const intptr_t windowID )
{
::osl::MutexGuard aGuard( m_aMutex );
mPrevWinID = windowID;
mPlayer.stop();
mPlayer.setWindow( windowID );
}
......@@ -206,14 +205,21 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
::osl::MutexGuard aGuard( m_aMutex );
const intptr_t winID = GetWindowID( aArguments );
VLCWindow * const window = new VLCWindow( *this, mPrevWinID );
VLCWindow * window;
if ( mPrevWinID == 0 )
{
mPrevWinID = winID;
window = new VLCWindow( *this, 0 );
}
else
window = new VLCWindow( *this, mPrevWinID );
if ( winID != -1 )
{
setWindowID( winID );
}
return uno::Reference< css::media::XPlayerWindow >( window );
return ::com::sun::star::uno::Reference< css::media::XPlayerWindow >( window );
}
uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabber()
......
......@@ -22,7 +22,8 @@ VLCWindow::VLCWindow( VLCPlayer& player, const intptr_t prevWinID )
VLCWindow::~VLCWindow()
{
mPlayer.setWindowID( mPrevWinID );
if ( mPrevWinID != 0 )
mPlayer.setWindowID( mPrevWinID );
}
void SAL_CALL VLCWindow::update() throw (css::uno::RuntimeException)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment