diff options
author | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-09 01:14:58 +0400 |
---|---|---|
committer | tetsuo55 <tetsuo55@users.sourceforge.net> | 2010-04-09 01:14:58 +0400 |
commit | a9b7bf3fb3e1334d8defd05ca4cfae870b4912e5 (patch) | |
tree | 2dab453d94d5e003379a6cc895eceb84c80e23ec /src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp | |
parent | aafd49a91f7c2fa9c7103971c16fa6e1b29e8bfd (diff) |
astyle formatting cleanup to make the sourcecode more accessible
switch used: astyle --style=ansi --min-conditional-indent=0 --pad=oper --unpad=paren
http://astyle.sourceforge.net/
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1783 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp')
-rw-r--r-- | src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp index 2721e811d..c77a070b0 100644 --- a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp +++ b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp @@ -1,54 +1,54 @@ #include "stdafx.h"
#include "Ap4AsyncReaderStream.h"
-AP4_AsyncReaderStream::AP4_AsyncReaderStream(CBaseSplitterFile* pFile)
- : m_refs(1)
- , m_pFile(pFile)
+AP4_AsyncReaderStream::AP4_AsyncReaderStream(CBaseSplitterFile* pFile)
+ : m_refs(1)
+ , m_pFile(pFile)
{
- ASSERT(pFile);
+ ASSERT(pFile);
}
AP4_AsyncReaderStream::~AP4_AsyncReaderStream()
{
- ASSERT(m_refs == 0);
+ ASSERT(m_refs == 0);
}
void AP4_AsyncReaderStream::AddReference()
{
- ASSERT(m_refs > 0);
- ++m_refs;
+ ASSERT(m_refs > 0);
+ ++m_refs;
}
void AP4_AsyncReaderStream::Release()
{
- ASSERT(m_refs > 0);
- if(--m_refs == 0) delete this;
+ ASSERT(m_refs > 0);
+ if(--m_refs == 0) delete this;
}
AP4_Result AP4_AsyncReaderStream::ReadPartial(void* buffer, AP4_Size bytesToRead, AP4_Size& bytesRead)
{
- AP4_Size bytesAvail = (AP4_Size)m_pFile->GetRemaining();
+ AP4_Size bytesAvail = (AP4_Size)m_pFile->GetRemaining();
- if(bytesAvail < bytesToRead)
- {
- bytesRead = bytesAvail;
- bytesToRead = bytesAvail;
- }
+ if(bytesAvail < bytesToRead)
+ {
+ bytesRead = bytesAvail;
+ bytesToRead = bytesAvail;
+ }
- if(bytesAvail == 0)
- {
- return AP4_ERROR_EOS;
- }
+ if(bytesAvail == 0)
+ {
+ return AP4_ERROR_EOS;
+ }
- if(FAILED(m_pFile->ByteRead((BYTE*)buffer, bytesToRead)))
- {
- bytesRead = 0;
- return AP4_ERROR_READ_FAILED;
- }
+ if(FAILED(m_pFile->ByteRead((BYTE*)buffer, bytesToRead)))
+ {
+ bytesRead = 0;
+ return AP4_ERROR_READ_FAILED;
+ }
- bytesRead = bytesToRead;
+ bytesRead = bytesToRead;
- return AP4_SUCCESS;
+ return AP4_SUCCESS;
}
AP4_Result AP4_AsyncReaderStream::WritePartial(const void* buffer, AP4_Size bytesToWrite, AP4_Size& bytesWritten)
@@ -58,18 +58,18 @@ AP4_Result AP4_AsyncReaderStream::WritePartial(const void* buffer, AP4_Size byte AP4_Result AP4_AsyncReaderStream::Seek(AP4_Position offset)
{
- m_pFile->Seek(offset);
- return m_pFile->GetPos() == offset ? AP4_SUCCESS : AP4_FAILURE;
+ m_pFile->Seek(offset);
+ return m_pFile->GetPos() == offset ? AP4_SUCCESS : AP4_FAILURE;
}
AP4_Result AP4_AsyncReaderStream::Tell(AP4_Position& offset)
{
- offset = (AP4_Offset)m_pFile->GetPos();
- return AP4_SUCCESS;
+ offset = (AP4_Offset)m_pFile->GetPos();
+ return AP4_SUCCESS;
}
AP4_Result AP4_AsyncReaderStream::GetSize(AP4_LargeSize& size)
{
- size = m_pFile->GetLength();
- return AP4_SUCCESS;
+ size = m_pFile->GetLength();
+ return AP4_SUCCESS;
}
\ No newline at end of file |