本文整理汇总了C++中OMXReader::GetAudioIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ OMXReader::GetAudioIndex方法的具体用法?C++ OMXReader::GetAudioIndex怎么用?C++ OMXReader::GetAudioIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OMXReader
的用法示例。
在下文中一共展示了OMXReader::GetAudioIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
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);
switch(ch[0])
{
case 'z':
m_tv_show_info = !m_tv_show_info;
vc_tv_show_info(m_tv_show_info);
break;
case '1':
SetSpeed(m_av_clock->OMXPlaySpeed() - 1);
break;
case '2':
SetSpeed(m_av_clock->OMXPlaySpeed() + 1);
break;
case 'j':
if(m_has_audio)
{
int new_index = m_omx_reader.GetAudioIndex() - 1;
if (new_index >= 0)
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, new_index);
}
break;
case 'k':
if(m_has_audio)
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_omx_reader.GetAudioIndex() + 1);
break;
case 'i':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() - 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = -600.0;
}
break;
case 'o':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() + 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = 600.0;
}
break;
case 'n':
if(m_has_subtitle)
示例2: main
//.........这里部分代码省略.........
m_passthrough, m_use_hw_audio, m_thread_player))
goto do_exit;
m_av_clock->SetSpeed(DVD_PLAYSPEED_NORMAL);
m_av_clock->OMXStateExecute();
m_av_clock->OMXStart();
struct timespec starttime, endtime;
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);
switch(ch[0])
{
case 'z':
m_tv_show_info = !m_tv_show_info;
vc_tv_show_info(m_tv_show_info);
break;
case '1':
SetSpeed(m_av_clock->OMXPlaySpeed() - 1);
break;
case '2':
SetSpeed(m_av_clock->OMXPlaySpeed() + 1);
break;
case 'j':
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_omx_reader.GetAudioIndex() - 1);
break;
case 'k':
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_omx_reader.GetAudioIndex() + 1);
break;
case 'i':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() - 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = -600.0;
}
break;
case 'o':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() + 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = 600.0;
}
break;
case 'n':
if(m_omx_reader.GetSubtitleIndex() > 0)
{
m_omx_reader.SetActiveStream(OMXSTREAM_SUBTITLE, m_omx_reader.GetSubtitleIndex() - 1);
m_player_video.FlushSubtitles();
}
示例3: startVideo
//.........这里部分代码省略.........
struct timespec starttime, endtime;
printf("Subtitle count : %d state %s : index %d\n",
m_omx_reader.SubtitleStreamCount(), m_show_subtitle ? "on" : "off",
(m_omx_reader.SubtitleStreamCount() > 0) ? m_subtitle_index + 1 : m_subtitle_index);
while(!m_stop)
{
int ch[8];
int chnum = 0;
if(g_abort)
goto do_exit;
#if 0
while((ch[chnum] = getchar()) != EOF) chnum++;
if (chnum > 1) ch[0] = ch[chnum - 1] | (ch[chnum - 2] << 8);
switch(ch[0])
{
case 'z':
m_tv_show_info = !m_tv_show_info;
vc_tv_show_info(m_tv_show_info);
break;
case '1':
SetSpeed(m_av_clock->OMXPlaySpeed() - 1);
break;
case '2':
SetSpeed(m_av_clock->OMXPlaySpeed() + 1);
break;
case 'j':
if(m_has_audio)
{
int new_index = m_omx_reader.GetAudioIndex() - 1;
if (new_index >= 0)
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, new_index);
}
break;
case 'k':
if(m_has_audio)
m_omx_reader.SetActiveStream(OMXSTREAM_AUDIO, m_omx_reader.GetAudioIndex() + 1);
break;
case 'i':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() - 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = -600.0;
}
break;
case 'o':
if(m_omx_reader.GetChapterCount() > 0)
{
m_omx_reader.SeekChapter(m_omx_reader.GetChapter() + 1, &startpts);
FlushStreams(startpts);
}
else
{
m_incr = 600.0;
}
break;
case 'n':
if(m_has_subtitle)