]> git.sesse.net Git - vlc/commitdiff
Added video_format_CopyCrop helper.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 6 Nov 2010 20:58:47 +0000 (21:58 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 7 Nov 2010 15:40:44 +0000 (16:40 +0100)
include/vlc_es.h
src/libvlccore.sym
src/misc/es_format.c

index 556b4143f10582ce6caa5b359c71da07f04af316..3c80d57b359053b7fe0ad4082073463e4a78c8f6 100644 (file)
@@ -172,6 +172,11 @@ static inline void video_format_Clean( video_format_t *p_src )
  */
 VLC_EXPORT( void, video_format_Setup, ( video_format_t *, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) );
 
+/**
+ * It will copy the crop properties from a video_format_t to another.
+ */
+VLC_EXPORT( void, video_format_CopyCrop, ( video_format_t *, const video_format_t * ) );
+
 /**
  * This function will check if the first video format is similar
  * to the second one.
index 7ec9e4ee4850b37614d3d9355dbe205221438339..aec8a364fd8fdc0d0f555b7377e7b623bc960e9a 100644 (file)
@@ -485,6 +485,7 @@ var_TriggerCallback
 var_Type
 var_Inherit
 var_InheritURational
+video_format_CopyCrop
 video_format_FixRgb
 video_format_IsSimilar
 video_format_Setup
index 9864a0fb1a96055f9d855718b9ce886f9bf1354e..e55ee2bebff80d404f2b9a196834d7350767fd30 100644 (file)
@@ -206,6 +206,15 @@ void video_format_Setup( video_format_t *p_fmt, vlc_fourcc_t i_chroma,
         break;
     }
 }
+
+void video_format_CopyCrop( video_format_t *p_dst, const video_format_t *p_src )
+{
+    p_dst->i_x_offset       = p_src->i_x_offset;
+    p_dst->i_y_offset       = p_src->i_y_offset;
+    p_dst->i_visible_width  = p_src->i_visible_width;
+    p_dst->i_visible_height = p_src->i_visible_height;
+}
+
 bool video_format_IsSimilar( const video_format_t *p_fmt1, const video_format_t *p_fmt2 )
 {
     video_format_t v1 = *p_fmt1;