当前位置: 首页>>代码示例>>C++>>正文


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

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


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

示例1: main


//.........这里部分代码省略.........
  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);

  if(m_audio_index_use != -1)
    m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_audio_index_use);
          
  if(m_has_video && m_refresh)
  {
开发者ID:flavioalsoares,项目名称:omxplayer,代码行数:67,代码来源:omxplayer.cpp

示例2: main


//.........这里部分代码省略.........
        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)
      m_3d = true;

    SetVideoMode(m_hints_video.width, m_hints_video.height, m_player_video.GetFPS(), m_3d);

  }
开发者ID:Bengt,项目名称:omxplayer,代码行数:66,代码来源:omxplayer.cpp

示例3: startVideo


//.........这里部分代码省略.........

    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);

    if(m_audio_index_use != -1)
        m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_audio_index_use);

    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)
            m_3d = true;

        SetVideoMode(m_hints_video.width, m_hints_video.height, m_hints_video.fpsrate, m_hints_video.fpsscale, m_3d);
开发者ID:kirgene,项目名称:pi,代码行数:67,代码来源:omxplayer.cpp


注:本文中的OMXReader::IsMpegVideo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。