summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/common/directshowpin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/directshow/common/directshowpin.cpp')
-rw-r--r--src/plugins/directshow/common/directshowpin.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/plugins/directshow/common/directshowpin.cpp b/src/plugins/directshow/common/directshowpin.cpp
index 508a9b21d..617cc2cf2 100644
--- a/src/plugins/directshow/common/directshowpin.cpp
+++ b/src/plugins/directshow/common/directshowpin.cpp
@@ -52,7 +52,7 @@ DirectShowPin::DirectShowPin(DirectShowBaseFilter *filter, const QString &name,
, m_filter(filter)
, m_name(name)
, m_direction(direction)
- , m_peerPin(NULL)
+ , m_peerPin(nullptr)
{
}
@@ -76,11 +76,11 @@ HRESULT DirectShowPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
if (pd == m_direction)
return VFW_E_INVALID_DIRECTION;
- if (pmt != NULL && DirectShowMediaType::isPartiallySpecified(pmt)) {
+ if (pmt != nullptr && DirectShowMediaType::isPartiallySpecified(pmt)) {
// If the type is fully specified, use it
hr = tryConnect(pReceivePin, pmt);
} else {
- IEnumMediaTypes *enumMediaTypes = NULL;
+ IEnumMediaTypes *enumMediaTypes = nullptr;
// First, try the receiving pin's preferred types
if (SUCCEEDED(pReceivePin->EnumMediaTypes(&enumMediaTypes))) {
@@ -108,13 +108,13 @@ HRESULT DirectShowPin::tryMediaTypes(IPin *pin, const AM_MEDIA_TYPE *partialType
if (FAILED(hr))
return hr;
- AM_MEDIA_TYPE *mediaType = NULL;
+ AM_MEDIA_TYPE *mediaType = nullptr;
ULONG mediaCount = 0;
HRESULT hrFailure = VFW_E_NO_ACCEPTABLE_TYPES;
for (; enumMediaTypes->Next(1, &mediaType, &mediaCount) == S_OK;) {
- if (mediaType && (partialType == NULL || DirectShowMediaType::isCompatible(mediaType, partialType))) {
+ if (mediaType && (partialType == nullptr || DirectShowMediaType::isCompatible(mediaType, partialType))) {
hr = tryConnect(pin, mediaType);
if (FAILED(hr) && (hr != E_FAIL)
@@ -157,8 +157,8 @@ HRESULT DirectShowPin::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
if (FAILED(hr)) {
connectionEnded();
m_peerPin->Release();
- m_peerPin = NULL;
- setMediaType(NULL);
+ m_peerPin = nullptr;
+ setMediaType(nullptr);
return hr;
}
@@ -197,8 +197,8 @@ HRESULT DirectShowPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *
if (FAILED(hr)) {
connectionEnded();
m_peerPin->Release();
- m_peerPin = NULL;
- setMediaType(NULL);
+ m_peerPin = nullptr;
+ setMediaType(nullptr);
return hr;
}
@@ -218,9 +218,9 @@ HRESULT DirectShowPin::Disconnect()
return hr;
m_peerPin->Release();
- m_peerPin = NULL;
+ m_peerPin = nullptr;
- setMediaType(NULL);
+ setMediaType(nullptr);
return S_OK;
}
@@ -380,8 +380,8 @@ HRESULT DirectShowPin::setActive(bool active)
DirectShowOutputPin::DirectShowOutputPin(DirectShowBaseFilter *filter, const QString &name)
: DirectShowPin(filter, name, PINDIR_OUTPUT)
- , m_allocator(NULL)
- , m_inputPin(NULL)
+ , m_allocator(nullptr)
+ , m_inputPin(nullptr)
{
}
@@ -393,8 +393,8 @@ HRESULT DirectShowOutputPin::completeConnection(IPin *pin)
if (!pin)
return E_POINTER;
- Q_ASSERT(m_inputPin == NULL);
- Q_ASSERT(m_allocator == NULL);
+ Q_ASSERT(m_inputPin == nullptr);
+ Q_ASSERT(m_allocator == nullptr);
HRESULT hr = pin->QueryInterface(IID_PPV_ARGS(&m_inputPin));
if (FAILED(hr))
@@ -423,7 +423,7 @@ HRESULT DirectShowOutputPin::completeConnection(IPin *pin)
}
m_allocator->Release();
- m_allocator = NULL;
+ m_allocator = nullptr;
}
// Otherwise, allocate its own allocator
@@ -441,7 +441,7 @@ HRESULT DirectShowOutputPin::completeConnection(IPin *pin)
}
m_allocator->Release();
- m_allocator = NULL;
+ m_allocator = nullptr;
}
return hr;
@@ -455,12 +455,12 @@ HRESULT DirectShowOutputPin::connectionEnded()
return hr;
m_allocator->Release();
- m_allocator = NULL;
+ m_allocator = nullptr;
}
if (m_inputPin) {
m_inputPin->Release();
- m_inputPin = NULL;
+ m_inputPin = nullptr;
}
return S_OK;
@@ -485,7 +485,7 @@ HRESULT DirectShowOutputPin::EndOfStream()
DirectShowInputPin::DirectShowInputPin(DirectShowBaseFilter *filter, const QString &name)
: DirectShowPin(filter, name, PINDIR_INPUT)
- , m_allocator(NULL)
+ , m_allocator(nullptr)
, m_flushing(false)
, m_inErrorState(false)
{
@@ -502,7 +502,7 @@ HRESULT DirectShowInputPin::connectionEnded()
return hr;
m_allocator->Release();
- m_allocator = NULL;
+ m_allocator = nullptr;
}
return S_OK;