Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
310dfdca
Commit
310dfdca
authored
Aug 28, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- formating
- javascript fixes
parent
2454f03d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
335 additions
and
151 deletions
+335
-151
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+251
-69
mozilla/control/npolibvlc.h
mozilla/control/npolibvlc.h
+14
-11
mozilla/control/nporuntime.cpp
mozilla/control/nporuntime.cpp
+26
-5
mozilla/control/nporuntime.h
mozilla/control/nporuntime.h
+11
-8
mozilla/control/npovlc.cpp
mozilla/control/npovlc.cpp
+32
-57
mozilla/control/npovlc.h
mozilla/control/npovlc.h
+1
-1
No files found.
mozilla/control/npolibvlc.cpp
View file @
310dfdca
This diff is collapsed.
Click to expand it.
mozilla/control/npolibvlc.h
View file @
310dfdca
...
...
@@ -39,7 +39,7 @@ protected:
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
...
...
@@ -63,13 +63,13 @@ protected:
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
*
value
);
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
&
value
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
};
class
LibvlcInputNPObject
:
public
RuntimeNPObject
...
...
@@ -86,8 +86,8 @@ protected:
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
*
value
);
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
&
value
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
...
...
@@ -106,12 +106,15 @@ protected:
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
void
parseOptions
(
const
NPString
&
s
,
int
*
i_options
,
char
***
ppsz_options
);
void
parseOptions
(
NPObject
*
obj
,
int
*
i_options
,
char
***
ppsz_options
);
};
class
LibvlcVideoNPObject
:
public
RuntimeNPObject
...
...
@@ -127,13 +130,13 @@ protected:
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
*
value
);
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
InvokeResult
setProperty
(
int
index
,
const
NPVariant
&
value
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
};
mozilla/control/nporuntime.cpp
View file @
310dfdca
...
...
@@ -35,13 +35,34 @@
#include "nporuntime.h"
#include "vlcplugin.h"
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
getProperty
(
int
index
,
NPVariant
*
result
)
char
*
RuntimeNPObject
::
stringValue
(
const
NPString
&
s
)
{
NPUTF8
*
val
=
new
NPUTF8
[
s
.
utf8length
+
1
];
if
(
val
)
{
strncpy
(
val
,
s
.
utf8characters
,
s
.
utf8length
);
val
[
s
.
utf8length
]
=
'\0'
;
}
return
val
;
}
char
*
RuntimeNPObject
::
stringValue
(
const
NPVariant
&
v
)
{
char
*
s
=
NULL
;
if
(
NPVARIANT_IS_STRING
(
v
)
)
{
return
stringValue
(
NPVARIANT_TO_STRING
(
v
));
}
return
s
;
}
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
getProperty
(
int
index
,
NPVariant
&
result
)
{
/* default behaviour */
return
INVOKERESULT_GENERIC_ERROR
;
}
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
setProperty
(
int
index
,
const
NPVariant
*
value
)
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
setProperty
(
int
index
,
const
NPVariant
&
value
)
{
/* default behaviour */
return
INVOKERESULT_GENERIC_ERROR
;
...
...
@@ -53,16 +74,16 @@ RuntimeNPObject::InvokeResult RuntimeNPObject::removeProperty(int index)
return
INVOKERESULT_GENERIC_ERROR
;
}
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
)
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
)
{
/* default beahviour */
return
INVOKERESULT_GENERIC_ERROR
;
}
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
invokeDefault
(
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
)
RuntimeNPObject
::
InvokeResult
RuntimeNPObject
::
invokeDefault
(
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
)
{
/* return void */
VOID_TO_NPVARIANT
(
*
result
);
VOID_TO_NPVARIANT
(
result
);
return
INVOKERESULT_NO_ERROR
;
}
...
...
mozilla/control/nporuntime.h
View file @
310dfdca
...
...
@@ -52,6 +52,9 @@ public:
}
};
static
char
*
stringValue
(
const
NPString
&
v
);
static
char
*
stringValue
(
const
NPVariant
&
v
);
RuntimeNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
_instance
(
instance
)
{
...
...
@@ -88,11 +91,11 @@ protected:
uint32_t
argCount
,
NPVariant
*
result
);
virtual
InvokeResult
getProperty
(
int
index
,
NPVariant
*
result
);
virtual
InvokeResult
setProperty
(
int
index
,
const
NPVariant
*
value
);
virtual
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
virtual
InvokeResult
setProperty
(
int
index
,
const
NPVariant
&
value
);
virtual
InvokeResult
removeProperty
(
int
index
);
virtual
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
virtual
InvokeResult
invokeDefault
(
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
virtual
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
virtual
InvokeResult
invokeDefault
(
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
bool
returnInvokeResult
(
InvokeResult
result
);
...
...
@@ -162,7 +165,7 @@ static bool RuntimeNPClassGetProperty(NPObject *npobj, NPIdentifier name, NPVari
if
(
index
!=
-
1
)
{
RuntimeNPObject
*
vObj
=
static_cast
<
RuntimeNPObject
*>
(
npobj
);
return
vObj
->
returnInvokeResult
(
vObj
->
getProperty
(
index
,
result
));
return
vObj
->
returnInvokeResult
(
vObj
->
getProperty
(
index
,
*
result
));
}
return
false
;
}
...
...
@@ -175,7 +178,7 @@ static bool RuntimeNPClassSetProperty(NPObject *npobj, NPIdentifier name, const
if
(
index
!=
-
1
)
{
RuntimeNPObject
*
vObj
=
static_cast
<
RuntimeNPObject
*>
(
npobj
);
return
vObj
->
returnInvokeResult
(
vObj
->
setProperty
(
index
,
value
));
return
vObj
->
returnInvokeResult
(
vObj
->
setProperty
(
index
,
*
value
));
}
return
false
;
}
...
...
@@ -203,7 +206,7 @@ static bool RuntimeNPClassInvoke(NPObject *npobj, NPIdentifier name,
if
(
index
!=
-
1
)
{
RuntimeNPObject
*
vObj
=
static_cast
<
RuntimeNPObject
*>
(
npobj
);
return
vObj
->
returnInvokeResult
(
vObj
->
invoke
(
index
,
args
,
argCount
,
result
));
return
vObj
->
returnInvokeResult
(
vObj
->
invoke
(
index
,
args
,
argCount
,
*
result
));
}
return
false
;
...
...
@@ -216,7 +219,7 @@ static bool RuntimeNPClassInvokeDefault(NPObject *npobj,
NPVariant
*
result
)
{
RuntimeNPObject
*
vObj
=
static_cast
<
RuntimeNPObject
*>
(
npobj
);
return
vObj
->
returnInvokeResult
(
vObj
->
invokeDefault
(
args
,
argCount
,
result
));
return
vObj
->
returnInvokeResult
(
vObj
->
invokeDefault
(
args
,
argCount
,
*
result
));
}
template
<
class
T
>
...
...
mozilla/control/npovlc.cpp
View file @
310dfdca
This diff is collapsed.
Click to expand it.
mozilla/control/npovlc.h
View file @
310dfdca
...
...
@@ -43,6 +43,6 @@ protected:
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
virtual
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
*
result
);
virtual
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment