Skip to content

Commit

Permalink
VideoPlayer: some cleanup in audio player
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Feb 21, 2016
1 parent 72bb37b commit 2ae3a95
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
8 changes: 0 additions & 8 deletions xbmc/cores/VideoPlayer/VideoPlayerAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@ void CVideoPlayerAudio::CloseStream(bool bWaitForBuffers)

void CVideoPlayerAudio::OnStartup()
{
m_decode.Release();

#ifdef TARGET_WINDOWS
CoInitializeEx(NULL, COINIT_MULTITHREADED);
#endif
}

void CVideoPlayerAudio::UpdatePlayerInfo()
Expand Down Expand Up @@ -317,7 +312,6 @@ void CVideoPlayerAudio::Process()
{
if (m_pAudioCodec)
m_pAudioCodec->Reset();
m_decode.Release();
}
else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH))
{
Expand All @@ -334,8 +328,6 @@ void CVideoPlayerAudio::Process()

if (m_pAudioCodec)
m_pAudioCodec->Reset();

m_decode.Release();
}
else if (pMsg->IsType(CDVDMsg::GENERAL_EOF))
{
Expand Down
41 changes: 0 additions & 41 deletions xbmc/cores/VideoPlayer/VideoPlayerAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,47 +94,6 @@ class CVideoPlayerAudio : public CThread, public IDVDStreamPlayerAudio

double m_audioClock;

// data for audio decoding
struct PacketStatus
{
PacketStatus()
{
msg = NULL;
Release();
}

~PacketStatus()
{
Release();
}

CDVDMsgDemuxerPacket* msg;
uint8_t* data;
int size;
double dts;
double pts;

void Attach(CDVDMsgDemuxerPacket* msg2)
{
if(msg) msg->Release();
msg = msg2;
msg->Acquire();
DemuxPacket* p = msg->GetPacket();
data = p->pData;
size = p->iSize;
dts = p->dts;
pts = p->pts;
}
void Release()
{
if(msg) msg->Release();
msg = NULL;
data = NULL;
size = 0;
dts = DVD_NOPTS_VALUE;
}
} m_decode;

CDVDAudio m_dvdAudio; // audio output device
CDVDClock* m_pClock; // dvd master clock
CDVDAudioCodec* m_pAudioCodec; // audio codec
Expand Down

0 comments on commit 2ae3a95

Please sign in to comment.