C++ OMXReader::Open方法代码示例

本文整理汇总了C++中OMXReader::Open方法的典型用法代码示例。如果您正苦于以下问题:C++ OMXReader::Open方法的具体用法?C++ OMXReader::Open怎么用?C++ OMXReader::Open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OMXReader的用法示例。


C++ OMXReader::Open方法代码示例

在下文中一共展示了OMXReader::Open方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

//.........这里部分代码省略.........
  if(m_has_font && !Exists(m_font_path))
  {
    PrintFileNotFound(m_font_path);
    return 0;
  }

  if(m_has_external_subtitles && !Exists(m_external_subtitles_path))
  {
    PrintFileNotFound(m_external_subtitles_path);
    return 0;
  }

  if(!m_has_external_subtitles && !filename_is_URL)
  {
    auto subtitles_path = m_filename.substr(0, m_filename.find_last_of(".")) +
                          ".srt";

    if(Exists(subtitles_path))
    {
      m_external_subtitles_path = subtitles_path;
      m_has_external_subtitles = true;
    }
  }

  CLog::Init("./");

  g_RBP.Initialize();
  g_OMX.Initialize();

  m_av_clock = new OMXClock();

  m_thread_player = true;

  if(!m_omx_reader.Open(m_filename.c_str(), m_dump_format))
    goto do_exit;

  if(m_dump_format)
    goto do_exit;

  m_bMpeg         = m_omx_reader.IsMpegVideo();
  m_has_video     = m_omx_reader.VideoStreamCount();
  m_has_audio     = m_omx_reader.AudioStreamCount();
  m_has_subtitle  = m_has_external_subtitles ||
                    m_omx_reader.SubtitleStreamCount();

  if(m_filename.find("3DSBS") != string::npos || m_filename.find("HSBS") != string::npos)
    m_3d = CONF_FLAGS_FORMAT_SBS;
  else if(m_filename.find("3DTAB") != string::npos || m_filename.find("HTAB") != string::npos)
    m_3d = CONF_FLAGS_FORMAT_TB;

  // 3d modes don't work without switch hdmi mode
  if (m_3d != CONF_FLAGS_FORMAT_NONE)
    m_refresh = true;

  // you really don't want want to match refresh rate without hdmi clock sync
  if (m_refresh && !m_no_hdmi_clock_sync)
    m_hdmi_clock_sync = true;

  if(!m_av_clock->OMXInitialize(m_has_video, m_has_audio))
    goto do_exit;

  if(m_hdmi_clock_sync && !m_av_clock->HDMIClockSync())
      goto do_exit;

  m_omx_reader.GetHints(OMXSTREAM_AUDIO, m_hints_audio);
  m_omx_reader.GetHints(OMXSTREAM_VIDEO, m_hints_video);
开发者ID:flavioalsoares,项目名称:omxplayer,代码行数:67,代码来源:omxplayer.cpp

示例2: main

//.........这里部分代码省略.........
          m_audio_index_use = 0;
        break;
      case 0:
        break;
      case 'h':
        print_usage();
        return 0;
        break;
      case ':':
        return 0;
        break;
      default:
        return 0;
        break;
    }
  }

  if (optind >= argc) {
    print_usage();
    return 0;
  }

  m_filename = argv[optind];

  CLog::Init("./");

  g_RBP.Initialize();
  g_OMX.Initialize();

  m_av_clock = new OMXClock();

  m_thread_player = true;

  if(!m_omx_reader.Open(m_filename.c_str(), m_dump_format))
    goto do_exit;

  if(m_dump_format)
    goto do_exit;

  m_bMpeg         = m_omx_reader.IsMpegVideo();
  m_has_video     = m_omx_reader.VideoStreamCount();
  m_has_audio     = m_omx_reader.AudioStreamCount();
  m_has_subtitle  = m_omx_reader.SubtitleStreamCount();

  if(!m_av_clock->OMXInitialize(m_has_video, m_has_audio))
    goto do_exit;

  if(m_hdmi_clock_sync && !m_av_clock->HDMIClockSync())
      goto do_exit;

  m_omx_reader.GetHints(OMXSTREAM_AUDIO, m_hints_audio);
  m_omx_reader.GetHints(OMXSTREAM_VIDEO, m_hints_video);

  if(m_audio_index_use != -1)
    m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_audio_index_use);
          
  if(m_has_video && !m_player_video.Open(m_hints_video, m_av_clock, m_Deinterlace,  m_bMpeg, 
                                         m_hdmi_clock_sync, m_thread_player))
    goto do_exit;

  if(m_has_video && m_refresh)
  {
    memset(&tv_state, 0, sizeof(TV_GET_STATE_RESP_T));
    m_BcmHost.vc_tv_get_state(&tv_state);

    if(m_filename.find("3DSBS") != string::npos)
开发者ID:Bengt,项目名称:omxplayer,代码行数:67,代码来源:omxplayer.cpp

示例3: startVideo

//.........这里部分代码省略.........
        case 'h':
            print_usage();
            return 0;
            break;
        case ':':
            return 0;
            break;
        default:
            return 0;
            break;
        }
    }

    if (optind >= argc) {
        print_usage();
        return 0;
    }
#endif

    //m_filename = argv[optind];
    m_filename = "/home/pi/usb/big_buck_bunny_1080p_h264.mov";

#ifdef ENABLE_ORIGINAL
    CLog::Init("./");
#endif

    g_RBP.Initialize();
    g_OMX.Initialize();

    m_av_clock = new OMXClock();

    m_thread_player = true;

    LOG_VERBOSE(LOG_TAG, "Opening video file...");
    if(!m_omx_reader.Open(m_filename.c_str(), m_dump_format))
#if 0
        goto do_exit;
#endif
    return 0;

#ifdef ENABLE_ORIGINAL
    if(m_dump_format)
        goto do_exit;
#endif

    m_bMpeg         = m_omx_reader.IsMpegVideo();
    m_has_video     = m_omx_reader.VideoStreamCount();
    m_has_audio     = m_omx_reader.AudioStreamCount();
    m_has_subtitle  = m_omx_reader.SubtitleStreamCount();

    LOG_VERBOSE(LOG_TAG, "Initializing OMX clock...");
    if(!m_av_clock->OMXInitialize(m_has_video, m_has_audio))
#if 0
        goto do_exit;
#endif
    return 0;

    if(m_hdmi_clock_sync && !m_av_clock->HDMIClockSync())
#if 0
        goto do_exit;
#endif
    return 0;

    m_omx_reader.GetHints(OMXSTREAM_AUDIO, m_hints_audio);
    m_omx_reader.GetHints(OMXSTREAM_VIDEO, m_hints_video);
开发者ID:kirgene,项目名称:pi,代码行数:66,代码来源:omxplayer.cpp

本文标签属性:

示例:示例志愿表

代码:代码生成器

上一篇:Java AdapterView.getPositionForView方法代码示例
下一篇:C# StringReference.StartsWith方法代码示例

为您推荐