Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Sep 9, 2014
1 parent 5a3b73c commit 4061351
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 317 deletions.
6 changes: 3 additions & 3 deletions examples/player/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void MainWindow::setupUi()
QWidgetAction *pWA = 0;
mpMenu = new QMenu(mpMenuBtn);
mpMenu->addAction(tr("Open Url"), this, SLOT(openUrl()));
mpMenu->addAction(tr("Online channels"), this, SLOT(onTVMenuClick()));
//mpMenu->addAction(tr("Online channels"), this, SLOT(onTVMenuClick()));
mpMenu->addSeparator();

subMenu = new QMenu(tr("Play list"));
Expand Down Expand Up @@ -407,7 +407,7 @@ void MainWindow::setupUi()
csBox->addItem(cs, cs);
}
connect(csBox, SIGNAL(activated(QString)), SLOT(setSubtitleCharset(QString)));
mpSubtitle->setCodec(csBox->currentData().toByteArray());
mpSubtitle->setCodec(csBox->itemData(csBox->currentIndex()).toByteArray());
csBox->setToolTip(tr("Auto detect requires libchardet"));

subMenu = new ClickableMenu(tr("Audio track"));
Expand Down Expand Up @@ -1390,7 +1390,7 @@ void MainWindow::setSubtitleCharset(const QString &charSet)
QComboBox *box = qobject_cast<QComboBox*>(sender());
if (!box)
return;
mpSubtitle->setCodec(box->currentData().toByteArray());
mpSubtitle->setCodec(box->itemData(box->currentIndex()).toByteArray());
}

void MainWindow::workaroundRendererSize()
Expand Down
2 changes: 1 addition & 1 deletion examples/player/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ int main(int argc, char *argv[])
window.setVideoDecoderNames(vd);


idx = a.arguments().indexOf("--ffmpeg-log");
idx = a.arguments().indexOf("--no-ffmpeg-log");
idxmax = qMax(idx, idxmax);
if (idx < 0)
setFFmpegLogHandler(0);
Expand Down
2 changes: 1 addition & 1 deletion examples/player/res/help-zh_CN.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h4>命令行</h4>
<pre><code>
player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[;cuda[;vaapi[;ffmpeg]]]"] [--ffmpeg-log] [url|path|pipe:]
player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[;cuda[;vaapi[;vda[;ffmpeg]]]]"] [--ffmpeg-log] [url|path|pipe:]
</code></pre>
<p>关闭音频 <code>-ao null<code></p>
<p>选择渲染引擎用 <em>-vo</em> 选项。选项值可为qt, gl(默认), d2d, gdi, xv</p>
Expand Down
2 changes: 1 addition & 1 deletion examples/player/res/help.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h4>Command Line</h4>
<pre><code>
player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[;cuda[;vaapi[;ffmpeg]]]"] [--ffmpeg-log] [url|path|pipe:]
player [-ao null] [-vo qt|gl|d2d|gdi|xv] [-vd "dxva[;cuda[;vaapi[;vda[;ffmpeg]]]]"] [--ffmpeg-log] [url|path|pipe:]
</code></pre>
<p>To disable audio output, add <code>-ao null<code></p>
<p>Choose a render engine with <em>-vo</em> option(default is OpenGL). For example, in windows that support Direct2D, you can run</p>
Expand Down
Loading

0 comments on commit 4061351

Please sign in to comment.