| 318 | |
| 319 | |
| 320 | bool OMXPlayerVideo::OpenDecoder() |
| 321 | { |
| 322 | if (m_config.hints.fpsrate && m_config.hints.fpsscale) |
| 323 | m_fps = DVD_TIME_BASE / OMXReader::NormalizeFrameduration((double)DVD_TIME_BASE * m_config.hints.fpsscale / m_config.hints.fpsrate); |
| 324 | else |
| 325 | m_fps = 25; |
| 326 | |
| 327 | if( m_fps > 100 || m_fps < 5 ) |
| 328 | { |
| 329 | printf("Invalid framerate %d, using forced 25fps and just trust timestamps\n", (int)m_fps); |
| 330 | m_fps = 25; |
| 331 | } |
| 332 | |
| 333 | m_frametime = (double)DVD_TIME_BASE / m_fps; |
| 334 | |
| 335 | // lcarlon: keep during merges. |
| 336 | m_decoder = new COMXVideo(m_provider); |
| 337 | |
| 338 | if(!m_decoder->Open(m_av_clock, m_config)) |
| 339 | { |
| 340 | CloseDecoder(); |
| 341 | return false; |
| 342 | } |
| 343 | else |
| 344 | { |
| 345 | printf("Video codec %s width %d height %d profile %d fps %f\n", |
| 346 | m_decoder->GetDecoderName().c_str() , m_config.hints.width, m_config.hints.height, m_config.hints.profile, m_fps); |
| 347 | } |
| 348 | |
| 349 | return true; |
| 350 | } |
| 351 | |
| 352 | bool OMXPlayerVideo::CloseDecoder() |
| 353 | { |
nothing calls this directly
no test coverage detected