Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33615 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information
spiff_ committed Sep 8, 2010
1 parent d14347f commit 7bf00f6
Showing 1 changed file with 22 additions and 29 deletions.
51 changes: 22 additions & 29 deletions xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamRTMP.cpp
Expand Up @@ -142,25 +142,23 @@ bool CDVDInputStreamRTMP::Open(const char* strFile, const std::string& content)
m_sStreamPlaying = (char*)calloc(strlen(strFile)+1,sizeof(char));
strcpy(m_sStreamPlaying,strFile);

{
if (!m_libRTMP.SetupURL(m_rtmp, m_sStreamPlaying))
return false;
if (!m_libRTMP.SetupURL(m_rtmp, m_sStreamPlaying))
return false;

for (int i=0; options[i].name; i++)
for (int i=0; options[i].name; i++)
{
string tmp = m_item.GetProperty(options[i].name);
if (!tmp.empty())
{
string tmp = m_item.GetProperty(options[i].name);
if (!tmp.empty())
{
AVal av_tmp;
SetAVal(av_tmp, tmp);
m_libRTMP.SetOpt(m_rtmp, &options[i].key, &av_tmp);
}
AVal av_tmp;
SetAVal(av_tmp, tmp);
m_libRTMP.SetOpt(m_rtmp, &options[i].key, &av_tmp);
}

if (!m_libRTMP.Connect(m_rtmp, NULL) || !m_libRTMP.ConnectStream(m_rtmp, 0))
return false;
}

if (!m_libRTMP.Connect(m_rtmp, NULL) || !m_libRTMP.ConnectStream(m_rtmp, 0))
return false;

m_eof = false;

return true;
Expand All @@ -180,18 +178,16 @@ void CDVDInputStreamRTMP::Close()

int CDVDInputStreamRTMP::Read(BYTE* buf, int buf_size)
{
{
int i = m_libRTMP.Read(m_rtmp, (char *)buf, buf_size);
if (i < 0)
m_eof = true;
int i = m_libRTMP.Read(m_rtmp, (char *)buf, buf_size);
if (i < 0)
m_eof = true;

return i;
}
return i;
}

__int64 CDVDInputStreamRTMP::Seek(__int64 offset, int whence)
{
if(whence == SEEK_POSSIBLE)
if (whence == SEEK_POSSIBLE)
return 0;
else
return -1;
Expand All @@ -201,10 +197,9 @@ bool CDVDInputStreamRTMP::SeekTime(int iTimeInMsec)
{
CLog::Log(LOGNOTICE, "RTMP Seek to %i requested", iTimeInMsec);
CSingleLock lock(m_RTMPSection);
{
if (m_libRTMP.SendSeek(m_rtmp, iTimeInMsec))
return true;
}

if (m_libRTMP.SendSeek(m_rtmp, iTimeInMsec))
return true;

return false;
}
Expand All @@ -223,10 +218,8 @@ bool CDVDInputStreamRTMP::Pause(double dTime)
{
CSingleLock lock(m_RTMPSection);

{
m_bPaused = !m_bPaused;
m_libRTMP.Pause(m_rtmp, m_bPaused);
}
m_bPaused = !m_bPaused;
m_libRTMP.Pause(m_rtmp, m_bPaused);

return true;
}
Expand Down

0 comments on commit 7bf00f6

Please sign in to comment.