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

Jan Pokorny pokorj at gmail.com
Fri Mar 15 21:09:07 CET 2013


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



More information about the vlc-devel mailing list