summaryrefslogtreecommitdiff
path: root/avmedia
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:09:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:15 +0100
commit8697284d248f47dd4798f7ef49791fc7686f646d (patch)
tree3cc7278e7160aa96242b03dcc683f0ff5f235aa7 /avmedia
parentcb0fb3edd43194311a76ad6c0d3adad7f6dfe53d (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: Ib3f24439ffda42d217300dcc0ca979964ade360a
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/framework/mediacontrol.cxx4
-rw-r--r--avmedia/source/framework/mediamisc.cxx2
-rw-r--r--avmedia/source/framework/mediaplayer.cxx6
-rw-r--r--avmedia/source/framework/modeltools.cxx2
-rw-r--r--avmedia/source/framework/soundhandler.cxx6
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx18
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx42
-rw-r--r--avmedia/source/gstreamer/gstuno.cxx2
-rw-r--r--avmedia/source/gstreamer/gstwindow.cxx6
-rw-r--r--avmedia/source/opengl/oglplayer.cxx10
-rw-r--r--avmedia/source/opengl/ogluno.cxx2
-rw-r--r--avmedia/source/viewer/mediaevent_impl.cxx2
-rw-r--r--avmedia/source/viewer/mediawindow_impl.cxx8
-rw-r--r--avmedia/source/viewer/mediawindow_impl.hxx2
-rw-r--r--avmedia/source/vlc/vlcmanager.cxx2
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx4
-rw-r--r--avmedia/source/vlc/vlcuno.cxx6
-rw-r--r--avmedia/source/vlc/wrapper/Common.cxx2
-rw-r--r--avmedia/source/vlc/wrapper/Instance.cxx2
-rw-r--r--avmedia/source/vlc/wrapper/Media.cxx2
-rw-r--r--avmedia/source/vlc/wrapper/Player.cxx4
-rw-r--r--avmedia/source/vlc/wrapper/SymbolLoader.hxx2
22 files changed, 68 insertions, 68 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index d8efcf2a3b03..8d542290fb13 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -200,7 +200,7 @@ MediaControl::~MediaControl()
void MediaControl::dispose()
{
- maZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, NULL );
+ maZoomToolBox->SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, nullptr );
mpZoomListBox.disposeAndClear();
maTimeEdit.disposeAndClear();
maZoomToolBox.disposeAndClear();
@@ -485,7 +485,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
OUString aURL;
if (::avmedia::MediaWindow::executeMediaURLDialog(
- GetParent(), aURL, 0))
+ GetParent(), aURL, nullptr))
{
if( !::avmedia::MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
::avmedia::MediaWindow::executeFormatErrorBox( this );
diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx
index 7fd6a9c61c6f..6733313ed318 100644
--- a/avmedia/source/framework/mediamisc.cxx
+++ b/avmedia/source/framework/mediamisc.cxx
@@ -28,7 +28,7 @@ namespace avmedia {
ResMgr* GetResMgr()
{
- static ResMgr* pResMgr = NULL;
+ static ResMgr* pResMgr = nullptr;
if( !pResMgr )
{
diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx
index b9c4ad4126c7..c39af428e92e 100644
--- a/avmedia/source/framework/mediaplayer.cxx
+++ b/avmedia/source/framework/mediaplayer.cxx
@@ -80,7 +80,7 @@ MediaFloater::~MediaFloater()
void MediaFloater::dispose()
{
delete mpMediaWindow;
- mpMediaWindow = NULL;
+ mpMediaWindow = nullptr;
SfxDockingWindow::dispose();
}
@@ -103,7 +103,7 @@ void MediaFloater::ToggleFloatingMode()
if (mpMediaWindow)
mpMediaWindow->updateMediaItem( aRestoreItem );
delete mpMediaWindow;
- mpMediaWindow = NULL;
+ mpMediaWindow = nullptr;
SfxDockingWindow::ToggleFloatingMode();
@@ -145,7 +145,7 @@ void MediaFloater::dispatchCurrentURL()
if( pDispatcher )
{
OUString url;
- if (mpMediaWindow != 0) {
+ if (mpMediaWindow != nullptr) {
url = mpMediaWindow->getURL();
}
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, url );
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index 40d48a2c97ac..4d348c343ac0 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -140,7 +140,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, uno::Reference<embed:
// Create a temp file with which json parser can work.
OUString sTempFileURL;
const ::osl::FileBase::RC aErr =
- ::osl::FileBase::createTempFile(0, 0, &sTempFileURL);
+ ::osl::FileBase::createTempFile(nullptr, nullptr, &sTempFileURL);
if (::osl::FileBase::E_None != aErr)
{
SAL_WARN("avmedia.opengl", "Cannot create temp file");
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx
index fd78096ec9a1..e0e5133f7232 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -82,13 +82,13 @@ css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes() throw( cs
/* And we don't must use a mutex at every call! */
/* For the first call; pTypeCollection is NULL - */
/* for the second call pTypeCollection is different from NULL! */
- static ::cppu::OTypeCollection* pTypeCollection = NULL ;
- if ( pTypeCollection == NULL )
+ static ::cppu::OTypeCollection* pTypeCollection = nullptr ;
+ if ( pTypeCollection == nullptr )
{
/* Ready for multithreading; get global mutex for first call of this method only! see before */
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
/* Control these pointer again ... it can be, that another instance will be faster then these! */
- if ( pTypeCollection == NULL )
+ if ( pTypeCollection == nullptr )
{
/* Create a static typecollection ... */
static ::cppu::OTypeCollection aTypeCollection
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index f240530edafc..17ca6b43f90a 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -45,11 +45,11 @@ namespace avmedia { namespace gstreamer {
void FrameGrabber::disposePipeline()
{
- if( mpPipeline != NULL )
+ if( mpPipeline != nullptr )
{
gst_element_set_state( mpPipeline, GST_STATE_NULL );
g_object_unref( G_OBJECT( mpPipeline ) );
- mpPipeline = NULL;
+ mpPipeline = nullptr;
}
}
@@ -69,9 +69,9 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) :
#endif
OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- GError *pError = NULL;
+ GError *pError = nullptr;
mpPipeline = gst_parse_launch( pPipelineStr, &pError );
- if( pError != NULL) {
+ if( pError != nullptr) {
g_warning( "Failed to construct frame-grabber pipeline '%s'\n", pError->message );
g_error_free( pError );
disposePipeline();
@@ -90,7 +90,7 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) :
}
}
if( mpPipeline &&
- gst_element_get_state( mpPipeline, NULL, NULL, 5 * GST_SECOND ) == GST_STATE_CHANGE_FAILURE )
+ gst_element_get_state( mpPipeline, nullptr, nullptr, 5 * GST_SECOND ) == GST_STATE_CHANGE_FAILURE )
disposePipeline();
}
@@ -122,8 +122,8 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
if( !pSink )
return xRet;
- GstBuffer *pBuf = NULL;
- GstCaps *pCaps = NULL;
+ GstBuffer *pBuf = nullptr;
+ GstCaps *pCaps = nullptr;
// synchronously fetch the frame
#ifdef AVMEDIA_GST_0_10
@@ -131,7 +131,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
if( pBuf )
pCaps = GST_BUFFER_CAPS( pBuf );
#else
- GstSample *pSample = NULL;
+ GstSample *pSample = nullptr;
g_signal_emit_by_name( pSink, "pull-preroll", &pSample, NULL );
if( pSample )
@@ -164,7 +164,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe
#endif
)
{
- sal_uInt8 *pData = NULL;
+ sal_uInt8 *pData = nullptr;
#ifdef AVMEDIA_GST_0_10
pData = GST_BUFFER_DATA( pBuf );
#else
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index e458c1590c9e..ffac2987cb2e 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -288,7 +288,7 @@ void MissingPluginInstallerThread::execute() {
Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
GstPlayer_BASE( m_aMutex ),
mxMgr( rxMgr ),
- mpPlaybin( NULL ),
+ mpPlaybin( nullptr ),
mbFakeVideo (false ),
mnUnmutedVolume( 0 ),
mbPlayPending ( false ),
@@ -296,7 +296,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
mbLooping( false ),
mbInitialized( false ),
mnWindowID( 0 ),
- mpXOverlay( NULL ),
+ mpXOverlay( nullptr ),
mnDuration( 0 ),
mnWidth( 0 ),
mnHeight( 0 ),
@@ -308,13 +308,13 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
char name[] = "libreoffice";
char *arguments[] = { name };
char** argv = arguments;
- GError* pError = NULL;
+ GError* pError = nullptr;
mbInitialized = gst_init_check( &argc, &argv, &pError );
DBG( "%p Player::Player", this );
- if (pError != NULL)
+ if (pError != nullptr)
{
// TODO: throw an exception?
DBG( "%p Player::Player error '%s'", this, pError->message );
@@ -349,12 +349,12 @@ void SAL_CALL Player::disposing()
gst_element_set_state( mpPlaybin, GST_STATE_NULL );
g_object_unref( G_OBJECT( mpPlaybin ) );
- mpPlaybin = NULL;
+ mpPlaybin = nullptr;
}
if( mpXOverlay ) {
g_object_unref( G_OBJECT ( mpXOverlay ) );
- mpXOverlay = NULL;
+ mpXOverlay = nullptr;
}
}
@@ -394,7 +394,7 @@ void Player::processMessage( GstMessage *message )
if( message->src == GST_OBJECT( mpPlaybin ) ) {
GstState newstate, pendingstate;
- gst_message_parse_state_changed (message, NULL, &newstate, &pendingstate);
+ gst_message_parse_state_changed (message, nullptr, &newstate, &pendingstate);
if( newstate == GST_STATE_PAUSED &&
pendingstate == GST_STATE_VOID_PENDING &&
@@ -471,7 +471,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
if( message->src == GST_OBJECT( mpPlaybin ) ) {
GstState newstate, pendingstate;
- gst_message_parse_state_changed (message, NULL, &newstate, &pendingstate);
+ gst_message_parse_state_changed (message, nullptr, &newstate, &pendingstate);
DBG( "%p state change received, new state %d pending %d", this,
(int)newstate, (int)pendingstate );
@@ -487,11 +487,11 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
}
if( mnWidth == 0 ) {
- GList *pStreamInfo = NULL;
+ GList *pStreamInfo = nullptr;
g_object_get( G_OBJECT( mpPlaybin ), "stream-info", &pStreamInfo, NULL );
- for ( ; pStreamInfo != NULL; pStreamInfo = pStreamInfo->next) {
+ for ( ; pStreamInfo != nullptr; pStreamInfo = pStreamInfo->next) {
GObject *pInfo = G_OBJECT( pStreamInfo->data );
if( !pInfo )
@@ -530,7 +530,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage *message )
mnDuration = gst_duration;
}
if( mnWidth == 0 ) {
- GstPad *pad = NULL;
+ GstPad *pad = nullptr;
g_signal_emit_by_name( mpPlaybin, "get-video-pad", 0, &pad );
@@ -576,14 +576,14 @@ void Player::preparePlaybin( const OUString& rURL, GstElement *pSink )
{
GstBus *pBus;
- if( mpPlaybin != NULL ) {
+ if( mpPlaybin != nullptr ) {
gst_element_set_state( mpPlaybin, GST_STATE_NULL );
mbPlayPending = false;
g_object_unref( mpPlaybin );
}
- mpPlaybin = gst_element_factory_make( "playbin", NULL );
- if( pSink != NULL ) // used for getting preferred size etc.
+ mpPlaybin = gst_element_factory_make( "playbin", nullptr );
+ if( pSink != nullptr ) // used for getting preferred size etc.
{
g_object_set( G_OBJECT( mpPlaybin ), "video-sink", pSink, NULL );
mbFakeVideo = true;
@@ -606,7 +606,7 @@ void Player::preparePlaybin( const OUString& rURL, GstElement *pSink )
#ifdef AVMEDIA_GST_0_10
gst_bus_set_sync_handler( pBus, pipeline_bus_sync_handler, this );
#else
- gst_bus_set_sync_handler( pBus, pipeline_bus_sync_handler, this, NULL );
+ gst_bus_set_sync_handler( pBus, pipeline_bus_sync_handler, this, nullptr );
#endif
g_object_unref( pBus );
}
@@ -622,7 +622,7 @@ bool Player::create( const OUString& rURL )
if( mbInitialized && !rURL.isEmpty() )
{
// fakesink for pre-roll & sizing ...
- preparePlaybin( rURL, gst_element_factory_make( "fakesink", NULL ) );
+ preparePlaybin( rURL, gst_element_factory_make( "fakesink", nullptr ) );
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
mbPlayPending = false;
@@ -646,7 +646,7 @@ void SAL_CALL Player::start()
::osl::MutexGuard aGuard(m_aMutex);
// set the pipeline state to READY and run the loop
- if( mbInitialized && NULL != mpPlaybin )
+ if( mbInitialized && nullptr != mpPlaybin )
{
gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
mbPlayPending = true;
@@ -879,7 +879,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
awt::Size aSize( getPreferredPlayerWindowSize() );
if( mbFakeVideo )
- preparePlaybin( maURL, NULL );
+ preparePlaybin( maURL, nullptr );
DBG( "Player::createPlayerWindow %d %d length: %d", aSize.Width, aSize.Height, rArguments.getLength() );
@@ -894,14 +894,14 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co
sal_IntPtr pIntPtr = 0;
rArguments[ 2 ] >>= pIntPtr;
SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
- const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : NULL;
+ const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr;
OSL_ASSERT(pEnvData);
if (pEnvData)
{
mnWindowID = pEnvData->aWindow;
DBG( "set window id to %d XOverlay %p\n", (int)mnWindowID, mpXOverlay);
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
- if ( mpXOverlay != NULL )
+ if ( mpXOverlay != nullptr )
gst_video_overlay_set_window_handle( mpXOverlay, mnWindowID );
}
}
@@ -916,7 +916,7 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber()
throw (uno::RuntimeException, std::exception)
{
::osl::MutexGuard aGuard(m_aMutex);
- FrameGrabber* pFrameGrabber = NULL;
+ FrameGrabber* pFrameGrabber = nullptr;
const awt::Size aPrefSize( getPreferredPlayerWindowSize() );
if( ( aPrefSize.Width > 0 ) && ( aPrefSize.Height > 0 ) )
diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx
index b72a355d5a4d..ba3ecc8d3f3b 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -42,7 +42,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediagst_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
+ void* pRet = nullptr;
if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index e3c5cc96f980..bee5f0a7ff0c 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -33,13 +33,13 @@ namespace avmedia { namespace gstreamer {
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() );
- if( pMutex == NULL )
+ if( pMutex == nullptr )
{
static ::osl::Mutex aMutex;
pMutex = &aMutex;
diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index a8854d2e3a7c..df1a78d933b6 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -27,9 +27,9 @@ namespace avmedia { namespace ogl {
OGLPlayer::OGLPlayer()
: Player_BASE(m_aMutex)
- , m_pHandle(NULL)
+ , m_pHandle(nullptr)
, m_xContext(OpenGLContext::Create())
- , m_pOGLWindow(NULL)
+ , m_pOGLWindow(nullptr)
, m_bIsRendering(false)
{
}
@@ -97,7 +97,7 @@ bool OGLPlayer::create( const OUString& rURL )
Graphic aGraphic;
if( aFilter.ImportGraphic(aGraphic, INetURLObject(sFilesURL)) != GRFILTER_OK )
{
- rFile.buffer = 0;
+ rFile.buffer = nullptr;
rFile.imagewidth = 0;
rFile.imageheight = 0;
SAL_WARN("avmedia.opengl", "Can't load texture file: " + sFilesURL);
@@ -113,7 +113,7 @@ bool OGLPlayer::create( const OUString& rURL )
{
if( !lcl_LoadFile(&rFile, sFilesURL) )
{
- rFile.buffer = 0;
+ rFile.buffer = nullptr;
rFile.size = 0;
SAL_WARN("avmedia.opengl", "Can't load glTF file: " + sFilesURL);
return false;
@@ -135,7 +135,7 @@ void OGLPlayer::releaseInputFiles()
for (size_t i = 0; i < m_vInputFiles.size() && m_vInputFiles[i].buffer; ++i)
{
delete [] m_vInputFiles[i].buffer;
- m_vInputFiles[i].buffer = 0;
+ m_vInputFiles[i].buffer = nullptr;
}
m_vInputFiles.clear();
}
diff --git a/avmedia/source/opengl/ogluno.cxx b/avmedia/source/opengl/ogluno.cxx
index ca2b7127d21e..17b8ea966010 100644
--- a/avmedia/source/opengl/ogluno.cxx
+++ b/avmedia/source/opengl/ogluno.cxx
@@ -23,7 +23,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
+ void* pRet = nullptr;
if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_OpenGL" ) == 0 )
{
diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx
index 61d75f60df03..415af5527b5d 100644
--- a/avmedia/source/viewer/mediaevent_impl.cxx
+++ b/avmedia/source/viewer/mediaevent_impl.cxx
@@ -46,7 +46,7 @@ MediaEventListenersImpl::~MediaEventListenersImpl()
void MediaEventListenersImpl::cleanUp()
{
Application::RemoveMouseAndKeyEvents( reinterpret_cast< vcl::Window* >( mpNotifyWindow.get() ) );
- mpNotifyWindow = NULL;
+ mpNotifyWindow = nullptr;
}
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 8340e8262735..dbf34150187b 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -170,12 +170,12 @@ void MediaWindowImpl::dispose()
mxPlayer.clear();
- mpMediaWindow = NULL;
+ mpMediaWindow = nullptr;
delete mpEmptyBmpEx;
- mpEmptyBmpEx = NULL;
+ mpEmptyBmpEx = nullptr;
delete mpAudioBmpEx;
- mpAudioBmpEx = NULL;
+ mpAudioBmpEx = nullptr;
mpMediaWindowControl.disposeAndClear();
mpChildWindow.disposeAndClear();
@@ -639,7 +639,7 @@ void MediaWindowImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&
if (mxPlayerWindow.is())
mxPlayerWindow->update();
- BitmapEx* pLogo = NULL;
+ BitmapEx* pLogo = nullptr;
if (!mxPlayer.is())
{
diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx
index 9e51a674b29e..ff138024dcd9 100644
--- a/avmedia/source/viewer/mediawindow_impl.hxx
+++ b/avmedia/source/viewer/mediawindow_impl.hxx
@@ -83,7 +83,7 @@ public:
virtual void dispose() override;
- static css::uno::Reference<css::media::XPlayer> createPlayer(const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = 0);
+ static css::uno::Reference<css::media::XPlayer> createPlayer(const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = nullptr);
void setURL(const OUString& rURL, OUString const& rTempURL, OUString const& rReferer);
diff --git a/avmedia/source/vlc/vlcmanager.cxx b/avmedia/source/vlc/vlcmanager.cxx
index b3c922488791..71ac8ab41c51 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -86,7 +86,7 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const rtl::OUSt
throw (uno::RuntimeException, std::exception)
{
if ( !m_is_vlc_found )
- throw uno::RuntimeException("VLC not found", 0);
+ throw uno::RuntimeException("VLC not found", nullptr);
if ( !rURL.isEmpty() )
{
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 99f3634e0328..f20bd612ac8b 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -184,9 +184,9 @@ namespace
SystemChildWindow *pParentWindow = reinterpret_cast< SystemChildWindow* >( pIntPtr );
- const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : NULL;
+ const SystemEnvData* pEnvData = pParentWindow ? pParentWindow->GetSystemData() : nullptr;
- if (pEnvData == NULL)
+ if (pEnvData == nullptr)
return -1;
#if defined MACOSX
diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx
index bfa2c91fd259..b5ceea23fb0c 100644
--- a/avmedia/source/vlc/vlcuno.cxx
+++ b/avmedia/source/vlc/vlcuno.cxx
@@ -36,7 +36,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
// Experimental for now - code is neither elegant nor well tested.
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
- return NULL;
+ return nullptr;
static uno::Reference< uno::XInterface > manager( *new ::avmedia::vlc::Manager( rxFact ) );
return manager;
@@ -45,12 +45,12 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediavlc_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
+ void* pRet = nullptr;
// Experimental for now - code is neither elegant nor well tested.
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
if (!xContext.is() || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext))
- return NULL;
+ return nullptr;
SAL_INFO("avmedia", "Create VLC Media component: '" << pImplName << "'\n");
if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
diff --git a/avmedia/source/vlc/wrapper/Common.cxx b/avmedia/source/vlc/wrapper/Common.cxx
index d021417a8ba8..9dc366c9bcff 100644
--- a/avmedia/source/vlc/wrapper/Common.cxx
+++ b/avmedia/source/vlc/wrapper/Common.cxx
@@ -42,7 +42,7 @@ const char* Common::Version()
const char* Common::LastErrorMessage()
{
const char *errorMsg = libvlc_errmsg();
- return errorMsg == NULL ? AVMEDIA_NO_ERROR : errorMsg;
+ return errorMsg == nullptr ? AVMEDIA_NO_ERROR : errorMsg;
}
}
}
diff --git a/avmedia/source/vlc/wrapper/Instance.cxx b/avmedia/source/vlc/wrapper/Instance.cxx
index 23ddef67469b..db8f1c62c8ee 100644
--- a/avmedia/source/vlc/wrapper/Instance.cxx
+++ b/avmedia/source/vlc/wrapper/Instance.cxx
@@ -38,7 +38,7 @@ namespace wrapper
Instance::Instance( int argc, const char * const argv[] )
: mInstance( libvlc_new( argc, argv ) )
{
- if ( mInstance == NULL)
+ if ( mInstance == nullptr)
{
//TODO: error
}
diff --git a/avmedia/source/vlc/wrapper/Media.cxx b/avmedia/source/vlc/wrapper/Media.cxx
index 0ab140f89da7..4ec575b3347c 100644
--- a/avmedia/source/vlc/wrapper/Media.cxx
+++ b/avmedia/source/vlc/wrapper/Media.cxx
@@ -63,7 +63,7 @@ bool Media::LoadSymbols()
Media::Media( const rtl::OUString& url, Instance& instance )
: mMedia( InitMedia( url, instance ) )
{
- if (mMedia == NULL)
+ if (mMedia == nullptr)
{
// TODO: Error
}
diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx
index dd0fd4cc6783..868ada28fde5 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -136,7 +136,7 @@ namespace wrapper
{
const libvlc_track_description_t *description = libvlc_video_get_track_description( mPlayer );
- for ( ; description->p_next != NULL; description = description->p_next );
+ for ( ; description->p_next != nullptr; description = description->p_next );
libvlc_video_set_track( mPlayer, description->i_id );
}
@@ -145,7 +145,7 @@ namespace wrapper
{
const libvlc_track_description_t *description = libvlc_audio_get_track_description( mPlayer );
- for ( ; description->p_next != NULL; description = description->p_next );
+ for ( ; description->p_next != nullptr; description = description->p_next );
libvlc_audio_set_track( mPlayer, description->i_id );
}
diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
index a3c2aa31a0ed..3cf33b6afb2a 100644
--- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx
+++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
@@ -104,7 +104,7 @@ namespace
SAL_LOADMODULE_DEFAULT );
- if( aModule == NULL)
+ if( aModule == nullptr)
{
SAL_WARN("avmedia", "Cannot load libvlc");
return false;