]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/audiobargraph_v.c
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / video_filter / audiobargraph_v.c
index 2ca709a30a16d2899defe34f91d4f13feea2b77d..156b0ec1747981e961e184c0fffe10556d0ad8a6 100644 (file)
@@ -28,7 +28,6 @@
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
-#include <assert.h>
 #include <string.h>
 
 #include <vlc_common.h>
@@ -36,9 +35,6 @@
 #include <vlc_filter.h>
 
 #include <vlc_image.h>
-#include <vlc_osd.h>
-
-#include <vlc_memory.h>
 
 #ifdef LoadImage
 #   undef LoadImage
@@ -345,7 +341,6 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
     fmt.i_chroma = VLC_CODEC_YUVA;
-    fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch;
     fmt.i_height = fmt.i_visible_height = p_pic->p[Y_PLANE].i_visible_lines;
@@ -365,7 +360,7 @@ static subpicture_t *FilterSub( filter_t *p_filter, mtime_t date )
     /*  where to locate the bar graph: */
     if( p_sys->i_pos < 0 )
     {   /*  set to an absolute xy */
-        p_region->i_align = OSD_ALIGN_RIGHT | OSD_ALIGN_TOP;
+        p_region->i_align = SUBPICTURE_ALIGN_RIGHT | SUBPICTURE_ALIGN_TOP;
         p_spu->b_absolute = true;
     }
     else
@@ -554,7 +549,7 @@ static picture_t *LoadImage( vlc_object_t *p_this, int nbChannels, int* i_values
     moinsDix = 0.32*scale + 20;
     moinsVingt = 0.1*scale + 20;
     
-    p_pic = picture_New(VLC_FOURCC('Y','U','V','A'), i_width+20, scale+30, VOUT_ASPECT_FACTOR * (i_width+20)/(scale+30));
+    p_pic = picture_New(VLC_FOURCC('Y','U','V','A'), i_width+20, scale+30, 1, 1);
     
     // blacken the whole picture
     for( i = 0 ; i < p_pic->i_planes ; i++ )
@@ -942,9 +937,8 @@ void parse_i_values( BarGraph_t *p_BarGraph, char *i_values)
     res = strtok_r(i_values, delim, &tok);
     while (res != NULL) {
         p_BarGraph->nbChannels++;
-        p_BarGraph->i_values = realloc_or_free(p_BarGraph->i_values,
+        p_BarGraph->i_values = xrealloc(p_BarGraph->i_values,
                                           p_BarGraph->nbChannels*sizeof(int));
-        assert(p_BarGraph->i_values);
         p_BarGraph->i_values[p_BarGraph->nbChannels-1] = __MAX( __MIN( atof(res)*p_BarGraph->scale, p_BarGraph->scale ), 0 );
         res = strtok_r(NULL, delim, &tok);
     }