void testGetCurrentSize(){ RuntimeErrorValidator * v = buildErrorSuccessValidator(); long s1 = getCurrentFileSize("VDA1" , "archivo1.txt" , v); info(concatAll(2 , "FileSize: " , ltoa(s1))); long s2 = getCurrentFileSize("VDA1" , "archivo2.txt" , v); info(concatAll(2 , "FileSize: " , ltoa(s2))); long s3 = getCurrentFileSize("VDA1" , "archivo3.txt" , v); info(concatAll(2 , "FileSize: " , ltoa(s3))); long s4 = getCurrentFileSize("VDA1" , "archivo4.txt" , v); info(concatAll(2 , "FileSize: " , ltoa(s4))); }
HRESULT CAudioRawFileRenderer::GetStopPosition(__int64 *pos) { if (m_TimeFormat==TIME_FORMAT_BYTE) { return(getCurrentFileSize(pos)); } *pos=m_pPin->m_reftimeEnd; return(S_OK); }
HRESULT CAudioRawFileRenderer::GetCurrentPosition(__int64 *pos) { dprintf("GetCurrentPosition"); if (m_TimeFormat==TIME_FORMAT_BYTE) { return(getCurrentFileSize(pos)); } if (m_TimeFormat==TIME_FORMAT_MEDIA_TIME) { *pos=m_pPin->m_reftimeEnd; return(S_OK); } return(E_FAIL); }
HRESULT CAudioRawFileRenderer::GetDuration(__int64 *duration) { if (m_TimeFormat==TIME_FORMAT_BYTE) { return(getCurrentFileSize(duration)); } else if (m_TimeFormat==TIME_FORMAT_MEDIA_TIME) { *duration = m_pPin->m_reftimeEnd - m_pPin->m_reftimeStart; return(S_OK); } return(E_FAIL); }
HRESULT CAudioRawFileRenderer::GetPositions(__int64 *cur,__int64 *stop) { if (m_TimeFormat==TIME_FORMAT_BYTE) { __int64 val=0; HRESULT hr=getCurrentFileSize(&val); *cur=val; *stop=val; return(hr); } *cur=m_pPin->m_reftimeEnd; *stop=m_pPin->m_reftimeEnd; dprintf("GetPositions"); return(S_OK); }
void testListingFiles(){ RuntimeErrorValidator * validator = buildErrorSuccessValidator(); List l = getAllFiles("VDA1", validator); if(hasError(validator)){ error(validator->errorDescription); return ; } Iterator * ite = buildIterator(l); char * element = NULL; while( hasMoreElements(ite)){ element = next(ite); info( concatAll(4, "Archivo: " , element , " con tamaño: " , ltoa(getCurrentFileSize("VDA1" , element , validator)))); } }