{"action":"created","issue":{"url":"https://api.github.com/repos/wang-bin/QtAV/issues/549","repository_url":"https://api.github.com/repos/wang-bin/QtAV","labels_url":"https://api.github.com/repos/wang-bin/QtAV/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/wang-bin/QtAV/issues/549/comments","events_url":"https://api.github.com/repos/wang-bin/QtAV/issues/549/events","html_url":"https://github.com/wang-bin/QtAV/issues/549","id":120015652,"number":549,"title":"simpleplayer example broken","user":{"login":"sklum","id":3186522,"avatar_url":"https://avatars.githubusercontent.com/u/3186522?v=3","gravatar_id":"","url":"https://api.github.com/users/sklum","html_url":"https://github.com/sklum","followers_url":"https://api.github.com/users/sklum/followers","following_url":"https://api.github.com/users/sklum/following{/other_user}","gists_url":"https://api.github.com/users/sklum/gists{/gist_id}","starred_url":"https://api.github.com/users/sklum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sklum/subscriptions","organizations_url":"https://api.github.com/users/sklum/orgs","repos_url":"https://api.github.com/users/sklum/repos","events_url":"https://api.github.com/users/sklum/events{/privacy}","received_events_url":"https://api.github.com/users/sklum/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2015-12-02T19:18:53Z","updated_at":"2016-10-14T16:22:28Z","closed_at":"2015-12-29T15:09:41Z","body":"Here's a minimally reproducing example.  The `VideoOutput` class seems to be the issue, as when I remove it, the widget will at least appear:\r\n```\r\nclass Reviewer : public QWidget\r\n{\r\n    Q_OBJECT\r\n\r\nprotected:\r\n    QGridLayout *layout;\r\n    VideoOutput *video;\r\n    AVPlayer *player;\r\n\r\npublic:\r\n    explicit Reviewer(QWidget *parent = 0) :\r\n        QWidget(parent),\r\n        layout(new QGridLayout())\r\n    {\r\n        player = new AVPlayer(this);\r\n        video = new VideoOutput(this);\r\n        player->setRenderer(video);\r\n        layout->addWidget(video->widget());\r\n        setLayout(layout);\r\n    }\r\n};\r\n\r\nint main(int argc, char *argv[])\r\n{\r\n    QtAV::Widgets::registerRenderers();\r\n    QApplication app(argc, argv);\r\n    Reviewer reviewer;\r\n    reviewer.show();\r\n    reviewer.resize(800, 600);\r\n\r\n    return app.exec();\r\n}\r\n```\r\n\r\nI get the runtime errors:\r\n```\r\nQObject: Cannot create children for a parent that is in a different thread.\r\n(Parent is Reviewer(0x7fff599bc8e8), parent's thread is QThread(0x7f8bc9c42970), current thread is QThread(0x7f8bc9e75560)\r\nQObject::connect: Cannot connect (null)::aboutToQuit() to QtAV::AVPlayer::aboutToQuitApp()\r\nQObject::connect: Cannot connect (null)::aboutToQuit() to QtAV::VideoCapture::handleAppQuit()\r\nQObject: Cannot create children for a parent that is in a different thread.\r\n(Parent is Reviewer(0x7fff599bc8e8), parent's thread is QThread(0x7f8bc9c42970), current thread is QThread(0x7f8bc9e75560)\r\nCannot create window: no screens available\r\n```"},"comment":{"url":"https://api.github.com/repos/wang-bin/QtAV/issues/comments/253850184","html_url":"https://github.com/wang-bin/QtAV/issues/549#issuecomment-253850184","issue_url":"https://api.github.com/repos/wang-bin/QtAV/issues/549","id":253850184,"user":{"login":"Dmi3Dev","id":13947995,"avatar_url":"https://avatars.githubusercontent.com/u/13947995?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmi3Dev","html_url":"https://github.com/Dmi3Dev","followers_url":"https://api.github.com/users/Dmi3Dev/followers","following_url":"https://api.github.com/users/Dmi3Dev/following{/other_user}","gists_url":"https://api.github.com/users/Dmi3Dev/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmi3Dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmi3Dev/subscriptions","organizations_url":"https://api.github.com/users/Dmi3Dev/orgs","repos_url":"https://api.github.com/users/Dmi3Dev/repos","events_url":"https://api.github.com/users/Dmi3Dev/events{/privacy}","received_events_url":"https://api.github.com/users/Dmi3Dev/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T16:22:28Z","updated_at":"2016-10-14T16:22:28Z","body":"Thanks for response. Unfortunately official binaries are only for 32 bit mingw and my end project need to be 64 bit. \r\nAt the moment, while I'm learning your awesome library on Windows side, I'm compiling in release with debug info, that should, hopefully help for now.\r\nBtw, even though Qt-project don't provide binaries for 64 bit, for those who needs that, they are recommend using MSYS2 version, or build it on top of it: https://wiki.qt.io/MinGW-64-bit\r\nI mostly work on Linux side, so I should be ok doing debug there (haven't tried your library there yet, but will post here if I get same problem). \r\nI know, you are probably super busy, but If you ever get time to support MSYS2 by building package for it, you would make many cross platform developers very happy. Also I want to say: awesome job on the library!\r\n"}}
{"actor":{"display_login":"Dmi3Dev"}}