Rename MxDSSubscriber functions (#573)

This commit is contained in:
Christian Semmler
2024-02-17 10:35:10 -05:00
committed by GitHub
parent 332d8da695
commit 1d189b013d
17 changed files with 51 additions and 51 deletions

View File

@@ -35,7 +35,7 @@ void MxMIDIPresenter::Destroy(MxBool p_fromDestructor)
m_criticalSection.Enter();
if (m_subscriber && m_chunk) {
m_subscriber->DestroyChunk(m_chunk);
m_subscriber->FreeDataChunk(m_chunk);
}
Init();
@@ -52,7 +52,7 @@ void MxMIDIPresenter::ReadyTickle()
MxStreamChunk* chunk = NextChunk();
if (chunk) {
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
ParseExtra();
ProgressTickleState(e_starting);
}

View File

@@ -119,7 +119,7 @@ void MxWavePresenter::ReadyTickle()
if (chunk) {
m_waveFormat = (WaveFormat*) new MxU8[chunk->GetLength()];
memcpy(m_waveFormat, chunk->GetData(), chunk->GetLength());
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
ParseExtra();
ProgressTickleState(e_starting);
}
@@ -232,7 +232,7 @@ void MxWavePresenter::LoopChunk(MxStreamChunk* p_chunk)
{
WriteToSoundBuffer(p_chunk->GetData(), p_chunk->GetLength());
if (IsEnabled()) {
m_subscriber->DestroyChunk(p_chunk);
m_subscriber->FreeDataChunk(p_chunk);
}
}
@@ -246,7 +246,7 @@ MxResult MxWavePresenter::PutData()
case e_streaming:
if (m_currentChunk && FUN_100b1ba0()) {
WriteToSoundBuffer(m_currentChunk->GetData(), m_currentChunk->GetLength());
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL;
}

View File

@@ -27,7 +27,7 @@ void MxMediaPresenter::Destroy(MxBool p_fromDestructor)
MxAutoLocker lock(&m_criticalSection);
if (m_currentChunk && m_subscriber) {
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
}
if (m_subscriber) {
@@ -63,12 +63,12 @@ MxStreamChunk* MxMediaPresenter::CurrentChunk()
MxStreamChunk* chunk = NULL;
if (m_subscriber) {
chunk = m_subscriber->CurrentChunk();
chunk = m_subscriber->PeekData();
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
m_subscriber->NextChunk();
m_subscriber->DestroyChunk(chunk);
m_subscriber->PopData();
m_subscriber->FreeDataChunk(chunk);
chunk = NULL;
ProgressTickleState(e_done);
}
@@ -83,11 +83,11 @@ MxStreamChunk* MxMediaPresenter::NextChunk()
MxStreamChunk* chunk = NULL;
if (m_subscriber) {
chunk = m_subscriber->NextChunk();
chunk = m_subscriber->PopData();
if (chunk && chunk->GetFlags() & MxDSChunk::c_bit3) {
m_action->SetFlags(m_action->GetFlags() | MxDSAction::c_bit7);
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
chunk = NULL;
ProgressTickleState(e_done);
}
@@ -186,7 +186,7 @@ void MxMediaPresenter::StreamingTickle()
if (m_currentChunk) {
if (m_currentChunk->GetFlags() & MxDSChunk::c_end) {
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL;
ProgressTickleState(e_repeating);
}
@@ -194,7 +194,7 @@ void MxMediaPresenter::StreamingTickle()
LoopChunk(m_currentChunk);
if (!IsEnabled()) {
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL;
}
}

View File

@@ -71,7 +71,7 @@ void MxEventPresenter::ReadyTickle()
if (chunk) {
CopyData(chunk);
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
ParseExtra();
ProgressTickleState(e_starting);
}
@@ -107,7 +107,7 @@ MxResult MxEventPresenter::PutData()
}
if (m_currentTickleState == e_streaming) {
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
}
m_currentChunk = NULL;
}

View File

@@ -20,7 +20,7 @@ MxDSSubscriber::~MxDSSubscriber()
m_controller->RemoveSubscriber(this);
}
DeleteChunks();
DestroyData();
if (m_pendingChunkCursor) {
delete m_pendingChunkCursor;
@@ -59,7 +59,7 @@ MxResult MxDSSubscriber::Create(MxStreamController* p_controller, MxU32 p_object
}
// FUNCTION: LEGO1 0x100b8030
void MxDSSubscriber::DeleteChunks()
void MxDSSubscriber::DestroyData()
{
if (m_controller) {
MxStreamChunk* chunk = NULL;
@@ -77,7 +77,7 @@ void MxDSSubscriber::DeleteChunks()
}
// FUNCTION: LEGO1 0x100b8150
MxResult MxDSSubscriber::AddChunk(MxStreamChunk* p_chunk, MxBool p_append)
MxResult MxDSSubscriber::AddData(MxStreamChunk* p_chunk, MxBool p_append)
{
if (m_pendingChunkCursor) {
if (p_append) {
@@ -92,7 +92,7 @@ MxResult MxDSSubscriber::AddChunk(MxStreamChunk* p_chunk, MxBool p_append)
}
// FUNCTION: LEGO1 0x100b8250
MxStreamChunk* MxDSSubscriber::NextChunk()
MxStreamChunk* MxDSSubscriber::PopData()
{
MxStreamChunk* chunk = NULL;
@@ -109,7 +109,7 @@ MxStreamChunk* MxDSSubscriber::NextChunk()
}
// FUNCTION: LEGO1 0x100b8360
MxStreamChunk* MxDSSubscriber::CurrentChunk()
MxStreamChunk* MxDSSubscriber::PeekData()
{
MxStreamChunk* chunk = NULL;
@@ -121,7 +121,7 @@ MxStreamChunk* MxDSSubscriber::CurrentChunk()
}
// FUNCTION: LEGO1 0x100b8390
void MxDSSubscriber::DestroyChunk(MxStreamChunk* p_chunk)
void MxDSSubscriber::FreeDataChunk(MxStreamChunk* p_chunk)
{
if (p_chunk) {
if (m_consumedChunkCursor->Find(p_chunk)) {

View File

@@ -59,7 +59,7 @@ MxResult MxStreamChunk::SendChunk(MxStreamListMxDSSubscriber& p_subscriberList,
m_buffer = NULL;
}
(*it)->AddChunk(this, p_append);
(*it)->AddData(this, p_append);
return SUCCESS;
}

View File

@@ -50,7 +50,7 @@ void MxLoopingFlcPresenter::NextFrame()
m_elapsedDuration += m_flcHeader->speed;
}
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
}
// FUNCTION: LEGO1 0x100b44c0

View File

@@ -61,7 +61,7 @@ void MxLoopingSmkPresenter::NextFrame()
m_elapsedDuration += 1000 / ((MxDSMediaAction*) m_action)->GetFramesPerSecond();
}
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
}
// FUNCTION: LEGO1 0x100b4a90

View File

@@ -62,7 +62,7 @@ void MxStillPresenter::NextFrame()
{
MxStreamChunk* chunk = NextChunk();
LoadFrame(chunk);
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
}
// FUNCTION: LEGO1 0x100b9dd0

View File

@@ -178,12 +178,12 @@ void MxVideoPresenter::NextFrame()
MxStreamChunk* chunk = NextChunk();
if (chunk->GetFlags() & MxDSChunk::c_end) {
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
ProgressTickleState(e_repeating);
}
else {
LoadFrame(chunk);
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
}
}
@@ -408,7 +408,7 @@ void MxVideoPresenter::ReadyTickle()
if (chunk) {
LoadHeader(chunk);
m_subscriber->DestroyChunk(chunk);
m_subscriber->FreeDataChunk(chunk);
ParseExtra();
ProgressTickleState(e_starting);
}
@@ -453,7 +453,7 @@ void MxVideoPresenter::StreamingTickle()
}
LoadFrame(m_currentChunk);
m_subscriber->DestroyChunk(m_currentChunk);
m_subscriber->FreeDataChunk(m_currentChunk);
m_currentChunk = NULL;
SetBit0(TRUE);