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
e4b790fd
Commit
e4b790fd
authored
Mar 27, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert the ABI breakage introduced in rev [19469] [19471]
parent
8d14e71f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
576 deletions
+5
-576
activex/axvlc.idl
activex/axvlc.idl
+0
-15
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+0
-150
activex/vlccontrol2.h
activex/vlccontrol2.h
+1
-7
include/vlc/libvlc.h
include/vlc/libvlc.h
+1
-52
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+3
-108
src/control/audio.c
src/control/audio.c
+0
-176
src/control/video.c
src/control/video.c
+0
-68
No files found.
activex/axvlc.idl
View file @
e4b790fd
...
@@ -199,16 +199,6 @@ library AXVLC
...
@@ -199,16 +199,6 @@ library AXVLC
[
helpstring
(
"Mute/unmute audio playback."
)
]
[
helpstring
(
"Mute/unmute audio playback."
)
]
HRESULT
toggleMute
()
;
HRESULT
toggleMute
()
;
[
propget
,
helpstring
(
"Returns/sets audio track used/to use."
)
]
HRESULT
track
(
[
out
,
retval
]
long
*
track
)
;
[
propput
,
helpstring
(
"Returns/sets audio track used/to use."
)
]
HRESULT
track
(
[
in
]
long
track
)
;
[
propget
,
helpstring
(
"Returns audio channel [1-5] indicating; stereo, reverse stereo, left, right, dolby."
)
]
HRESULT
channel
(
[
out
,
retval
]
long
*
channel
)
;
[
propput
,
helpstring
(
"Sets audio channel to [1-5] indicating; stereo, reverse stereo, left, right, dolby."
)
]
HRESULT
channel
(
[
in
]
long
channel
)
;
}
;
}
;
[
[
...
@@ -422,11 +412,6 @@ library AXVLC
...
@@ -422,11 +412,6 @@ library AXVLC
[
propput
,
helpstring
(
"Sets video aspect ratio."
)
]
[
propput
,
helpstring
(
"Sets video aspect ratio."
)
]
HRESULT
aspectRatio
(
[
in
]
BSTR
aspect
)
;
HRESULT
aspectRatio
(
[
in
]
BSTR
aspect
)
;
[
propget
,
helpstring
(
"Returns video subtitle used."
)
]
HRESULT
subtitle
(
[
out
,
retval
]
long
*
spu
)
;
[
propput
,
helpstring
(
"Sets video subtitle to use."
)
]
HRESULT
subtitle
(
[
in
]
long
spu
)
;
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
[
helpstring
(
"toggle fullscreen/windowed state."
)
]
HRESULT
toggleFullscreen
()
;
HRESULT
toggleFullscreen
()
;
}
;
}
;
...
...
activex/vlccontrol2.cpp
View file @
e4b790fd
...
@@ -200,104 +200,6 @@ STDMETHODIMP VLCAudio::put_volume(long volume)
...
@@ -200,104 +200,6 @@ STDMETHODIMP VLCAudio::put_volume(long volume)
return
hr
;
return
hr
;
};
};
STDMETHODIMP
VLCAudio
::
get_track
(
long
*
track
)
{
if
(
NULL
==
track
)
return
E_POINTER
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
*
track
=
libvlc_audio_get_track
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCAudio
::
put_track
(
long
track
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
libvlc_audio_set_track
(
p_input
,
track
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCAudio
::
get_channel
(
long
*
channel
)
{
if
(
NULL
==
channel
)
return
E_POINTER
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
*
channel
=
libvlc_audio_get_channel
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCAudio
::
put_channel
(
long
channel
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_audio_set_channel
(
p_libvlc
,
channel
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCAudio
::
toggleMute
()
STDMETHODIMP
VLCAudio
::
toggleMute
()
{
{
libvlc_instance_t
*
p_libvlc
;
libvlc_instance_t
*
p_libvlc
;
...
@@ -2222,58 +2124,6 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
...
@@ -2222,58 +2124,6 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
return
hr
;
return
hr
;
};
};
STDMETHODIMP
VLCVideo
::
get_subtitle
(
long
*
spu
)
{
if
(
NULL
==
spu
)
return
E_POINTER
;
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
*
spu
=
libvlc_video_get_spu
(
p_input
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
!
libvlc_exception_raised
(
&
ex
)
)
{
return
NOERROR
;
}
}
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
hr
;
};
STDMETHODIMP
VLCVideo
::
put_subtitle
(
long
spu
)
{
libvlc_instance_t
*
p_libvlc
;
HRESULT
hr
=
_p_instance
->
getVLC
(
&
p_libvlc
);
if
(
SUCCEEDED
(
hr
)
)
{
libvlc_exception_t
ex
;
libvlc_exception_init
(
&
ex
);
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_libvlc
,
&
ex
);
libvlc_video_set_spu
(
p_input
,
spu
,
&
ex
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
_p_instance
->
setErrorInfo
(
IID_IVLCVideo
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
}
return
NOERROR
;
}
return
hr
;
};
STDMETHODIMP
VLCVideo
::
toggleFullscreen
()
STDMETHODIMP
VLCVideo
::
toggleFullscreen
()
{
{
libvlc_instance_t
*
p_libvlc
;
libvlc_instance_t
*
p_libvlc
;
...
...
activex/vlccontrol2.h
View file @
e4b790fd
...
@@ -66,10 +66,6 @@ public:
...
@@ -66,10 +66,6 @@ public:
STDMETHODIMP
put_mute
(
VARIANT_BOOL
);
STDMETHODIMP
put_mute
(
VARIANT_BOOL
);
STDMETHODIMP
get_volume
(
long
*
);
STDMETHODIMP
get_volume
(
long
*
);
STDMETHODIMP
put_volume
(
long
);
STDMETHODIMP
put_volume
(
long
);
STDMETHODIMP
get_track
(
long
*
);
STDMETHODIMP
put_track
(
long
);
STDMETHODIMP
get_channel
(
long
*
);
STDMETHODIMP
put_channel
(
long
);
STDMETHODIMP
toggleMute
();
STDMETHODIMP
toggleMute
();
protected:
protected:
...
@@ -522,8 +518,6 @@ public:
...
@@ -522,8 +518,6 @@ public:
STDMETHODIMP
get_height
(
long
*
);
STDMETHODIMP
get_height
(
long
*
);
STDMETHODIMP
get_aspectRatio
(
BSTR
*
);
STDMETHODIMP
get_aspectRatio
(
BSTR
*
);
STDMETHODIMP
put_aspectRatio
(
BSTR
);
STDMETHODIMP
put_aspectRatio
(
BSTR
);
STDMETHODIMP
get_subtitle
(
long
*
);
STDMETHODIMP
put_subtitle
(
long
);
STDMETHODIMP
toggleFullscreen
();
STDMETHODIMP
toggleFullscreen
();
protected:
protected:
...
...
include/vlc/libvlc.h
View file @
e4b790fd
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
* $Id: vlc.h 13701 2005-12-12 17:58:56Z zorglub $
* $Id: vlc.h 13701 2005-12-12 17:58:56Z zorglub $
*
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -346,22 +345,6 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
...
@@ -346,22 +345,6 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exception_t * );
*/
*/
void
libvlc_video_set_aspect_ratio
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
void
libvlc_video_set_aspect_ratio
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
/**
* Get current video subtitle
* \param p_input the input
* \param p_exception an initialized exception
* \return the video subtitle selected
*/
int
libvlc_video_get_spu
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Set new video subtitle
* \param p_input the input
* \param i_spu new video subtitle to select
* \param p_exception an initialized exception
*/
void
libvlc_video_set_spu
(
libvlc_input_t
*
,
int
,
libvlc_exception_t
*
);
/**
/**
* Take a snapshot of the current video window
* Take a snapshot of the current video window
* \param p_input the input
* \param p_input the input
...
@@ -491,41 +474,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
...
@@ -491,41 +474,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception
* \param p_exception an initialized exception
* \return void
* \return void
*/
*/
void
libvlc_audio_set_volume
(
libvlc_instance_t
*
,
int
,
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
* \return void
*/
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 psz_channel the audio channel (int)
* \param p_exception an initialized exception
* \return void
*/
void
libvlc_audio_set_channel
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/** @} */
/** @} */
...
...
mozilla/control/npolibvlc.cpp
View file @
e4b790fd
...
@@ -191,8 +191,6 @@ const NPUTF8 * const LibvlcAudioNPObject::propertyNames[] =
...
@@ -191,8 +191,6 @@ const NPUTF8 * const LibvlcAudioNPObject::propertyNames[] =
{
{
"mute"
,
"mute"
,
"volume"
,
"volume"
,
"track"
,
"channel"
,
};
};
const
int
LibvlcAudioNPObject
::
propertyCount
=
sizeof
(
LibvlcAudioNPObject
::
propertyNames
)
/
sizeof
(
NPUTF8
*
);
const
int
LibvlcAudioNPObject
::
propertyCount
=
sizeof
(
LibvlcAudioNPObject
::
propertyNames
)
/
sizeof
(
NPUTF8
*
);
...
@@ -200,9 +198,7 @@ const int LibvlcAudioNPObject::propertyCount = sizeof(LibvlcAudioNPObject::prope
...
@@ -200,9 +198,7 @@ const int LibvlcAudioNPObject::propertyCount = sizeof(LibvlcAudioNPObject::prope
enum
LibvlcAudioNPObjectPropertyIds
enum
LibvlcAudioNPObjectPropertyIds
{
{
ID_audio_mute
,
ID_audio_mute
,
ID_audio_volume
,
ID_audio_volume
ID_audio_track
,
ID_audio_channel
,
};
};
RuntimeNPObject
::
InvokeResult
LibvlcAudioNPObject
::
getProperty
(
int
index
,
NPVariant
&
result
)
RuntimeNPObject
::
InvokeResult
LibvlcAudioNPObject
::
getProperty
(
int
index
,
NPVariant
&
result
)
...
@@ -240,38 +236,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
...
@@ -240,38 +236,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::getProperty(int index, NPVari
INT32_TO_NPVARIANT
(
volume
,
result
);
INT32_TO_NPVARIANT
(
volume
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_audio_track
:
{
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
int
track
=
libvlc_audio_get_track
(
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
(
track
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
case
ID_audio_channel
:
{
int
channel
=
libvlc_audio_get_channel
(
p_plugin
->
getVLC
(),
&
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
;
}
default:
default:
;
;
}
}
...
@@ -318,42 +282,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
...
@@ -318,42 +282,6 @@ RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
return
INVOKERESULT_INVALID_VALUE
;
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_track
:
if
(
isNumberValue
(
value
)
)
{
libvlc_input_t
*
p_input
=
libvlc_playlist_get_input
(
p_plugin
->
getVLC
(),
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
{
NPN_SetException
(
this
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
return
INVOKERESULT_GENERIC_ERROR
;
}
libvlc_audio_set_track
(
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
;
}
return
INVOKERESULT_INVALID_VALUE
;
case
ID_audio_channel
:
if
(
isNumberValue
(
value
)
)
{
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
;
}
return
INVOKERESULT_NO_ERROR
;
}
return
INVOKERESULT_INVALID_VALUE
;
default:
default:
;
;
}
}
...
@@ -1787,8 +1715,7 @@ const NPUTF8 * const LibvlcVideoNPObject::propertyNames[] =
...
@@ -1787,8 +1715,7 @@ const NPUTF8 * const LibvlcVideoNPObject::propertyNames[] =
"fullscreen"
,
"fullscreen"
,
"height"
,
"height"
,
"width"
,
"width"
,
"aspectRatio"
,
"aspectRatio"
"subtitle"
};
};
enum
LibvlcVideoNPObjectPropertyIds
enum
LibvlcVideoNPObjectPropertyIds
...
@@ -1796,8 +1723,7 @@ enum LibvlcVideoNPObjectPropertyIds
...
@@ -1796,8 +1723,7 @@ enum LibvlcVideoNPObjectPropertyIds
ID_video_fullscreen
,
ID_video_fullscreen
,
ID_video_height
,
ID_video_height
,
ID_video_width
,
ID_video_width
,
ID_video_aspectratio
,
ID_video_aspectratio
ID_video_subtitle
};
};
const
int
LibvlcVideoNPObject
::
propertyCount
=
sizeof
(
LibvlcVideoNPObject
::
propertyNames
)
/
sizeof
(
NPUTF8
*
);
const
int
LibvlcVideoNPObject
::
propertyCount
=
sizeof
(
LibvlcVideoNPObject
::
propertyNames
)
/
sizeof
(
NPUTF8
*
);
...
@@ -1876,19 +1802,6 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1876,19 +1802,6 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
STRINGZ_TO_NPVARIANT
(
psz_aspect
,
result
);
STRINGZ_TO_NPVARIANT
(
psz_aspect
,
result
);
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_subtitle
:
{
int
i_spu
=
libvlc_video_get_spu
(
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_spu
,
result
);
return
INVOKERESULT_NO_ERROR
;
}
}
}
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
}
}
...
@@ -1961,24 +1874,6 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1961,24 +1874,6 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
}
}
return
INVOKERESULT_NO_ERROR
;
return
INVOKERESULT_NO_ERROR
;
}
}
case
ID_video_subtitle
:
{
if
(
isNumberValue
(
value
)
)
{
libvlc_video_set_spu
(
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
);
libvlc_input_free
(
p_input
);
}
}
...
...
src/control/audio.c
View file @
e4b790fd
...
@@ -25,56 +25,7 @@
...
@@ -25,56 +25,7 @@
#include <libvlc_internal.h>
#include <libvlc_internal.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc.h>
#include <vlc/aout.h>
#include <vlc/intf.h>
#include <audio_output.h>
/* for audio_volume_t, AOUT_VOLUME_MAX */
#include <audio_output.h>
/* for audio_volume_t, AOUT_VOLUME_MAX */
#include <aout_internal.h>
/*
* Remember to release the returned input_thread_t since it is locked at
* the end of this function.
*/
static
input_thread_t
*
GetInput
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_exception
)
{
input_thread_t
*
p_input_thread
=
NULL
;
if
(
!
p_input
)
{
libvlc_exception_raise
(
p_exception
,
"Input is NULL"
);
return
NULL
;
}
p_input_thread
=
(
input_thread_t
*
)
vlc_object_get
(
p_input
->
p_instance
->
p_vlc
,
p_input
->
i_input_id
);
if
(
!
p_input_thread
)
{
libvlc_exception_raise
(
p_exception
,
"Input does not exist"
);
return
NULL
;
}
return
p_input_thread
;
}
/*
* Remember to release the returned aout_instance_t since it is locked at
* the end of this function.
*/
static
aout_instance_t
*
GetAOut
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
{
aout_instance_t
*
p_aout
=
NULL
;
p_aout
=
vlc_object_find
(
p_instance
->
p_vlc
,
VLC_OBJECT_AOUT
,
FIND_CHILD
);
if
(
!
p_aout
)
{
libvlc_exception_raise
(
p_exception
,
"No active audio output"
);
return
NULL
;
}
return
p_aout
;
}
/*****************************************************************************
/*****************************************************************************
* libvlc_audio_get_mute : Get the volume state, true if muted
* libvlc_audio_get_mute : Get the volume state, true if muted
...
@@ -139,130 +90,3 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume,
...
@@ -139,130 +90,3 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume,
libvlc_exception_raise
(
p_e
,
"Volume out of range"
);
libvlc_exception_raise
(
p_e
,
"Volume out of range"
);
}
}
}
}
/*****************************************************************************
* libvlc_audio_get_track : Get the current audio track
*****************************************************************************/
int
libvlc_audio_get_track
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
vlc_value_t
val_list
;
vlc_value_t
val
;
int
i_track
=
-
1
;
int
i_ret
=
-
1
;
int
i
;
if
(
!
p_input_thread
)
return
-
1
;
i_ret
=
var_Get
(
p_input_thread
,
"audio-es"
,
&
val
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Getting Audio track information failed"
);
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
var_Change
(
p_input_thread
,
"audio-es"
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
);
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
track_val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
track_val
.
i_int
==
val
.
i_int
)
{
i_track
=
i
;
break
;
}
}
vlc_object_release
(
p_input_thread
);
return
i_track
;
}
/*****************************************************************************
* libvlc_audio_set_track : Set the current audio track
*****************************************************************************/
void
libvlc_audio_set_track
(
libvlc_input_t
*
p_input
,
int
i_track
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
vlc_value_t
val_list
;
int
i_ret
=
-
1
;
int
i
;
if
(
!
p_input_thread
)
return
;
var_Change
(
p_input_thread
,
"audio-es"
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
);
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
i_track
==
i
)
{
i_ret
=
var_Set
(
p_input_thread
,
"audio-es"
,
val
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Setting audio track failed"
);
}
vlc_object_release
(
p_input_thread
);
return
;
}
}
libvlc_exception_raise
(
p_e
,
"Audio track out of range"
);
vlc_object_release
(
p_input_thread
);
}
/*****************************************************************************
* libvlc_audio_get_channel : Get the current audio channel
*****************************************************************************/
int
libvlc_audio_get_channel
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
aout_instance_t
*
p_aout
=
GetAOut
(
p_instance
,
p_e
);
if
(
p_aout
)
{
vlc_value_t
val
;
var_Get
(
p_aout
,
"audio-channels"
,
&
val
);
vlc_object_release
(
p_aout
);
return
val
.
i_int
;
}
return
-
1
;
}
/*****************************************************************************
* libvlc_audio_set_channel : Set the current audio channel
*****************************************************************************/
void
libvlc_audio_set_channel
(
libvlc_instance_t
*
p_instance
,
int
i_channel
,
libvlc_exception_t
*
p_e
)
{
aout_instance_t
*
p_aout
=
GetAOut
(
p_instance
,
p_e
);
vlc_value_t
val
;
int
i_ret
=
-
1
;
if
(
!
p_aout
)
return
;
val
.
i_int
=
i_channel
;
switch
(
i_channel
)
{
case
AOUT_VAR_CHAN_RSTEREO
:
case
AOUT_VAR_CHAN_STEREO
:
case
AOUT_VAR_CHAN_LEFT
:
case
AOUT_VAR_CHAN_RIGHT
:
case
AOUT_VAR_CHAN_DOLBYS
:
i_ret
=
var_Set
(
p_aout
,
"audio-channels"
,
val
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Failed setting audio channel"
);
vlc_object_release
(
p_aout
);
return
;
}
vlc_object_release
(
p_aout
);
return
;
default:
libvlc_exception_raise
(
p_e
,
"Audio channel out of range"
);
break
;
}
vlc_object_release
(
p_aout
);
}
src/control/video.c
View file @
e4b790fd
...
@@ -389,74 +389,6 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *p_input,
...
@@ -389,74 +389,6 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *p_input,
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
}
}
int
libvlc_video_get_spu
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
vlc_value_t
val_list
;
vlc_value_t
val
;
int
i_spu
=
-
1
;
int
i_ret
=
-
1
;
int
i
;
if
(
!
p_input_thread
)
return
-
1
;
i_ret
=
var_Get
(
p_input_thread
,
"spu-es"
,
&
val
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Getting subtitle information failed"
);
vlc_object_release
(
p_input_thread
);
return
i_ret
;
}
var_Change
(
p_input_thread
,
"spu-es"
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
);
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
spu_val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
val
.
i_int
==
spu_val
.
i_int
)
{
i_spu
=
i
;
break
;
}
}
vlc_object_release
(
p_input_thread
);
return
i_spu
;
}
void
libvlc_video_set_spu
(
libvlc_input_t
*
p_input
,
int
i_spu
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
vlc_value_t
val_list
;
int
i_ret
=
-
1
;
int
i
;
if
(
!
p_input_thread
)
return
;
var_Change
(
p_input_thread
,
"spu-es"
,
VLC_VAR_GETCHOICES
,
&
val_list
,
NULL
);
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
vlc_value_t
val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
i_spu
==
i
)
{
vlc_value_t
new_val
;
new_val
.
i_int
=
val
.
i_int
;
i_ret
=
var_Set
(
p_input_thread
,
"spu-es"
,
new_val
);
if
(
i_ret
<
0
)
{
libvlc_exception_raise
(
p_e
,
"Setting subtitle value failed"
);
}
vlc_object_release
(
p_input_thread
);
return
;
}
}
libvlc_exception_raise
(
p_e
,
"Subtitle value out of range"
);
vlc_object_release
(
p_input_thread
);
}
int
libvlc_video_destroy
(
libvlc_input_t
*
p_input
,
int
libvlc_video_destroy
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
...
...
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