Giter Club home page Giter Club logo

Comments (3)

itisyang avatar itisyang commented on June 14, 2024

目前没有Mac啊,穷人。。。

from playerdemo.

hathuang avatar hathuang commented on June 14, 2024

环境:
Mac OS 11.3.1
Qt 5.15.2
SDL 2.0.14
ffmpeg 4.3.2

Mac版需要改
1, sdl初始化,sdl_window, sdl_renderer 初始化在主线程
2, sdl event循环在主线程 (我采用的是 QTimer + 写缓存 , 原来读取位置 改为 读缓存)

问题描述:

但是 目前出现的问题是SDL渲染了整个窗口(文件列表、播放进度条都 被覆盖);

ui->label宽高本来是:649 x 363
但是window = SDL_CreateWindowFrom((void *)play_wid);之后
SDL_GetWindowSize(window, &w, &h);获得宽高却是800 x 500

设置SDL_SetWindowSize(window, w, h);也没用, 是整个窗口变小或变大,但是 渲染区域也成了整个窗口。

求解决方案!!! 感谢!!!

from playerdemo.

itisyang avatar itisyang commented on June 14, 2024

环境:
Mac OS 11.3.1
Qt 5.15.2
SDL 2.0.14
ffmpeg 4.3.2

Mac版需要改
1, sdl初始化,sdl_window, sdl_renderer 初始化在主线程
2, sdl event循环在主线程 (我采用的是 QTimer + 写缓存 , 原来读取位置 改为 读缓存)

问题描述:

但是 目前出现的问题是SDL渲染了整个窗口(文件列表、播放进度条都 被覆盖);

ui->label宽高本来是:649 x 363
但是window = SDL_CreateWindowFrom((void *)play_wid);之后
SDL_GetWindowSize(window, &w, &h);获得宽高却是800 x 500

设置SDL_SetWindowSize(window, w, h);也没用, 是整个窗口变小或变大,但是 渲染区域也成了整个窗口。

求解决方案!!! 感谢!!!

win和Mac坐标系不一致导致的,ubuntu一些情况下也存在这个问题,需要自己测试原点在哪个位置,然后对渲染坐标进行对应的调整

from playerdemo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.