* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#include "libvlc_internal.h"
#include <vlc/libvlc.h>
#include <vlc_input.h>
#include <vlc_vout.h>
+#include "libvlc_internal.h"
+
/*
* Remember to release the returned vout_thread_t since it is locked at
* the end of this function.
}
int libvlc_video_get_height( libvlc_media_instance_t *p_mi,
- libvlc_exception_t *p_e )
+ libvlc_exception_t *p_e )
{
vout_thread_t *p_vout1 = GetVout( p_mi, p_e );
if( !p_vout1 )
}
int libvlc_video_get_width( libvlc_media_instance_t *p_mi,
- libvlc_exception_t *p_e )
+ libvlc_exception_t *p_e )
{
vout_thread_t *p_vout1 = GetVout( p_mi, p_e );
if( !p_vout1 )
return p_vout1->i_window_width;
}
-vlc_bool_t libvlc_input_has_vout( libvlc_media_instance_t *p_mi,
+vlc_bool_t libvlc_media_instance_has_vout( libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e )
{
input_thread_t *p_input_thread = libvlc_get_input_thread(p_mi, p_e);
vout_Control( p_vout , VOUT_REPARENT, d);
vlc_object_release( p_vout );
}
- libvlc_media_instance_destroy_and_detach(p_mi);
+ libvlc_media_instance_release(p_mi);
}
}
}
libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *p_instance, libvlc_exception_t *p_e )
{
libvlc_drawable_t result;
-
+
result = var_GetInteger( p_instance->p_libvlc_int, "drawable" );
-
+
return result;
}
vout_Control( p_vout , VOUT_SET_SIZE, width, height);
vlc_object_release( p_vout );
}
- libvlc_media_instance_destroy_and_detach(p_mi);
+ libvlc_media_instance_release(p_mi);
}
}
}
clip->top, clip->left, clip->bottom, clip->right );
vlc_object_release( p_vout );
}
- libvlc_media_instance_destroy_and_detach(p_mi);
+ libvlc_media_instance_release(p_mi);
}
}
}
vlc_object_release( p_vout );
}
+int libvlc_video_get_teletext( libvlc_media_instance_t *p_mi,
+ libvlc_exception_t *p_e )
+{
+ vout_thread_t *p_vout = GetVout( p_mi, p_e );
+ int i_ret = -1;
+
+ if( !p_vout )
+ return i_ret;
+
+ i_ret = var_GetInteger( p_vout, "vbi-page" );
+ vlc_object_release( p_vout );
+ return i_ret;
+}
+
+void libvlc_video_set_teletext( libvlc_media_instance_t *p_mi, int i_page,
+ libvlc_exception_t *p_e )
+{
+ vout_thread_t *p_vout = GetVout( p_mi, p_e );
+ int i_ret = -1;
+
+ if( !p_vout )
+ return;
+
+ i_ret = var_SetInteger( p_vout, "vbi-page", i_page );
+ if( i_ret )
+ libvlc_exception_raise( p_e,
+ "Unexpected error while setting teletext page" );
+ vlc_object_release( p_vout );
+}
+
int libvlc_video_destroy( libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e )
{
vout_thread_t *p_vout = GetVout( p_mi, p_e );
- vlc_object_detach( p_vout );
+ vlc_object_detach( p_vout );
vlc_object_release( p_vout );
vout_Destroy( p_vout );