禁用在QMediaPlayer中显示字幕文件 [英] Disable showing subtitle file in QMediaPlayer

查看:278
本文介绍了禁用在QMediaPlayer中显示字幕文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用DirectVobSub禁用QMediaPlayer自动加载字幕,DirectVobSub是K-Lite编解码器包的工具?如果字幕文件位于视频文件的同一目录中,我是否不想在QMediaPlayer中显示字幕?

How to disable QMediaPlayer autoload subtitles with DirectVobSub which is tools of K-Lite Codec Pack? i don't want to show subtitle in QMediaPlayer if the subtitle file be in same directory of the video file?

推荐答案

您必须在文件qgstreamerplayersession.cpp的playbin2上取消设置标志GST_PLAY_FLAG_TEXT,构建插件并使用它.该标志默认情况下处于启用状态.在Qt 5.2中,您可以在qtmultimedia/src/plugins/gstreamer/mediaplayer中找到该文件.对于较旧的4.x版本,文件位置可能会有所不同.

You have to unset the flag GST_PLAY_FLAG_TEXT on playbin2 in the file qgstreamerplayersession.cpp, build the plugin and use it. The flag is on by default. In Qt 5.2 the you will find the file at qtmultimedia/src/plugins/gstreamer/mediaplayer. The file location may be different for the older 4.x versions.

这篇关于禁用在QMediaPlayer中显示字幕文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆