本文整理汇总了C++中OMXPlayerSubtitles::SetUseExternalSubtitles方法的典型用法代码示例。如果您正苦于以下问题:C++ OMXPlayerSubtitles::SetUseExternalSubtitles方法的具体用法?C++ OMXPlayerSubtitles::SetUseExternalSubtitles怎么用?C++ OMXPlayerSubtitles::SetUseExternalSubtitles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OMXPlayerSubtitles
的用法示例。
在下文中一共展示了OMXPlayerSubtitles::SetUseExternalSubtitles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if(m_has_video && !m_player_video.Open(m_hints_video, m_av_clock, DestRect, m_Deinterlace, m_bMpeg,
m_hdmi_clock_sync, m_thread_player, m_display_aspect))
goto do_exit;
{
std::vector<Subtitle> external_subtitles;
if(m_has_external_subtitles &&
!ReadSrt(m_external_subtitles_path, external_subtitles))
{
puts("Unable to read the subtitle file.");
goto do_exit;
}
if(m_has_subtitle &&
!m_player_subtitles.Open(m_omx_reader.SubtitleStreamCount(),
std::move(external_subtitles),
m_font_path,
m_font_size,
m_centered,
m_subtitle_lines,
m_av_clock))
goto do_exit;
}
if(m_has_subtitle)
{
if(!m_has_external_subtitles)
{
if(m_subtitle_index != -1)
{
m_player_subtitles.SetActiveStream(
std::min(m_subtitle_index, m_omx_reader.SubtitleStreamCount()-1));
}
m_player_subtitles.SetUseExternalSubtitles(false);
}
if(m_subtitle_index == -1 && !m_has_external_subtitles)
m_player_subtitles.SetVisible(false);
}
m_omx_reader.GetHints(OMXSTREAM_AUDIO, m_hints_audio);
if(m_has_audio && !m_player_audio.Open(m_hints_audio, m_av_clock, &m_omx_reader, deviceString,
m_passthrough, m_use_hw_audio,
m_boost_on_downmix, m_thread_player))
goto do_exit;
m_av_clock->SetSpeed(DVD_PLAYSPEED_NORMAL);
m_av_clock->OMXStateExecute();
m_av_clock->OMXStart(0.0);
struct timespec starttime, endtime;
PrintSubtitleInfo();
while(!m_stop)
{
int ch[8];
int chnum = 0;
if(g_abort)
goto do_exit;
while((ch[chnum] = getchar()) != EOF) chnum++;
if (chnum > 1) ch[0] = ch[chnum - 1] | (ch[chnum - 2] << 8);