本文整理汇总了C++中OMXReader::SubtitleStreamCount方法的典型用法代码示例。如果您正苦于以下问题:C++ OMXReader::SubtitleStreamCount方法的具体用法?C++ OMXReader::SubtitleStreamCount怎么用?C++ OMXReader::SubtitleStreamCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OMXReader
的用法示例。
在下文中一共展示了OMXReader::SubtitleStreamCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrintSubtitleInfo
void PrintSubtitleInfo()
{
auto count = m_omx_reader.SubtitleStreamCount();
size_t index = 0;
if(m_has_external_subtitles)
{
++count;
if(!m_player_subtitles.GetUseExternalSubtitles())
index = m_player_subtitles.GetActiveStream() + 1;
}
else if(m_has_subtitle)
{
index = m_player_subtitles.GetActiveStream();
}
printf("Subtitle count: %d, state: %s, index: %d, delay: %d\n",
count,
m_has_subtitle && m_player_subtitles.GetVisible() ? " on" : "off",
index+1,
m_has_subtitle ? m_player_subtitles.GetDelay() : 0);
}
示例2: main
//.........这里部分代码省略.........
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);
}
// This is an upper bound check on the subtitle limits. When we pulled the subtitle
// index from the user we check to make sure that the value is larger than zero, but
// we couldn't know without scanning the file if it was too high. If this is the case
示例3: main
//.........这里部分代码省略.........
}
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)
{
memset(&tv_state, 0, sizeof(TV_DISPLAY_STATE_T));
m_BcmHost.vc_tv_get_display_state(&tv_state);
SetVideoMode(m_hints_video.width, m_hints_video.height, m_hints_video.fpsrate, m_hints_video.fpsscale, m_3d);
示例4: startVideo
//.........这里部分代码省略.........
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);
}