Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
7078d5da
Commit
7078d5da
authored
Nov 03, 2006
by
littlejohn
Browse files
Remove libvlc_set_video_drawable, libvlc_video_set_parent offers the same functionality
parent
474d6a5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
bindings/java/src/graphics-jni.cc
View file @
7078d5da
...
...
@@ -97,7 +97,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_JVLCCanvas_paint (JNIEnv *env, job
drawable
=
reinterpret_cast
<
int
>
(
dsi_win
->
hwnd
);
long
vlcInstance
=
getJVLCInstance
(
env
,
canvas
);
libvlc_
set_
video_
drawable
(
(
libvlc_instance_t
*
)
vlcInstance
,
drawable
,
exception
);
libvlc_video_
set_parent
(
(
libvlc_instance_t
*
)
vlcInstance
,
drawable
,
exception
);
#else // UNIX
/* Get the platform-specific drawing info */
...
...
@@ -109,7 +109,7 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_JVLCCanvas_paint (JNIEnv *env, job
drawable
=
dsi_x11
->
drawable
;
long
vlcInstance
=
getJVLCInstance
(
env
,
canvas
);
libvlc_
set_
video_
drawable
(
(
libvlc_instance_t
*
)
vlcInstance
,
drawable
,
exception
);
libvlc_video_
set_parent
(
(
libvlc_instance_t
*
)
vlcInstance
,
drawable
,
exception
);
XFreeGC
(
dsi_x11
->
display
,
gc
);
...
...
bindings/java/src/video-jni.cc
View file @
7078d5da
...
...
@@ -133,6 +133,8 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
GET_INPUT_THREAD
;
libvlc_drawable_t
drawable
;
JAWT
awt
;
JAWT_DrawingSurface
*
ds
;
JAWT_DrawingSurfaceInfo
*
dsi
;
...
...
@@ -144,8 +146,6 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
#endif
jint
lock
;
vlc_value_t
value
;
/* Get the AWT */
awt
.
version
=
JAWT_VERSION_1_3
;
if
(
JAWT_GetAWT
(
env
,
&
awt
)
==
JNI_FALSE
)
{
...
...
@@ -181,15 +181,12 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
#ifdef WIN32
/* Get the platform-specific drawing info */
dsi_win
=
(
JAWT_Win32DrawingSurfaceInfo
*
)
dsi
->
platformInfo
;
drawable
=
reinterpret_cast
<
int
>
(
dsi_win
->
hwnd
);
libvlc_video_reparent
(
input
,
(
libvlc_drawable_t
)
dsi_win
->
hwnd
,
exception
);
libvlc_video_reparent
(
input
,
drawable
,
exception
);
CHECK_EXCEPTION_FREE
;
/* Now paint */
value
.
i_int
=
reinterpret_cast
<
int
>
(
dsi_win
->
hwnd
);
VLC_VariableSet
(
1
,
"drawable"
,
value
);
#else // UNIX
/* Get the platform-specific drawing info */
...
...
@@ -200,14 +197,11 @@ JNIEXPORT void JNICALL Java_org_videolan_jvlc_Video__1reparent (JNIEnv *env, job
XSetBackground
(
dsi_x11
->
display
,
gc
,
0
);
/* and reparent */
libvlc_video_reparent
(
input
,
(
libvlc_drawable_t
)
dsi_x11
->
drawable
,
exception
);
drawable
=
dsi_x11
->
drawable
;
libvlc_video_reparent
(
input
,
drawable
,
exception
);
CHECK_EXCEPTION_FREE
;
/* also update the drawable variable value */
value
.
i_int
=
dsi_x11
->
drawable
;
VLC_VariableSet
(
0
,
"drawable"
,
value
);
XFreeGC
(
dsi_x11
->
display
,
gc
);
#endif
...
...
include/vlc/libvlc.h
View file @
7078d5da
...
...
@@ -297,14 +297,6 @@ typedef int libvlc_drawable_t;
vlc_bool_t
libvlc_input_has_vout
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
float
libvlc_input_get_fps
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/**
* Toggle fullscreen status on video output
* \param p_input the input
* \param drawable the drawable where the video output thread will display the video
* \param p_exception an initialized exception
*/
void
libvlc_set_video_drawable
(
libvlc_instance_t
*
,
libvlc_drawable_t
,
libvlc_exception_t
*
);
/**
* Toggle fullscreen status on video output
* \param p_input the input
...
...
src/control/video.c
View file @
7078d5da
...
...
@@ -69,18 +69,6 @@ static vout_thread_t *GetVout( libvlc_input_t *p_input,
* Exported functions
**********************************************************************/
void
libvlc_set_video_drawable
(
libvlc_instance_t
*
p_instance
,
libvlc_drawable_t
drawable
,
libvlc_exception_t
*
p_e
)
{
vlc_value_t
value
;
value
.
i_int
=
drawable
;
var_Set
(
p_instance
->
p_libvlc_int
,
"drawable"
,
value
);
}
void
libvlc_set_fullscreen
(
libvlc_input_t
*
p_input
,
int
b_fullscreen
,
libvlc_exception_t
*
p_e
)
{
...
...
@@ -226,6 +214,13 @@ int libvlc_video_reparent( libvlc_input_t *p_input, libvlc_drawable_t d,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_input
,
p_e
);
if
(
p_vout
==
NULL
)
{
/// \todo: set exception
return
0
;
}
vout_Control
(
p_vout
,
VOUT_REPARENT
,
d
);
vlc_object_release
(
p_vout
);
...
...
@@ -242,7 +237,7 @@ void libvlc_video_resize( libvlc_input_t *p_input, int width, int height, libvlc
/* global video settings */
void
libvlc_video_set_parent
(
libvlc_instance_t
*
p_instance
,
libvlc_drawable_t
d
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
/* set as default for future vout instances */
var_SetInteger
(
p_instance
->
p_libvlc_int
,
"drawable"
,
(
int
)
d
);
...
...
Write
Preview
Supports
Markdown
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