]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_widgets.c
input: Export input_GetState().
[vlc] / src / video_output / video_widgets.c
index 0b7798c12313af25069c24adc4e43eb87644ad66..f0a1ded2bc0098f223d20a4196226232a0bd9a5f 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                                /* free() */
-#include <vlc/vout.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_vout.h>
 #include <vlc_osd.h>
 
-#include "vlc_video.h"
-#include "vlc_filter.h"
+#include <vlc_filter.h>
 
 /*****************************************************************************
  * Displays an OSD slider.
@@ -40,10 +43,14 @@ void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
 {
     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
                                              FIND_ANYWHERE );
+
     if( p_vout && ( config_GetInt( p_caller, "osd" ) || ( i_position >= 0 ) ) )
     {
         osd_Slider( p_caller, p_vout->p_spu, p_vout->render.i_width,
-            p_vout->render.i_height, i_channel, i_position, i_type );
+            p_vout->render.i_height, p_vout->fmt_in.i_x_offset,
+            p_vout->fmt_in.i_height - p_vout->fmt_in.i_visible_height
+                                    - p_vout->fmt_in.i_y_offset,
+            i_channel, i_position, i_type );
     }
     vlc_object_release( p_vout );
 }
@@ -56,10 +63,20 @@ void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type )
 {
     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
                                              FIND_ANYWHERE );
-    if( p_vout && config_GetInt( p_caller, "osd" ) )
+
+    if( !p_vout ) return;
+
+    if( config_GetInt( p_caller, "osd" ) )
     {
-        osd_Icon( p_caller, p_vout->p_spu, p_vout->render.i_width,
-            p_vout->render.i_height, i_channel, i_type );
+        osd_Icon( p_caller,
+                  p_vout->p_spu,
+                  p_vout->render.i_width,
+                  p_vout->render.i_height,
+                  p_vout->fmt_in.i_width - p_vout->fmt_in.i_visible_width
+                                         - p_vout->fmt_in.i_x_offset,
+                  p_vout->fmt_in.i_y_offset,
+                  i_channel, i_type );
     }
     vlc_object_release( p_vout );
 }
+