MCPcopy Create free account
hub / github.com/carlonluca/pot / OpenDecoder

Method OpenDecoder

piomxtextures_src/omxplayer_lib/OMXPlayerVideo.cpp:320–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318
319
320bool 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
352bool OMXPlayerVideo::CloseDecoder()
353{

Callers

nothing calls this directly

Calls 2

GetDecoderNameMethod · 0.80
OpenMethod · 0.45

Tested by

no test coverage detected