{"action":"opened","issue":{"url":"https://api.github.com/repos/wang-bin/QtAV/issues/841","repository_url":"https://api.github.com/repos/wang-bin/QtAV","labels_url":"https://api.github.com/repos/wang-bin/QtAV/issues/841/labels{/name}","comments_url":"https://api.github.com/repos/wang-bin/QtAV/issues/841/comments","events_url":"https://api.github.com/repos/wang-bin/QtAV/issues/841/events","html_url":"https://github.com/wang-bin/QtAV/issues/841","id":218457438,"number":841,"title":"glsl filter: android","user":{"login":"PassionK","id":19585173,"avatar_url":"https://avatars1.githubusercontent.com/u/19585173?v=3","gravatar_id":"","url":"https://api.github.com/users/PassionK","html_url":"https://github.com/PassionK","followers_url":"https://api.github.com/users/PassionK/followers","following_url":"https://api.github.com/users/PassionK/following{/other_user}","gists_url":"https://api.github.com/users/PassionK/gists{/gist_id}","starred_url":"https://api.github.com/users/PassionK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PassionK/subscriptions","organizations_url":"https://api.github.com/users/PassionK/orgs","repos_url":"https://api.github.com/users/PassionK/repos","events_url":"https://api.github.com/users/PassionK/events{/privacy}","received_events_url":"https://api.github.com/users/PassionK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-31T10:07:27Z","updated_at":"2017-03-31T10:07:27Z","closed_at":null,"body":"你好, 大神\r\n我把glsl filter想要适应在安卓,\r\n首先我试过在windows且确认使用好，但是我不能在安卓的。\r\n那么把glsl filter我能不能用在安卓呢？\r\n我用QT5,7和安卓6.0, 我的代码是如下,\r\n\r\nimport QtQuick 2.7\r\nimport QtQuick.Window 2.2\r\nimport QtQuick.Dialogs 1.2\r\nimport QtAV 1.7\r\n\r\nWindow {\r\n    visible: true\r\n    width: 640\r\n    height: 480\r\n    title: qsTr(\"Hello World\")\r\n\r\n    Rectangle {\r\n        anchors.fill: parent\r\n        color: \"black\"\r\n\r\n        VideoFilter {\r\n            id: negate\r\n            type: VideoFilter.GLSLFilter\r\n            shader: Shader {\r\n                postProcess: \"gl_FragColor.rgb = vec3(1.0-gl_FragColor.r, 1.0-gl_FragColor.g, 1.0-gl_FragColor.b);\"\r\n            }\r\n        }\r\n\r\n        VideoFilter {\r\n            id: grayscale\r\n            type: VideoFilter.GLSLFilter\r\n            shader: Shader {\r\n                postProcess: \"gl_FragColor.rgb = vec3(gl_FragColor.r * 0.3 +  gl_FragColor.g * 0.59 + gl_FragColor.b * 0.11, gl_FragColor.r * 0.3 +  gl_FragColor.g * 0.59 + gl_FragColor.b * 0.11, gl_FragColor.r * 0.3 +  gl_FragColor.g * 0.59 + gl_FragColor.b * 0.11);\"\r\n            }\r\n        }\r\n\r\n        VideoFilter {\r\n            id: hflip\r\n            type: VideoFilter.GLSLFilter\r\n            shader: Shader {\r\n                sample: \"vec4 sample2d(sampler2D tex, vec2 pos, int p) {return texture(tex, vec2(1.0-pos.x, pos.y));}\"\r\n            }\r\n        }\r\n\r\n        VideoOutput2 {\r\n            id: videoOutput\r\n            anchors.fill: parent\r\n            source: video\r\n            opengl: true\r\n            filters: [grayscale, hflip]\r\n        }\r\n\r\n        MediaPlayer {\r\n            id: video\r\n            autoPlay: true\r\n        }\r\n\r\n       MouseArea {\r\n           anchors.fill: parent\r\n           onClicked: {\r\n               fileDialog.open();\r\n           }\r\n       }\r\n        FileDialog {\r\n            id: fileDialog\r\n            onAccepted: video.source = fileUrl\r\n        }\r\n    }\r\n}\r\n这个代码是在windows好的，但是在安卓不行的。\r\n您帮忙我吧。\r\n谢谢。"}}
{"actor":{"display_login":"PassionK"}}