[vlc-devel] [PATCH] Mozilla FullScreen support

Jean-Baptiste Kempf jb at videolan.org
Wed Jun 1 12:16:52 CEST 2011


On Wed, May 25, 2011 at 10:33:10PM +0700, Sergey Radionov wrote :
> Reformated version


> +        VlcPlugin* p_plugin = getPrivate<VlcPlugin>();
> +
>          switch( index )
>          {
>              case ID_root_audio:
> @@ -144,6 +148,44 @@ LibvlcRootNPObject::getProperty(int index, NPVariant &result)
>                  return INVOKERESULT_NO_ERROR;
>              case ID_root_VersionInfo:
>                  return invokeResultString(libvlc_get_version(),result);
> +            case ID_root_NewMessageFlag:
> +            {
> +                bool val = p_plugin->getNewMessageFlag();
> +                BOOLEAN_TO_NPVARIANT(val, result);
> +                return INVOKERESULT_NO_ERROR;
> +            }
> +            default:
> +                ;
> +        }
> +    }
> +    return INVOKERESULT_GENERIC_ERROR;
> +}
> +RuntimeNPObject::InvokeResult
> +LibvlcRootNPObject::setProperty(int index, const NPVariant &value)
> +{
> +    /* is plugin still running */
> +    if( isPluginRunning() )
> +    {
> +        VlcPlugin* p_plugin = getPrivate<VlcPlugin>();
> +
> +        /*
> +        libvlc_media_player_t *p_md = p_plugin->getMD();
> +        if( !p_md )
> +            RETURN_ON_ERROR;
> +        */
> +        switch( index )
> +        {
> +            case ID_root_NewMessageFlag:
> +            {
> +                if( ! NPVARIANT_IS_BOOLEAN(value) )
> +                {
> +                    return INVOKERESULT_INVALID_VALUE;
> +                }
> +
> +                bool val = NPVARIANT_TO_BOOLEAN(value);
> +                p_plugin->setNewMessageFlag(val);
> +                return INVOKERESULT_NO_ERROR;
> +            }
>              default:
>                  ;

> diff --git a/projects/mozilla/control/npolibvlc.h b/projects/mozilla/control/npolibvlc.h
> index c6d8694..70477ee 100644
> --- a/projects/mozilla/control/npolibvlc.h
> +++ b/projects/mozilla/control/npolibvlc.h
> @@ -46,6 +46,7 @@ protected:
>      static const NPUTF8 * const propertyNames[];
>  
>      InvokeResult getProperty(int index, NPVariant &result);
> +    InvokeResult setProperty(int index, const NPVariant &value);
>  
>      static const int methodCount;
>      static const NPUTF8 * const methodNames[];

All this should be in a separate patch, :D



> +typedef VlcPlugin VLCPlugin;
Why?

Exactly the same remarks on the FS controller than on the ActiveX part.
How much of the code is identical?

Fullscreen part should be ok.

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list