|
本帖最后由 jieliujas 于 2019-5-23 08:37 编辑
环境:
RK3399arm板
系统是 RK官方 Linux+QT
使用RK官网例子 https://github.com/rockchip-linux/video
问题描述:
想实现非全屏播放,main()中的w.showFullScreen()改为w.show(),移植到3399板子上,视频画面显示不在mainwindow窗口中,只能看到一部分画面
图片传不上来,我放一个 csdn 提问的链接吧 https://ask.csdn.net/questions/762692
请问一下,这种情况应该如何处理
(补充1)感觉这是一个系统的bug,我使用的是Linux+QT来开发视频播放器,视频输出始终无法叠加到widget窗口之上,widget窗口和视频画面是两张皮的,不知道该如何是好。。。
播放时串口收到的数据如下:
[root@rk3399pro:/userdata]# launchApplication(PLATFORM_WAYLAND):application= "gallery" ,argv= ""
accept success.
server is run.
processFinished
qml: onLauncherApplicationState state:false
processExitCallback
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
xkbcommon: ERROR: couldn't find a Compose file for locale "zh_CN.utf8"
could not create XKB compose table for locale 'zh_CN.utf8'. Disabiling compose
[ 1458.384210] rk_vcodec: vpu_service_ioctl:1890: error: unknown vpu service ioctl cmd 40086c01
*** BUG ***
In pixman_region32_union_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug
[root@rk3399pro:/userdata]# launchApplication(PLATFORM_WAYLAND):application= "video" ,argv= ""
accept success.
close unuse accept socket fd.
server is run.
processFinished
qml: onLauncherApplicationState state:false
processExitCallback
(补充2)问题定位:
video.qml中 videoOutput 没有嵌入在父属性 Rectangle 中,请大神帮忙看看
video.qml内容如下:
- import QtQuick 2.0
- import QtMultimedia 5.0
- Rectangle {
- id:root
- objectName: qsTr("root")
- color:"black"
- opacity: 0
- MediaPlayer {
- id:mediaPlayer
- objectName: qsTr("mediaPlayer")
- autoLoad: false
- onError: {
- if (MediaPlayer.NoError != error) {
- console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
- root.fatalError()
- }
- }
- }
- VideoOutput {
- id: videoContent
- objectName: qsTr("videoContent")
- anchors.fill: parent
- anchors.topMargin: 0
- source: mediaPlayer
- }
- }
(补充3)问题继续分析:
VideoOutPut中的 anchors.fill:parent 这句执行有问题,在板子上这句只是将video画面大小缩放为parent大小,但是并没有将video画面叠加在parent之上,请高人指教
|
|