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
056c9fe3
Commit
056c9fe3
authored
Oct 28, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added log APIs to javascript for mozilla
parent
3a168d9e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
582 additions
and
1 deletion
+582
-1
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+455
-0
mozilla/control/npolibvlc.h
mozilla/control/npolibvlc.h
+127
-1
No files found.
mozilla/control/npolibvlc.cpp
View file @
056c9fe3
This diff is collapsed.
Click to expand it.
mozilla/control/npolibvlc.h
View file @
056c9fe3
...
...
@@ -23,6 +23,7 @@
/*
** defined runtime script objects
*/
#include <vlc/libvlc.h>
#include "nporuntime.h"
...
...
@@ -44,6 +45,7 @@ protected:
NPObject
*
audioObj
;
NPObject
*
inputObj
;
NPObject
*
logObj
;
NPObject
*
playlistObj
;
NPObject
*
videoObj
;
};
...
...
@@ -76,7 +78,7 @@ protected:
LibvlcInputNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
RuntimeNPObject
(
instance
,
aClass
)
{};
virtual
~
LibvlcInputNPObject
()
{};
static
const
int
propertyCount
;
...
...
@@ -89,6 +91,130 @@ protected:
static
const
NPUTF8
*
const
methodNames
[];
};
class
LibvlcMessageNPObject
:
public
RuntimeNPObject
{
public:
void
setMessage
(
struct
libvlc_log_message_t
&
msg
)
{
_msg
=
msg
;
};
protected:
friend
class
RuntimeNPClass
<
LibvlcMessageNPObject
>
;
LibvlcMessageNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
RuntimeNPObject
(
instance
,
aClass
)
{};
virtual
~
LibvlcMessageNPObject
()
{};
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
InvokeResult
getProperty
(
int
index
,
NPVariant
&
result
);
static
const
int
methodCount
;
static
const
NPUTF8
*
const
methodNames
[];
private:
struct
libvlc_log_message_t
_msg
;
};
class
LibvlcLogNPObject
;
class
LibvlcMessageIteratorNPObject
:
public
RuntimeNPObject
{
public:
void
setLog
(
LibvlcLogNPObject
*
p_vlclog
);
protected:
friend
class
RuntimeNPClass
<
LibvlcMessageIteratorNPObject
>
;
LibvlcMessageIteratorNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
RuntimeNPObject
(
instance
,
aClass
)
{};
virtual
~
LibvlcMessageIteratorNPObject
()
{};
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
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
);
private:
LibvlcLogNPObject
*
_p_vlclog
;
libvlc_log_iterator_t
*
_p_iter
;
};
class
LibvlcMessagesNPObject
:
public
RuntimeNPObject
{
public:
void
setLog
(
LibvlcLogNPObject
*
p_log
)
{
_p_vlclog
=
p_log
;
}
protected:
friend
class
RuntimeNPClass
<
LibvlcMessagesNPObject
>
;
LibvlcMessagesNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
_p_vlclog
(
NULL
),
RuntimeNPObject
(
instance
,
aClass
)
{};
virtual
~
LibvlcMessagesNPObject
()
{};
static
const
int
propertyCount
;
static
const
NPUTF8
*
const
propertyNames
[];
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
);
private:
LibvlcLogNPObject
*
_p_vlclog
;
};
class
LibvlcLogNPObject
:
public
RuntimeNPObject
{
protected:
friend
class
RuntimeNPClass
<
LibvlcLogNPObject
>
;
friend
class
LibvlcMessagesNPObject
;
friend
class
LibvlcMessageIteratorNPObject
;
libvlc_log_t
*
_p_log
;
LibvlcLogNPObject
(
NPP
instance
,
const
NPClass
*
aClass
)
:
RuntimeNPObject
(
instance
,
aClass
),
_p_log
(
NULL
)
{
_p_vlcmessages
=
static_cast
<
LibvlcMessagesNPObject
*>
(
NPN_CreateObject
(
instance
,
RuntimeNPClass
<
LibvlcMessagesNPObject
>::
getClass
()));
_p_vlcmessages
->
setLog
(
this
);
};
virtual
~
LibvlcLogNPObject
()
{
NPN_ReleaseObject
(
_p_vlcmessages
);
};
static
const
int
propertyCount
;
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
[];
private:
LibvlcMessagesNPObject
*
_p_vlcmessages
;
};
class
LibvlcPlaylistNPObject
:
public
RuntimeNPObject
{
protected:
...
...
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