Giter Site home page Giter Site logo

Comments (11)

RSATom avatar RSATom commented on July 28, 2024

Didn't find any libvlc option for it, and didn't find any QML effect, but it's still doable by modify shader a little bit at https://github.com/RSATom/QmlVlc/blob/master/SGVlcVideoNode.cpp#L76

from webchimera.

jeremywilliams avatar jeremywilliams commented on July 28, 2024

Ah great thank you!

from webchimera.

colek42 avatar colek42 commented on July 28, 2024

we are having some trouble compiling the source fron the current HEAD of master. vs2013 is giving the error mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Chimera.obj. Any suggestions? We have some custom QML files so we need to compile from source.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

Try delete build folder and rerun prep script

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

I've found how to solve this task solely on QML level:

    VlcVideoSurface {
        id: s1;
        source: vlcPlayer;
        anchors.fill: parent;
    }
    ShaderEffect {
        property variant source: ShaderEffectSource { sourceItem: s1; hideSource: true }
        anchors.fill: parent

        fragmentShader: "
            varying highp vec2 qt_TexCoord0;
            uniform sampler2D source;
            void main(void)
            {
                lowp vec4 tex = texture2D( source, qt_TexCoord0 );
                gl_FragColor = vec4( 1. - tex.r, 1. - tex.g, 1. - tex.b, tex.a );
            }
        "
    }

Btw, maybe it will be interesting to you, I've released proof-of-concept of desktop WebChimera: https://github.com/RSATom/WebChimera-desktop/releases

from webchimera.

sclem avatar sclem commented on July 28, 2024

@RSATom,

The invert filter worked great. How can I hide it at runtime? I tried setting visible: false, but it hides the VlcVideoSurface as well. I also tried opacity: 0. I've got my javascript functions hooked up with emitJsMessage on WebChimeraPlayer. and in Functions.qml.

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

I think you should try set hideSource = false first. If it will not help - I'll try find solution. I think it should be something simple.

from webchimera.

sclem avatar sclem commented on July 28, 2024

Just tried hideSource = false, no effect? Let me know if you find another solution, thanks!

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

following works for me:

    VlcPlayer {
        id: vlcPlayer;
        mrl: "http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.avi";
    }
    VlcVideoSurface {
        id: s1
        source: vlcPlayer;

        anchors.centerIn: parent;
        width: parent.width / 2;
        height: parent.height / 2;
    }
    ShaderEffectSource {
        id: shaderSource;
        sourceItem: s1;
        hideSource: true;
    }
    ShaderEffect {
        id: shaderEffect;
        anchors.centerIn: parent;
        width: parent.width / 2;
        height: parent.height / 2;

        property variant source: shaderSource;

        fragmentShader: "
            varying highp vec2 qt_TexCoord0;
            uniform sampler2D source;
            void main(void)
            {
                lowp vec4 tex = texture2D( source, qt_TexCoord0 );
                gl_FragColor = vec4( 1. - tex.r, 1. - tex.g, 1. - tex.b, tex.a );
            }
        "
    }
    MouseArea {
        anchors.fill: parent
        onClicked: { shaderSource.hideSource = !shaderSource.hideSource; shaderEffect.visible =  shaderSource.hideSource; }
    }

from webchimera.

sclem avatar sclem commented on July 28, 2024

You're the man. That worked perfect, thanks!

from webchimera.

RSATom avatar RSATom commented on July 28, 2024

I'm glad to see you happy :)

from webchimera.

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.