Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f01a23d5
Commit
f01a23d5
authored
Dec 09, 2007
by
Jean-Paul Saman
Committed by
Jean-Paul Saman
Mar 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix backporting of mozilla plugin.
parent
f38a36b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
54 deletions
+89
-54
include/vlc/libvlc.h
include/vlc/libvlc.h
+32
-0
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+57
-54
No files found.
include/vlc/libvlc.h
View file @
f01a23d5
...
...
@@ -508,6 +508,38 @@ int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
*/
void
libvlc_audio_set_volume
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Get current audio track
* \param p_input input instance
* \param p_exception an initialized exception
* \return the audio track (int)
*/
int
libvlc_audio_get_track
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Set current audio track
* \param p_input input instance
* \param i_track the track (int)
* \param p_exception an initialized exception
*/
void
libvlc_audio_set_track
(
libvlc_input_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Get current audio channel
* \param p_instance input instance
* \param p_exception an initialized exception
* \return the audio channel (int)
*/
int
libvlc_audio_get_channel
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Set current audio channel
* \param p_instance input instance
* \param i_channel the audio channel (int)
* \param p_exception an initialized exception
*/
void
libvlc_audio_set_channel
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/** @} */
...
...
mozilla/control/npolibvlc.cpp
View file @
f01a23d5
...
...
@@ -320,8 +320,8 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
}
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_track
:
if
(
isNumberValue
(
value
)
)
{
int
track
;
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
...
...
@@ -329,7 +329,7 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
track
=
libvlc_audio_get_track
(
p_input
,
&
ex
);
libvlc_audio_set_track
(
p_input
,
numberValue
(
value
)
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
...
...
@@ -337,21 +337,24 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
INT32_TO_NPVARIANT
(
track
,
result
);
return
INVOKERESULT_NO_ERROR
;
libvlc_input_free
(
p_input
);
}
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_channel
:
if
(
isNumberValue
(
value
)
)
{
int
channel
=
libvlc_audio_get_channel
(
p_plugin
->
getVLC
(),
&
ex
);
libvlc_audio_set_channel
(
p_plugin
->
getVLC
(),
numberValue
(
value
),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
INT32_TO_NPVARIANT
(
channel
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
return
INVOKERESULT_INVALID_VALUE
;
default:
;
}
...
...
@@ -1772,19 +1775,6 @@ void LibvlcPlaylistNPObject::parseOptions(NPObject *obj, int *i_options, char***
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
}
case
ID_video_teletext
:
{
int
i_page
=
libvlc_video_get_teletext
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
INT32_TO_NPVARIANT
(
i_page
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
}
}
}
...
...
@@ -1809,7 +1799,7 @@ enum LibvlcVideoNPObjectPropertyIds
ID_video_height
,
ID_video_width
,
ID_video_aspectratio
,
ID_video_subtitle
ID_video_subtitle
,
ID_video_teletext
};
...
...
@@ -1904,10 +1894,7 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
}
case
ID_video_teletext
:
{
if
(
isNumberValue
(
value
)
)
{
libvlc_video_set_teletext
(
p_input
,
numberValue
(
value
),
&
ex
);
int
i_page
=
libvlc_video_get_teletext
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
...
...
@@ -1915,11 +1902,9 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
INT32_TO_NPVARIANT
(
i_page
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
libvlc_input_free
(
p_input
);
return
INVOKERESULT_INVALID_VALUE
;
}
}
libvlc_input_free
(
p_input
);
}
...
...
@@ -2010,6 +1995,24 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
libvlc_input_free
(
p_input
);
return
INVOKERESULT_INVALID_VALUE
;
}
case
ID_video_teletext
:
{
if
(
isNumberValue
(
value
)
)
{
libvlc_video_set_teletext
(
p_input
,
numberValue
(
value
),
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
return
INVOKERESULT_NO_ERROR
;
}
libvlc_input_free
(
p_input
);
return
INVOKERESULT_INVALID_VALUE
;
}
}
libvlc_input_free
(
p_input
);
}
...
...
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