* @{
*/
+/**
+* Downcast to this general type as placeholder for a platform specific one, such as:
+* Drawable on X11,
+* CGrafPort on MacOSX,
+* HWND on win32
+*/
typedef int libvlc_drawable_t;
+/**
+* Rectangle type for video geometry
+*/
+typedef struct
+{
+ int top, left;
+ int bottom, right;
+}
+libvlc_rectangle_t;
+
/**
* Does this input have a video output ?
* \param p_input the input
*/
void libvlc_video_set_aspect_ratio( libvlc_input_t *, char *, libvlc_exception_t * );
+/**
+ * Get current crop filter geometry
+ * \param p_input the input
+ * \param p_exception an initialized exception
+ * \return the crop filter geometry
+ */
+char *libvlc_video_get_crop_geometry( libvlc_input_t *, libvlc_exception_t * );
+
+/**
+ * Set new crop filter geometry
+ * \param p_input the input
+ * \param psz_geometry new crop filter geometry
+ * \param p_exception an initialized exception
+ */
+void libvlc_video_set_crop_geometry( libvlc_input_t *, char *, libvlc_exception_t * );
+
/**
* Take a snapshot of the current video window
* \param p_input the input
*/
void libvlc_video_resize( libvlc_input_t *, int, int, libvlc_exception_t *);
-/**
-* Downcast to this general type as placeholder for a platform specific one, such as:
-* Drawable on X11,
-* CGrafPort on MacOSX,
-* HWND on win32
-*/
-
/**
* change the parent for the current the video output
* \param p_instance libvlc instance
*/
void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
-/**
-* Downcast to this general type as placeholder for a platform specific one, such as:
-* Drawable on X11,
-* CGrafPort on MacOSX,
-* HWND on win32
-*/
-typedef struct
-{
- int top, left;
- int bottom, right;
-}
-libvlc_rectangle_t;
-
/**
* Set the default video output viewport for a windowless video output (MacOS X only)
* this settings will be used as default for all video outputs
vlc_object_release( p_vout );
}
+char *libvlc_video_get_crop_geometry( libvlc_input_t *p_input,
+ libvlc_exception_t *p_e )
+{
+ char *psz_geometry = 0;
+ vout_thread_t *p_vout = GetVout( p_input, p_e );
+
+ if( !p_vout )
+ return 0;
+
+ psz_geometry = var_GetString( p_vout, "crop" );
+ vlc_object_release( p_vout );
+ return psz_geometry;
+}
+
+void libvlc_video_set_crop_geometry( libvlc_input_t *p_input,
+ char *psz_geometry, libvlc_exception_t *p_e )
+{
+ vout_thread_t *p_vout = GetVout( p_input, p_e );
+ int i_ret = -1;
+
+ if( !p_vout )
+ return;
+
+ i_ret = var_SetString( p_vout, "crop", psz_geometry );
+ if( i_ret )
+ libvlc_exception_raise( p_e,
+ "Unexpected error while setting crop geometry" );
+
+ vlc_object_release( p_vout );
+}
+
int libvlc_video_destroy( libvlc_input_t *p_input,
libvlc_exception_t *p_e )
{