[vlc-devel] [PATCH] Mozilla FullScreen support
Sergey Radionov
rsatom at gmail.com
Wed Jun 1 15:35:45 CEST 2011
2011/6/1 Jean-Baptiste Kempf <jb at videolan.org>
> 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?
>
To make maximum amount of code identical in ActiveX and Mozilla versions. It
helps synchronize changes,
cause to match amount of code is identical (and logic is absolutely
identical).
>
> Exactly the same remarks on the FS controller than on the ActiveX part.
>
Ok, Accepted.
> How much of the code is identical?
>
See comment above.
May be I make fullscreen part self-sufficient, so anybody could use it in
any project usig libvlc... I'll think whether it is possible or not...
> Fullscreen part should be ok.
>
> Best Regards,
>
> --
> Jean-Baptiste Kempf
> http://www.jbkempf.com/ - +33 672 704 734
> Sent from my Electronic Device
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110601/d665b631/attachment.html>
More information about the vlc-devel
mailing list