Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b30bdcf7
Commit
b30bdcf7
authored
Mar 11, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in vlc.audio.track and add new properties vlc.video.subtitle
to JavaScript API implementation.
parent
9ddd87df
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
279 additions
and
26 deletions
+279
-26
activex/axvlc.idl
activex/axvlc.idl
+7
-2
activex/axvlc.tlb
activex/axvlc.tlb
+0
-0
activex/axvlc_idl.c
activex/axvlc_idl.c
+1
-1
activex/axvlc_idl.h
activex/axvlc_idl.h
+33
-1
activex/vlccontrol2.cpp
activex/vlccontrol2.cpp
+70
-14
activex/vlccontrol2.h
activex/vlccontrol2.h
+2
-0
include/vlc/libvlc.h
include/vlc/libvlc.h
+37
-0
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+33
-0
mozilla/control/npolibvlc.h
mozilla/control/npolibvlc.h
+0
-1
src/control/audio.c
src/control/audio.c
+25
-5
src/control/input.c
src/control/input.c
+1
-1
src/control/video.c
src/control/video.c
+70
-1
No files found.
activex/axvlc.idl
View file @
b30bdcf7
...
@@ -205,9 +205,9 @@ library AXVLC
...
@@ -205,9 +205,9 @@ library AXVLC
[
propput
,
helpstring
(
"Returns/sets audio track used/to use."
)
]
[
propput
,
helpstring
(
"Returns/sets audio track used/to use."
)
]
HRESULT
track
(
[
in
]
long
track
)
;
HRESULT
track
(
[
in
]
long
track
)
;
[
propget
,
helpstring
(
"Returns audio channel
: reverse stereo,
stereo, left, right, dolby."
)
]
[
propget
,
helpstring
(
"Returns audio channel
[1-5] indicating; stereo, reverse
stereo, left, right, dolby."
)
]
HRESULT
channel
(
[
out
,
retval
]
long
*
channel
)
;
HRESULT
channel
(
[
out
,
retval
]
long
*
channel
)
;
[
propput
,
helpstring
(
"Sets audio channel to
: reverse stereo,
stereo, left, right, dolby."
)
]
[
propput
,
helpstring
(
"Sets audio channel to
[1-5] indicating; stereo, reverse
stereo, left, right, dolby."
)
]
HRESULT
channel
(
[
in
]
long
channel
)
;
HRESULT
channel
(
[
in
]
long
channel
)
;
}
;
}
;
...
@@ -422,6 +422,11 @@ library AXVLC
...
@@ -422,6 +422,11 @@ 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
)
;
[
propget
,
helpstring
(
"Returns crop filter geometry."
)
]
[
propget
,
helpstring
(
"Returns crop filter geometry."
)
]
HRESULT
crop
(
[
out
,
retval
]
BSTR
*
geometry
)
;
HRESULT
crop
(
[
out
,
retval
]
BSTR
*
geometry
)
;
[
propput
,
helpstring
(
"Sets crop filter geometry."
)
]
[
propput
,
helpstring
(
"Sets crop filter geometry."
)
]
...
...
activex/axvlc.tlb
View file @
b30bdcf7
No preview for this file type
activex/axvlc_idl.c
View file @
b30bdcf7
/*** Autogenerated by WIDL 0.9.
27
from axvlc.idl - Do not edit ***/
/*** Autogenerated by WIDL 0.9.
30
from axvlc.idl - Do not edit ***/
#include <rpc.h>
#include <rpc.h>
#include <rpcndr.h>
#include <rpcndr.h>
...
...
activex/axvlc_idl.h
View file @
b30bdcf7
/*** Autogenerated by WIDL 0.9.
27
from axvlc.idl - Do not edit ***/
/*** Autogenerated by WIDL 0.9.
30
from axvlc.idl - Do not edit ***/
#include <rpc.h>
#include <rpc.h>
#include <rpcndr.h>
#include <rpcndr.h>
...
@@ -2253,6 +2253,12 @@ interface IVLCVideo : public IDispatch
...
@@ -2253,6 +2253,12 @@ interface IVLCVideo : public IDispatch
virtual
HRESULT
STDMETHODCALLTYPE
put_aspectRatio
(
virtual
HRESULT
STDMETHODCALLTYPE
put_aspectRatio
(
BSTR
aspect
)
=
0
;
BSTR
aspect
)
=
0
;
virtual
HRESULT
STDMETHODCALLTYPE
get_subtitle
(
long
*
spu
)
=
0
;
virtual
HRESULT
STDMETHODCALLTYPE
put_subtitle
(
long
spu
)
=
0
;
virtual
HRESULT
STDMETHODCALLTYPE
get_crop
(
virtual
HRESULT
STDMETHODCALLTYPE
get_crop
(
BSTR
*
geometry
)
=
0
;
BSTR
*
geometry
)
=
0
;
...
@@ -2337,6 +2343,14 @@ typedef struct IVLCVideoVtbl {
...
@@ -2337,6 +2343,14 @@ typedef struct IVLCVideoVtbl {
IVLCVideo
*
This
,
IVLCVideo
*
This
,
BSTR
aspect
);
BSTR
aspect
);
HRESULT
(
STDMETHODCALLTYPE
*
get_subtitle
)(
IVLCVideo
*
This
,
long
*
spu
);
HRESULT
(
STDMETHODCALLTYPE
*
put_subtitle
)(
IVLCVideo
*
This
,
long
spu
);
HRESULT
(
STDMETHODCALLTYPE
*
get_crop
)(
HRESULT
(
STDMETHODCALLTYPE
*
get_crop
)(
IVLCVideo
*
This
,
IVLCVideo
*
This
,
BSTR
*
geometry
);
BSTR
*
geometry
);
...
@@ -2375,6 +2389,8 @@ interface IVLCVideo {
...
@@ -2375,6 +2389,8 @@ interface IVLCVideo {
#define IVLCVideo_get_height(p,a) (p)->lpVtbl->get_height(p,a)
#define IVLCVideo_get_height(p,a) (p)->lpVtbl->get_height(p,a)
#define IVLCVideo_get_aspectRatio(p,a) (p)->lpVtbl->get_aspectRatio(p,a)
#define IVLCVideo_get_aspectRatio(p,a) (p)->lpVtbl->get_aspectRatio(p,a)
#define IVLCVideo_put_aspectRatio(p,a) (p)->lpVtbl->put_aspectRatio(p,a)
#define IVLCVideo_put_aspectRatio(p,a) (p)->lpVtbl->put_aspectRatio(p,a)
#define IVLCVideo_get_subtitle(p,a) (p)->lpVtbl->get_subtitle(p,a)
#define IVLCVideo_put_subtitle(p,a) (p)->lpVtbl->put_subtitle(p,a)
#define IVLCVideo_get_crop(p,a) (p)->lpVtbl->get_crop(p,a)
#define IVLCVideo_get_crop(p,a) (p)->lpVtbl->get_crop(p,a)
#define IVLCVideo_put_crop(p,a) (p)->lpVtbl->put_crop(p,a)
#define IVLCVideo_put_crop(p,a) (p)->lpVtbl->put_crop(p,a)
#define IVLCVideo_toggleFullscreen(p) (p)->lpVtbl->toggleFullscreen(p)
#define IVLCVideo_toggleFullscreen(p) (p)->lpVtbl->toggleFullscreen(p)
...
@@ -2431,6 +2447,22 @@ void __RPC_STUB IVLCVideo_put_aspectRatio_Stub(
...
@@ -2431,6 +2447,22 @@ void __RPC_STUB IVLCVideo_put_aspectRatio_Stub(
IRpcChannelBuffer
*
pRpcChannelBuffer
,
IRpcChannelBuffer
*
pRpcChannelBuffer
,
PRPC_MESSAGE
pRpcMessage
,
PRPC_MESSAGE
pRpcMessage
,
DWORD
*
pdwStubPhase
);
DWORD
*
pdwStubPhase
);
HRESULT
CALLBACK
IVLCVideo_get_subtitle_Proxy
(
IVLCVideo
*
This
,
long
*
spu
);
void
__RPC_STUB
IVLCVideo_get_subtitle_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
pRpcChannelBuffer
,
PRPC_MESSAGE
pRpcMessage
,
DWORD
*
pdwStubPhase
);
HRESULT
CALLBACK
IVLCVideo_put_subtitle_Proxy
(
IVLCVideo
*
This
,
long
spu
);
void
__RPC_STUB
IVLCVideo_put_subtitle_Stub
(
IRpcStubBuffer
*
This
,
IRpcChannelBuffer
*
pRpcChannelBuffer
,
PRPC_MESSAGE
pRpcMessage
,
DWORD
*
pdwStubPhase
);
HRESULT
CALLBACK
IVLCVideo_get_crop_Proxy
(
HRESULT
CALLBACK
IVLCVideo_get_crop_Proxy
(
IVLCVideo
*
This
,
IVLCVideo
*
This
,
BSTR
*
geometry
);
BSTR
*
geometry
);
...
...
activex/vlccontrol2.cpp
View file @
b30bdcf7
...
@@ -190,7 +190,8 @@ STDMETHODIMP VLCAudio::put_volume(long volume)
...
@@ -190,7 +190,8 @@ STDMETHODIMP VLCAudio::put_volume(long volume)
libvlc_audio_set_volume
(
p_libvlc
,
volume
,
&
ex
);
libvlc_audio_set_volume
(
p_libvlc
,
volume
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -216,7 +217,8 @@ STDMETHODIMP VLCAudio::get_track(long* track)
...
@@ -216,7 +217,8 @@ STDMETHODIMP VLCAudio::get_track(long* track)
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -239,7 +241,8 @@ STDMETHODIMP VLCAudio::put_track(long track)
...
@@ -239,7 +241,8 @@ STDMETHODIMP VLCAudio::put_track(long track)
libvlc_input_free
(
p_input
);
libvlc_input_free
(
p_input
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -307,7 +310,8 @@ STDMETHODIMP VLCAudio::toggleMute()
...
@@ -307,7 +310,8 @@ STDMETHODIMP VLCAudio::toggleMute()
libvlc_audio_toggle_mute
(
p_libvlc
,
&
ex
);
libvlc_audio_toggle_mute
(
p_libvlc
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
if
(
libvlc_exception_raised
(
&
ex
)
)
{
{
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
_p_instance
->
setErrorInfo
(
IID_IVLCAudio
,
libvlc_exception_get_message
(
&
ex
));
libvlc_exception_clear
(
&
ex
);
libvlc_exception_clear
(
&
ex
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
@@ -2217,6 +2221,58 @@ STDMETHODIMP VLCVideo::put_aspectRatio(BSTR aspect)
...
@@ -2217,6 +2221,58 @@ 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
::
get_crop
(
BSTR
*
geometry
)
STDMETHODIMP
VLCVideo
::
get_crop
(
BSTR
*
geometry
)
{
{
if
(
NULL
==
geometry
)
if
(
NULL
==
geometry
)
...
...
activex/vlccontrol2.h
View file @
b30bdcf7
...
@@ -522,6 +522,8 @@ public:
...
@@ -522,6 +522,8 @@ 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
get_crop
(
BSTR
*
);
STDMETHODIMP
get_crop
(
BSTR
*
);
STDMETHODIMP
put_crop
(
BSTR
);
STDMETHODIMP
put_crop
(
BSTR
);
STDMETHODIMP
takeSnapshot
(
BSTR
);
STDMETHODIMP
takeSnapshot
(
BSTR
);
...
...
include/vlc/libvlc.h
View file @
b30bdcf7
...
@@ -188,6 +188,18 @@ VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_except
...
@@ -188,6 +188,18 @@ VLC_PUBLIC_API int libvlc_playlist_isplaying( libvlc_instance_t *, libvlc_except
*/
*/
VLC_PUBLIC_API
int
libvlc_playlist_items_count
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
int
libvlc_playlist_items_count
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Lock the playlist instance
* \param p_instance the instance
*/
VLC_PUBLIC_API
void
libvlc_playlist_lock
(
libvlc_instance_t
*
);
/**
* Unlock the playlist instance
* \param p_instance the instance
*/
VLC_PUBLIC_API
void
libvlc_playlist_unlock
(
libvlc_instance_t
*
);
/**
/**
* Stop playing
* Stop playing
* \param p_instance the instance to stop
* \param p_instance the instance to stop
...
@@ -377,6 +389,22 @@ VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exc
...
@@ -377,6 +389,22 @@ VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_input_t *, libvlc_exc
*/
*/
VLC_PUBLIC_API
void
libvlc_video_set_aspect_ratio
(
libvlc_input_t
*
,
char
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
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
*/
VLC_PUBLIC_API
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
*/
VLC_PUBLIC_API
void
libvlc_video_set_spu
(
libvlc_input_t
*
,
int
,
libvlc_exception_t
*
);
/**
/**
* Get current crop filter geometry
* Get current crop filter geometry
* \param p_input the input
* \param p_input the input
...
@@ -606,6 +634,15 @@ VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
...
@@ -606,6 +634,15 @@ VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
VLC_PUBLIC_API
void
libvlc_vlm_set_input
(
libvlc_instance_t
*
,
char
*
,
char
*
,
VLC_PUBLIC_API
void
libvlc_vlm_set_input
(
libvlc_instance_t
*
,
char
*
,
char
*
,
libvlc_exception_t
*
);
libvlc_exception_t
*
);
/**
* Add a media's input MRL. This will add the specified one.
* \param p_instance the instance
* \param psz_name the media to work on
* \param psz_input the input MRL
* \param p_exception an initialized exception
*/
VLC_PUBLIC_API
void
libvlc_vlm_add_input
(
libvlc_instance_t
*
,
char
*
,
char
*
,
libvlc_exception_t
*
p_exception
);
/**
/**
* Set output for a media
* Set output for a media
* \param p_instance the instance
* \param p_instance the instance
...
...
mozilla/control/npolibvlc.cpp
View file @
b30bdcf7
...
@@ -1760,6 +1760,7 @@ const NPUTF8 * const LibvlcVideoNPObject::propertyNames[] =
...
@@ -1760,6 +1760,7 @@ const NPUTF8 * const LibvlcVideoNPObject::propertyNames[] =
"height"
,
"height"
,
"width"
,
"width"
,
"aspectRatio"
,
"aspectRatio"
,
"subtitle"
,
"crop"
"crop"
};
};
...
@@ -1769,6 +1770,7 @@ enum LibvlcVideoNPObjectPropertyIds
...
@@ -1769,6 +1770,7 @@ enum LibvlcVideoNPObjectPropertyIds
ID_video_height
,
ID_video_height
,
ID_video_width
,
ID_video_width
,
ID_video_aspectratio
,
ID_video_aspectratio
,
ID_video_subtitle
,
ID_video_crop
ID_video_crop
};
};
...
@@ -1847,6 +1849,19 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::getProperty(int index, NPVari
...
@@ -1847,6 +1849,19 @@ 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
;
}
case
ID_video_crop
:
case
ID_video_crop
:
{
{
NPUTF8
*
psz_geometry
=
libvlc_video_get_crop_geometry
(
p_input
,
&
ex
);
NPUTF8
*
psz_geometry
=
libvlc_video_get_crop_geometry
(
p_input
,
&
ex
);
...
@@ -1936,6 +1951,24 @@ RuntimeNPObject::InvokeResult LibvlcVideoNPObject::setProperty(int index, const
...
@@ -1936,6 +1951,24 @@ 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
;
}
case
ID_video_crop
:
case
ID_video_crop
:
{
{
char
*
psz_geometry
=
NULL
;
char
*
psz_geometry
=
NULL
;
...
...
mozilla/control/npolibvlc.h
View file @
b30bdcf7
...
@@ -252,4 +252,3 @@ protected:
...
@@ -252,4 +252,3 @@ protected:
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
InvokeResult
invoke
(
int
index
,
const
NPVariant
*
args
,
uint32_t
argCount
,
NPVariant
&
result
);
};
};
src/control/audio.c
View file @
b30bdcf7
...
@@ -146,14 +146,34 @@ int libvlc_audio_get_track( libvlc_input_t *p_input,
...
@@ -146,14 +146,34 @@ int libvlc_audio_get_track( libvlc_input_t *p_input,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
input_thread_t
*
p_input_thread
=
GetInput
(
p_input
,
p_e
);
int
i_track
=
0
;
vlc_value_t
val_list
;
vlc_value_t
val
;
int
i_track
=
-
1
;
int
i_ret
=
-
1
;
int
i
;
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
-
1
;
return
-
1
;
i_track
=
var_GetInteger
(
p_input_thread
,
"audio-es"
);
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
);
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
;
return
i_track
;
}
}
...
@@ -175,9 +195,9 @@ void libvlc_audio_set_track( libvlc_input_t *p_input, int i_track,
...
@@ -175,9 +195,9 @@ void libvlc_audio_set_track( libvlc_input_t *p_input, int i_track,
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
{
vlc_value_t
val
=
val_list
.
p_list
->
p_values
[
i
];
vlc_value_t
val
=
val_list
.
p_list
->
p_values
[
i
];
if
(
i_track
==
val
.
i_int
)
if
(
i_track
==
i
)
{
{
i_ret
=
var_Set
Integer
(
p_input_thread
,
"audio-es"
,
i_track
);
i_ret
=
var_Set
(
p_input_thread
,
"audio-es"
,
val
);
if
(
i_ret
<
0
)
if
(
i_ret
<
0
)
{
{
libvlc_exception_raise
(
p_e
,
"Setting audio track failed"
);
libvlc_exception_raise
(
p_e
,
"Setting audio track failed"
);
...
...
src/control/input.c
View file @
b30bdcf7
...
@@ -137,7 +137,7 @@ float libvlc_input_get_position( libvlc_input_t *p_input,
...
@@ -137,7 +137,7 @@ float libvlc_input_get_position( libvlc_input_t *p_input,
float
libvlc_input_get_fps
(
libvlc_input_t
*
p_input
,
float
libvlc_input_get_fps
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
double
f_fps
;
double
f_fps
=
0
.
0
;
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
...
...
src/control/video.c
View file @
b30bdcf7
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
*
*
* Authors: Cl�ent Stenac <zorglub@videolan.org>
* Authors: Cl�ent Stenac <zorglub@videolan.org>
* Filippo Carone <littlejohn@videolan.org>
* Filippo Carone <littlejohn@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
...
@@ -382,6 +383,74 @@ void libvlc_video_set_aspect_ratio( libvlc_input_t *p_input,
...
@@ -382,6 +383,74 @@ 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
=
GetInputThread
(
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
=
GetInputThread
(
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
);
}
char
*
libvlc_video_get_crop_geometry
(
libvlc_input_t
*
p_input
,
char
*
libvlc_video_get_crop_geometry
(
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