Kaydet (Commit) d9376e1f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite; Mac-specific code)

Change-Id: Ib50c9415e1ddd0e6cabc1b737a39a7d101014da9
üst 551433e7
...@@ -34,7 +34,7 @@ namespace avmedia { namespace macavf { ...@@ -34,7 +34,7 @@ namespace avmedia { namespace macavf {
// ---------------- // ----------------
FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& /*rxMgr*/ ) FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& /*rxMgr*/ )
: mpImageGen( NULL ) : mpImageGen( nullptr )
{} {}
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
...@@ -90,12 +90,12 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe ...@@ -90,12 +90,12 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
OSL_TRACE( "AVPlayer::grabFrame( %.3fsec)", fMediaTime ); OSL_TRACE( "AVPlayer::grabFrame( %.3fsec)", fMediaTime );
// get the requested image from the movie // get the requested image from the movie
CGImage* pCGImage = [mpImageGen copyCGImageAtTime:CMTimeMakeWithSeconds(fMediaTime,1000) actualTime:NULL error:NULL]; CGImage* pCGImage = [mpImageGen copyCGImageAtTime:CMTimeMakeWithSeconds(fMediaTime,1000) actualTime:nullptr error:nullptr];
// convert the image to a TIFF-formatted byte-array // convert the image to a TIFF-formatted byte-array
CFMutableDataRef pCFData = CFDataCreateMutable( kCFAllocatorDefault, 0 ); CFMutableDataRef pCFData = CFDataCreateMutable( kCFAllocatorDefault, 0 );
CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( pCFData, kUTTypeTIFF, 1, 0 ); CGImageDestination* pCGImgDest = CGImageDestinationCreateWithData( pCFData, kUTTypeTIFF, 1, nullptr );
CGImageDestinationAddImage( pCGImgDest, pCGImage, NULL ); CGImageDestinationAddImage( pCGImgDest, pCGImage, nullptr );
CGImageDestinationFinalize( pCGImgDest ); CGImageDestinationFinalize( pCGImgDest );
CFRelease( pCGImgDest ); CFRelease( pCGImgDest );
const long nBitmapLen = CFDataGetLength( pCFData ); const long nBitmapLen = CFDataGetLength( pCFData );
......
...@@ -30,7 +30,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno: ...@@ -30,7 +30,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaMacAVF_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaMacAVF_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
{ {
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0; void* pRet = nullptr;
if( rtl_str_compare( pImplName, AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME ) == 0 ) if( rtl_str_compare( pImplName, AVMEDIA_MACAVF_MANAGER_IMPLEMENTATIONNAME ) == 0 )
{ {
......
...@@ -60,7 +60,7 @@ using namespace ::com::sun::star; ...@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
namespace avmedia { namespace macavf { namespace avmedia { namespace macavf {
MacAVObserverObject* MacAVObserverHandler::mpMacAVObserverObject = NULL; MacAVObserverObject* MacAVObserverHandler::mpMacAVObserverObject = nullptr;
MacAVObserverObject* MacAVObserverHandler::getObserver() MacAVObserverObject* MacAVObserverHandler::getObserver()
{ {
...@@ -79,7 +79,7 @@ MacAVObserverObject* MacAVObserverHandler::getObserver() ...@@ -79,7 +79,7 @@ MacAVObserverObject* MacAVObserverHandler::getObserver()
Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr )
: mxMgr( rxMgr ) : mxMgr( rxMgr )
, mpPlayer( NULL ) , mpPlayer( nullptr )
, mfUnmutedVolume( 0 ) , mfUnmutedVolume( 0 )
, mfStopTime( DBL_MAX ) , mfStopTime( DBL_MAX )
, mbMuted( false ) , mbMuted( false )
...@@ -380,7 +380,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co ...@@ -380,7 +380,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
// check the window parameters // check the window parameters
uno::Reference< ::media::XPlayerWindow > xRet; uno::Reference< ::media::XPlayerWindow > xRet;
if( (aSize.Width <= 0) || (aSize.Height <= 0) || (pParentView == NULL) ) if( (aSize.Width <= 0) || (aSize.Height <= 0) || (pParentView == nullptr) )
return xRet; return xRet;
// create the window // create the window
......
...@@ -39,7 +39,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla ...@@ -39,7 +39,7 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla
, mrPlayer( i_rPlayer ) , mrPlayer( i_rPlayer )
, mnPointerType( awt::SystemPointer::ARROW ) , mnPointerType( awt::SystemPointer::ARROW )
, mpView( i_pParentView ) , mpView( i_pParentView )
, mpPlayerLayer( NULL ) , mpPlayerLayer( nullptr )
{ {
OSL_TRACE ("Constructing an avmedia::macavf::Window"); OSL_TRACE ("Constructing an avmedia::macavf::Window");
if( !mpView ) // sanity check if( !mpView ) // sanity check
......
...@@ -34,7 +34,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno: ...@@ -34,7 +34,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
{ {
uno::Reference< lang::XSingleServiceFactory > xFactory; uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0; void* pRet = nullptr;
if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 ) if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 )
{ {
......
...@@ -31,13 +31,13 @@ namespace avmedia { namespace quicktime { ...@@ -31,13 +31,13 @@ namespace avmedia { namespace quicktime {
static ::osl::Mutex& ImplGetOwnStaticMutex() static ::osl::Mutex& ImplGetOwnStaticMutex()
{ {
static ::osl::Mutex* pMutex = NULL; static ::osl::Mutex* pMutex = nullptr;
if( pMutex == NULL ) if( pMutex == nullptr )
{ {
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if( pMutex == NULL ) if( pMutex == nullptr )
{ {
static ::osl::Mutex aMutex; static ::osl::Mutex aMutex;
pMutex = &aMutex; pMutex = &aMutex;
......
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