bool CDVDFileInfo::ExtractThumb(const CStdString &strPath, CTextureDetails &details, CStreamDetails *pStreamDetails)
{
+ std::string redactPath = CURL::GetRedacted(strPath);
unsigned int nTime = XbmcThreads::SystemClockMillis();
CDVDInputStream *pInputStream = CDVDFactoryInputStream::CreateInputStream(NULL, strPath, "");
if (!pInputStream)
{
- CLog::Log(LOGERROR, "InputStream: Error creating stream for %s", strPath.c_str());
+ CLog::Log(LOGERROR, "InputStream: Error creating stream for %s", redactPath.c_str());
return false;
}
if (pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD))
{
- CLog::Log(LOGERROR, "InputStream: dvd streams not supported for thumb extraction, file: %s", strPath.c_str());
+ CLog::Log(LOGERROR, "InputStream: dvd streams not supported for thumb extraction, file: %s", redactPath.c_str());
delete pInputStream;
return false;
}
if (!pInputStream->Open(strPath.c_str(), ""))
{
- CLog::Log(LOGERROR, "InputStream: Error opening, %s", strPath.c_str());
+ CLog::Log(LOGERROR, "InputStream: Error opening, %s", redactPath.c_str());
if (pInputStream)
delete pInputStream;
return false;
int nTotalLen = pDemuxer->GetStreamLength();
int nSeekTo = nTotalLen / 3;
- CLog::Log(LOGDEBUG,"%s - seeking to pos %dms (total: %dms) in %s", __FUNCTION__, nSeekTo, nTotalLen, strPath.c_str());
+ CLog::Log(LOGDEBUG,"%s - seeking to pos %dms (total: %dms) in %s", __FUNCTION__, nSeekTo, nTotalLen, redactPath.c_str());
if (pDemuxer->SeekTime(nSeekTo, true))
{
int iDecoderState = VC_ERROR;
}
else
{
- CLog::Log(LOGDEBUG,"%s - decode failed in %s after %d packets.", __FUNCTION__, strPath.c_str(), packetsTried);
+ CLog::Log(LOGDEBUG,"%s - decode failed in %s after %d packets.", __FUNCTION__, redactPath.c_str(), packetsTried);
}
}
delete pVideoCodec;
}
unsigned int nTotalTime = XbmcThreads::SystemClockMillis() - nTime;
- CLog::Log(LOGDEBUG,"%s - measured %u ms to extract thumb from file <%s> in %d packets. ", __FUNCTION__, nTotalTime, strPath.c_str(), packetsTried);
+ CLog::Log(LOGDEBUG,"%s - measured %u ms to extract thumb from file <%s> in %d packets. ", __FUNCTION__, nTotalTime, redactPath.c_str(), packetsTried);
return bOk;
}
}
}
-bool CDVDFileInfo::DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> subs, CStreamDetails &details)
+bool CDVDFileInfo::DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> &subs, CStreamDetails &details)
{
bool result = DemuxerToStreamDetails(pInputStream, pDemuxer, details);
for (unsigned int i = 0; i < subs.size(); i++)
p->m_fAspect = (float)p->m_iWidth / p->m_iHeight;
pDemux->GetStreamCodecName(iStream, p->m_strCodec);
p->m_iDuration = pDemux->GetStreamLength();
+ p->m_strStereoMode = ((CDemuxStreamVideo *)stream)->stereo_mode;
// stack handling
if (URIUtils::IsStack(path))
CStreamDetailSubtitle *dsub = new CStreamDetailSubtitle();
CDemuxStream* stream = v.GetStream(i);
std::string lang = stream->language;
- if (lang.length() == 2)
- {
- CStdString lang3;
- g_LangCodeExpander.ConvertToThreeCharCode(lang3, lang);
- dsub->m_strLanguage = lang3;
- }
- else
- dsub->m_strLanguage = lang;
-
- return true;
+ dsub->m_strLanguage = g_LangCodeExpander.ConvertToISO6392T(lang);
+ details.AddStream(dsub);
}
+ return true;
}
if(ext == ".sub")
{
CStreamDetailSubtitle *dsub = new CStreamDetailSubtitle();
ExternalStreamInfo info;
CUtil::GetExternalStreamDetailsFromFilename(path, filename, info);
- dsub->m_strLanguage = info.language;
+ dsub->m_strLanguage = g_LangCodeExpander.ConvertToISO6392T(info.language);
details.AddStream(dsub);
return true;