+ p_vout->i_changes |= VOUT_SIZE_CHANGE;
+ }
+ return VLC_SUCCESS;
+}
+
+/* Embedded video get their drawing region from the host application
+ * by the drawable values here. Read those variables, and store them
+ * in the p_vout->p_sys structure so that other functions (such as
+ * DisplayVideo and ManageVideo) can use them later. */
+
+static void UpdateEmbeddedGeometry( vout_thread_t *p_vout )
+{
+ vlc_value_t val;
+ vlc_value_t valt, vall, valb, valr, valx, valy, valw, valh,
+ valportx, valporty;
+
+ var_Get( p_vout->p_libvlc, "drawable", &val );
+ var_Get( p_vout->p_libvlc, "drawablet", &valt );
+ var_Get( p_vout->p_libvlc, "drawablel", &vall );
+ var_Get( p_vout->p_libvlc, "drawableb", &valb );
+ var_Get( p_vout->p_libvlc, "drawabler", &valr );
+ var_Get( p_vout->p_libvlc, "drawablex", &valx );
+ var_Get( p_vout->p_libvlc, "drawabley", &valy );
+ var_Get( p_vout->p_libvlc, "drawablew", &valw );
+ var_Get( p_vout->p_libvlc, "drawableh", &valh );
+ var_Get( p_vout->p_libvlc, "drawableportx", &valportx );
+ var_Get( p_vout->p_libvlc, "drawableporty", &valporty );
+
+ /* portx, porty contains values for SetOrigin() function
+ which isn't used, instead use QT Translate matrix */
+ p_vout->p_sys->i_origx = valportx.i_int;
+ p_vout->p_sys->i_origy = valporty.i_int;
+ p_vout->p_sys->p_qdport = (CGrafPtr) val.i_int;
+ p_vout->p_sys->i_width = valw.i_int;
+ p_vout->p_sys->i_height = valh.i_int;
+
+ /* update video clipping mask */
+ /*SetRectRgn( p_vout->p_sys->clip_mask , vall.i_int ,
+ valt.i_int, valr.i_int, valb.i_int );*/
+ SetRectRgn( p_vout->p_sys->clip_mask , vall.i_int + valportx.i_int ,
+ valt.i_int + valporty.i_int , valr.i_int + valportx.i_int ,
+ valb.i_int + valporty.i_int );
+
+ /* reset drawableredraw variable indicating we are ready
+ to take changes in video geometry */
+ val.i_int=0;
+ var_Set( p_vout->p_libvlc, "drawableredraw", val );