[vlc-devel] [PATCH] NPAPI change: introduce MediaDescription object for exposing media meta information
Cheng Sun
cheng.sun at ymail.com
Fri Jan 13 19:13:34 CET 2012
On 13/01/12 03:51, Sergey Radionov wrote:
> 2012/1/13 JM Lambert <jeanmichel.lambert7 at gmail.com>:
>> +RuntimeNPObject::InvokeResult
>> +LibvlcMediaDescriptionNPObject::setProperty(int index, const NPVariant &value)
>> +{
>> + /* is plugin still running */
>> + if( isPluginRunning() )
>> + {
>> + switch( index )
>> + {
>> + case ID_none:
>> + return INVOKERESULT_NO_SUCH_METHOD;
>> + default:
>> + ;
>> + }
>> + }
>> + return INVOKERESULT_GENERIC_ERROR;
>> +}
If there are no writable properties then you don't need to override this.
>> +
>> +const NPUTF8 * const LibvlcMediaDescriptionNPObject::methodNames[] =
>> +{
>> + "None"
>> +};
>> +COUNTNAMES(LibvlcMediaDescriptionNPObject,methodCount,methodNames);
>> +
>> +enum LibvlcMediaDescriptionNPObjectMethodIds
>> +{
>> + ID_mediadescription_method_none,
>> +};
>> +RuntimeNPObject::InvokeResult
>> +LibvlcMediaDescriptionNPObject::invoke(int index, const NPVariant *args,
>> + uint32_t argCount, NPVariant &result)
>> +{
>> + /* is plugin still running */
>> + if( isPluginRunning() )
>> + {
>> + switch( index )
>> + {
>> + case ID_mediadescription_method_none:
>> + return INVOKERESULT_NO_SUCH_METHOD;
>> + default:
>> + ;
>> + }
>> + }
>> + return INVOKERESULT_GENERIC_ERROR;
>> +}
Similarly for invokable methods.
-- Cheng
More information about the vlc-devel
mailing list