Skip to content

Commit

Permalink
[rbp/omxplayer] fixed edl marks. for omx we have to do a full flush. f…
Browse files Browse the repository at this point in the history
  • Loading branch information
huceke committed Dec 22, 2012
1 parent 7876686 commit 07e51ad
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 29 deletions.
4 changes: 2 additions & 2 deletions xbmc/cores/omxplayer/OMXPlayer.cpp
Expand Up @@ -1880,7 +1880,7 @@ void COMXPlayer::CheckAutoSceneSkip()
/*
* Seeking is NOT flushed so any content up to the demux point is retained when playing forwards.
*/
m_messenger.Put(new CDVDMsgPlayerSeek((int)seek, true, false, true, false, true));
m_messenger.Put(new CDVDMsgPlayerSeek((int)seek, true, true, true, false, true));
/*
* Seek doesn't always work reliably. Last physical seek time is recorded to prevent looping
* if there was an error with seeking and it landed somewhere unexpected, perhaps back in the
Expand All @@ -1898,7 +1898,7 @@ void COMXPlayer::CheckAutoSceneSkip()
/*
* Seeking is NOT flushed so any content up to the demux point is retained when playing forwards.
*/
m_messenger.Put(new CDVDMsgPlayerSeek(cut.end + 1, true, false, true, false, true));
m_messenger.Put(new CDVDMsgPlayerSeek(cut.end + 1, true, true, true, false, true));
/*
* Each commercial break is only skipped once so poorly detected commercial breaks can be
* manually re-entered. Start and end are recorded to prevent looping and to allow seeking back
Expand Down
14 changes: 0 additions & 14 deletions xbmc/cores/omxplayer/OMXPlayerAudio.cpp
Expand Up @@ -147,7 +147,6 @@ void OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints, COMXAudioCodecOMX *codec)
m_errortime = CurrentHostCounter();
m_silence = false;
m_started = false;
m_flush = false;
m_nChannels = 0;
m_synctype = SYNC_DISCON;
m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
Expand Down Expand Up @@ -369,12 +368,6 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)

while(!m_bStop)
{
if(m_flush)
{
m_flush = false;
break;
}

if(m_omxAudio.GetSpace() < (unsigned int)pkt->iSize)
{
Sleep(10);
Expand Down Expand Up @@ -417,12 +410,6 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket)

while(!m_bStop)
{
if(m_flush)
{
m_flush = false;
break;
}

if(m_omxAudio.GetSpace() < (unsigned int)pkt->iSize)
{
Sleep(10);
Expand Down Expand Up @@ -623,7 +610,6 @@ void OMXPlayerAudio::Process()

void OMXPlayerAudio::Flush()
{
m_flush = true;
m_messageQueue.Flush();
m_messageQueue.Put( new CDVDMsg(CDVDMsg::GENERAL_FLUSH), 1);
}
Expand Down
1 change: 0 additions & 1 deletion xbmc/cores/omxplayer/OMXPlayerAudio.h
Expand Up @@ -81,7 +81,6 @@ class OMXPlayerAudio : public CThread

struct timespec m_starttime, m_endtime;
bool m_buffer_empty;
bool m_flush;
//SYNC_DISCON, SYNC_SKIPDUP, SYNC_RESAMPLE
int m_synctype;
int m_nChannels;
Expand Down
11 changes: 0 additions & 11 deletions xbmc/cores/omxplayer/OMXPlayerVideo.cpp
Expand Up @@ -76,7 +76,6 @@ OMXPlayerVideo::OMXPlayerVideo(OMXClock *av_clock,
m_open = false;
m_stream_id = -1;
m_fFrameRate = 25.0f;
m_flush = false;
m_hdmi_clock_sync = false;
m_speed = DVD_PLAYSPEED_NORMAL;
m_stalled = false;
Expand Down Expand Up @@ -121,7 +120,6 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints)

m_hints = hints;
m_Deinterlace = ( g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF ) ? false : true;
m_flush = false;
m_hdmi_clock_sync = (g_guiSettings.GetInt("videoplayer.adjustrefreshrate") != ADJUST_REFRESHRATE_OFF);
m_started = false;
m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
Expand Down Expand Up @@ -170,8 +168,6 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints, COMXVideo *codec)

bool OMXPlayerVideo::CloseStream(bool bWaitForBuffers)
{
m_flush = true;

// wait until buffers are empty
if (bWaitForBuffers && m_speed > 0) m_messageQueue.WaitUntilEmpty();

Expand Down Expand Up @@ -615,12 +611,6 @@ void OMXPlayerVideo::Process()

while (!m_bStop)
{
if(m_flush)
{
m_flush = false;
break;
}

if((int)m_omxVideo.GetFreeSpace() < pPacket->iSize)
{
Sleep(10);
Expand Down Expand Up @@ -685,7 +675,6 @@ void OMXPlayerVideo::Process()

void OMXPlayerVideo::Flush()
{
m_flush = true;
m_messageQueue.Flush();
m_messageQueue.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH), 1);
}
Expand Down
1 change: 0 additions & 1 deletion xbmc/cores/omxplayer/OMXPlayerVideo.h
Expand Up @@ -53,7 +53,6 @@ class OMXPlayerVideo : public CThread
COMXVideo m_omxVideo;
float m_fFrameRate;
bool m_Deinterlace;
bool m_flush;
bool m_hdmi_clock_sync;
double m_iVideoDelay;
int m_speed;
Expand Down

0 comments on commit 07e51ad

Please sign in to comment.