[vlc-devel] Fwd: Call rotate filter in the source code

Jan Pokorny pokorj at gmail.com
Tue Mar 12 15:27:57 CET 2013


---------- Forwarded message ----------
From: Jan Pokorny <pokorj at gmail.com>
Date: Tue, Mar 12, 2013 at 9:53 AM
Subject: Re: [vlc-devel] Call rotate filter in the source code
To: Rémi Denis-Courmont <remi at remlab.net>


OK, I've made some progress and the following code seems to work
properly, so how about this as a code in hotkeys.c?

case ACTIONID_ROTATE90:
        {
            char *vf = var_GetString( p_vout, "video-filter");

            /*if "transform" filter is not active*/
            if( strcmp(vf,"transform") != 0 )
            {
                config_PutPsz( p_vout, "transform-type", "90" );
            }
            /*if "transform" filter is active*/
            else
            {
                char *tt = config_GetPsz( p_vout, "transform-type");
                if( strcmp( tt,"90" ) == 0 )
                {
                    config_PutPsz( p_vout, "transform-type", "180" );
                }
                else if (strcmp( tt,"180") == 0 )
                {
                    config_PutPsz( p_vout, "transform-type", "270" );
                }
                else if (strcmp( tt,"270") == 0 )
                {
                    var_SetString( p_vout, "video-filter", "" );
                    break;
                }
            }
            var_SetString( p_vout, "video-filter", "transform" );
            break;
        }


Thanks in advance,
JP

On Sun, Feb 24, 2013 at 10:36 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le vendredi 22 février 2013 21:40:31, Jan Pokorny a écrit :
>> Thanks, therefore something like
>>
>> config_PutPsz( p_vout, "angle", "90" );
>> var_SetString( p_vout, "video-filter", "rotate" );
>
> var_Set...(p_vout, ...) is the mechanism of choice.
>
>> will rotate the video by 90 degrees? I deduced this from motion.c
>> where the transform filter is called instead...
>
> Transform is the correct filter to use for rectangular rotation.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/



More information about the vlc-devel mailing list