diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-18 21:39:19 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2009-04-18 21:39:19 +0400 |
commit | 530c6354edabdd19d45d883fee88793664170adf (patch) | |
tree | d1fcf2a4b371465f0c20201a52f33db6367688e7 /src/filters/parser/matroskasplitter | |
parent | f39d30c0b2eba6db09f1d3f66be6fd1eb2d7f5a5 (diff) |
Changed : merge with Beliyaal branch
Added : support for madVR (new Video Renderer)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1048 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/matroskasplitter')
4 files changed, 24 insertions, 19 deletions
diff --git a/src/filters/parser/matroskasplitter/MatroskaFile.cpp b/src/filters/parser/matroskasplitter/MatroskaFile.cpp index 7cc2c9c90..4f611b4f2 100644 --- a/src/filters/parser/matroskasplitter/MatroskaFile.cpp +++ b/src/filters/parser/matroskasplitter/MatroskaFile.cpp @@ -555,7 +555,7 @@ HRESULT SimpleBlock::Parse(CMatroskaNode* pMN, bool fFull) while(pos)
{
MatroskaReader::QWORD len = lens.GetNext(pos);
- CAutoPtr<CBinary> p(new CBinary());
+ CAutoPtr<CBinary> p(DNew CBinary());
p->SetCount((INT_PTR)len);
pMN->Read(p->GetData(), len);
BlockData.AddTail(p);
@@ -985,7 +985,7 @@ HRESULT CSignedLength::Parse(CMatroskaNode* pMN) template<class T>
HRESULT CNode<T>::Parse(CMatroskaNode* pMN)
{
- CAutoPtr<T> p(new T());
+ CAutoPtr<T> p(DNew T());
HRESULT hr = E_OUTOFMEMORY;
if(!p || FAILED(hr = p->Parse(pMN))) return hr;
AddTail(p);
@@ -994,7 +994,7 @@ HRESULT CNode<T>::Parse(CMatroskaNode* pMN) HRESULT CBlockGroupNode::Parse(CMatroskaNode* pMN, bool fFull)
{
- CAutoPtr<BlockGroup> p(new BlockGroup());
+ CAutoPtr<BlockGroup> p(DNew BlockGroup());
HRESULT hr = E_OUTOFMEMORY;
if(!p || FAILED(hr = p->Parse(pMN, fFull))) return hr;
AddTail(p);
@@ -1003,7 +1003,7 @@ HRESULT CBlockGroupNode::Parse(CMatroskaNode* pMN, bool fFull) HRESULT CSimpleBlockNode::Parse(CMatroskaNode* pMN, bool fFull)
{
- CAutoPtr<SimpleBlock> p(new SimpleBlock());
+ CAutoPtr<SimpleBlock> p(DNew SimpleBlock());
HRESULT hr = E_OUTOFMEMORY;
if(!p || FAILED(hr = p->Parse(pMN, fFull))) return hr;
AddTail(p);
@@ -1041,7 +1041,7 @@ CAutoPtr<CMatroskaNode> CMatroskaNode::Child(DWORD id, bool fSearch) {
if(m_len == 0) return CAutoPtr<CMatroskaNode>();
SeekTo(m_start);
- CAutoPtr<CMatroskaNode> pMN(new CMatroskaNode(this));
+ CAutoPtr<CMatroskaNode> pMN(DNew CMatroskaNode(this));
if(id && !pMN->Find(id, fSearch)) pMN.Free();
return pMN;
}
@@ -1119,7 +1119,7 @@ MatroskaReader::QWORD CMatroskaNode::FindPos(DWORD id, MatroskaReader::QWORD sta CAutoPtr<CMatroskaNode> CMatroskaNode::Copy()
{
- CAutoPtr<CMatroskaNode> pNewNode(new CMatroskaNode(m_pMF));
+ CAutoPtr<CMatroskaNode> pNewNode(DNew CMatroskaNode(m_pMF));
pNewNode->m_pParent = m_pParent;
pNewNode->m_id.Set(m_id);
pNewNode->m_len.Set(m_len);
diff --git a/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp b/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp index 07120d86f..fff5e325f 100644 --- a/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp +++ b/src/filters/parser/matroskasplitter/MatroskaSplitter.cpp @@ -115,7 +115,7 @@ HRESULT CMatroskaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) m_pTrackEntryMap.RemoveAll();
m_pOrderedTrackArray.RemoveAll();
- m_pFile.Attach(new CMatroskaFile(pAsyncReader, hr));
+ m_pFile.Attach(DNew CMatroskaFile(pAsyncReader, hr));
if(!m_pFile) return E_OUTOFMEMORY;
if(FAILED(hr)) {m_pFile.Free(); return hr;}
@@ -584,7 +584,7 @@ avcsuccess: HRESULT hr;
- CAutoPtr<CBaseSplitterOutputPin> pPinOut(new CMatroskaSplitterOutputPin((int)pTE->MinCache, pTE->DefaultDuration/100, mts, Name, this, this, &hr));
+ CAutoPtr<CBaseSplitterOutputPin> pPinOut(DNew CMatroskaSplitterOutputPin((int)pTE->MinCache, pTE->DefaultDuration/100, mts, Name, this, this, &hr));
if(!pTE->Name.IsEmpty()) pPinOut->SetProperty(L"NAME", pTE->Name);
if(pTE->Language.GetLength() == 3) pPinOut->SetProperty(L"LANG", CStringW(CString(pTE->Language)));
AddOutputPin((DWORD)pTE->TrackNumber, pPinOut);
@@ -707,7 +707,7 @@ void CMatroskaSplitterFilter::InstallFonts() {
// assume this is a font resource
- if(BYTE* pData = new BYTE[(UINT)pF->FileDataLen])
+ if(BYTE* pData = DNew BYTE[(UINT)pF->FileDataLen])
{
m_pFile->Seek(pF->FileDataPos);
@@ -760,7 +760,7 @@ void CMatroskaSplitterFilter::SendVorbisHeaderSample() {
long len = sizes.GetNext(pos);
- CAutoPtr<Packet> p(new Packet());
+ CAutoPtr<Packet> p(DNew Packet());
p->TrackNumber = (DWORD)pTE->TrackNumber;
p->rtStart = 0; p->rtStop = 1;
p->bSyncPoint = FALSE;
@@ -794,7 +794,7 @@ bool CMatroskaSplitterFilter::DemuxInit() UINT64 TrackNumber = m_pFile->m_segment.GetMasterTrack();
- CAutoPtr<Cue> pCue(new Cue());
+ CAutoPtr<Cue> pCue(DNew Cue());
do
{
@@ -803,8 +803,8 @@ bool CMatroskaSplitterFilter::DemuxInit() m_pFile->m_segment.SegmentInfo.Duration.Set((float)c.TimeCode - m_pFile->m_rtOffset/10000);
- CAutoPtr<CuePoint> pCuePoint(new CuePoint());
- CAutoPtr<CueTrackPosition> pCueTrackPosition(new CueTrackPosition());
+ CAutoPtr<CuePoint> pCuePoint(DNew CuePoint());
+ CAutoPtr<CueTrackPosition> pCueTrackPosition(DNew CueTrackPosition());
pCuePoint->CueTime.Set(c.TimeCode);
pCueTrackPosition->CueTrack.Set(TrackNumber);
pCueTrackPosition->CueClusterPosition.Set(m_pCluster->m_filepos - m_pSegment->m_start);
@@ -907,7 +907,7 @@ void CMatroskaSplitterFilter::DemuxSeek(REFERENCE_TIME rt) }
else if(pBlock->m_id == 0xA3)
{
- CAutoPtr<BlockGroup> bg(new BlockGroup());
+ CAutoPtr<BlockGroup> bg(DNew BlockGroup());
bg->Block.Parse(pBlock, true);
if(!(bg->Block.Lacing & 0x80)) bg->ReferenceBlock.Set(0); // not a kf
bgn.AddTail(bg);
@@ -971,7 +971,7 @@ bool CMatroskaSplitterFilter::DemuxLoop() }
else if(m_pBlock->m_id == 0xA3)
{
- CAutoPtr<BlockGroup> bg(new BlockGroup());
+ CAutoPtr<BlockGroup> bg(DNew BlockGroup());
bg->Block.Parse(m_pBlock, true);
if(!(bg->Block.Lacing & 0x80)) bg->ReferenceBlock.Set(0); // not a kf
bgn.AddTail(bg);
@@ -979,7 +979,7 @@ bool CMatroskaSplitterFilter::DemuxLoop() while(bgn.GetCount() && SUCCEEDED(hr))
{
- CAutoPtr<MatroskaPacket> p(new MatroskaPacket());
+ CAutoPtr<MatroskaPacket> p(DNew MatroskaPacket());
p->bg = bgn.RemoveHead();
p->bSyncPoint = !p->bg->ReferenceBlock.IsValid();
@@ -1220,7 +1220,7 @@ HRESULT CMatroskaSplitterOutputPin::DeliverBlock(MatroskaPacket* p) POSITION pos = p->bg->Block.BlockData.GetHeadPosition();
while(pos)
{
- CAutoPtr<Packet> tmp(new Packet());
+ CAutoPtr<Packet> tmp(DNew Packet());
tmp->TrackNumber = p->TrackNumber;
tmp->bDiscontinuity = p->bDiscontinuity;
tmp->bSyncPoint = p->bSyncPoint;
@@ -1242,7 +1242,7 @@ HRESULT CMatroskaSplitterOutputPin::DeliverBlock(MatroskaPacket* p) while(pos)
{
const BlockMore* bm = p->bg->ba.bm.GetNext(pos);
- CAutoPtr<Packet> tmp(new Packet());
+ CAutoPtr<Packet> tmp(DNew Packet());
tmp->TrackNumber = p->TrackNumber;
tmp->bDiscontinuity = false;
tmp->bSyncPoint = false;
diff --git a/src/filters/parser/matroskasplitter/MatroskaSplitter.vcproj b/src/filters/parser/matroskasplitter/MatroskaSplitter.vcproj index a83238796..60f44f9da 100644 --- a/src/filters/parser/matroskasplitter/MatroskaSplitter.vcproj +++ b/src/filters/parser/matroskasplitter/MatroskaSplitter.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="MatroskaSplitter"
ProjectGUID="{3F5EA225-F4B7-4413-AEB3-4E4E5751E438}"
RootNamespace="MatroskaSplitter"
@@ -43,6 +43,7 @@ />
<Tool
Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
AdditionalIncludeDirectories="..\..\..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
/>
@@ -102,6 +103,7 @@ />
<Tool
Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
AdditionalIncludeDirectories="..\..\..\..\include"
PreprocessorDefinitions="_WIN64;_DEBUG;_LIB"
DebugInformationFormat="3"
@@ -159,6 +161,7 @@ />
<Tool
Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
AdditionalIncludeDirectories="..\..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
DisableSpecificWarnings="4244"
@@ -219,6 +222,7 @@ />
<Tool
Name="VCCLCompilerTool"
+ AdditionalOptions="/MP"
AdditionalIncludeDirectories="..\..\..\..\include"
PreprocessorDefinitions="_WIN64;NDEBUG;_LIB"
/>
diff --git a/src/filters/parser/matroskasplitter/stdafx.h b/src/filters/parser/matroskasplitter/stdafx.h index 482cd4924..f57822752 100644 --- a/src/filters/parser/matroskasplitter/stdafx.h +++ b/src/filters/parser/matroskasplitter/stdafx.h @@ -25,6 +25,7 @@ //
#pragma once
+#include "..\..\..\DSUtil\SharedInclude.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|