]> git.sesse.net Git - vlc/commitdiff
es_out.c: add frame rate to stream and media info dialog when available
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 4 Apr 2005 22:41:02 +0000 (22:41 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Mon, 4 Apr 2005 22:41:02 +0000 (22:41 +0000)
avi.c: make frame rate info available

modules/demux/avi/avi.c
src/input/es_out.c

index a4cc393c07101e6a805dbebb1e7fe30d8172a6ee..04c31055530b460eca86e04687ce98c2693020ec 100644 (file)
@@ -434,6 +434,8 @@ static int Open( vlc_object_t * p_this )
                 fmt.video.i_width  = p_vids->p_bih->biWidth;
                 fmt.video.i_height = p_vids->p_bih->biHeight;
                 fmt.video.i_bits_per_pixel = p_vids->p_bih->biBitCount;
+               fmt.video.i_frame_rate = tk->i_rate;
+               fmt.video.i_frame_rate_base = tk->i_scale;
                 fmt.i_extra =
                     __MIN( p_vids->p_bih->biSize - sizeof( BITMAPINFOHEADER ),
                            p_vids->i_chunk_size - sizeof(BITMAPINFOHEADER) );
index 1eef5393d71478d471443eae9535d22e79771016..3e875da76a6dabfd066e48b077eb21ea69abc2fc 100644 (file)
@@ -1424,6 +1424,12 @@ static void EsOutAddInfo( es_out_t *out, es_out_id_t *es )
                            _("Display resolution"), "%dx%d",
                            fmt->video.i_visible_width,
                            fmt->video.i_visible_height);
+       if( fmt->video.i_frame_rate > 0 &&
+          fmt->video.i_frame_rate_base > 0 )
+          input_Control( p_input, INPUT_ADD_INFO, psz_cat,
+                         _("Frame rate"), "%f",
+                         (float)fmt->video.i_frame_rate / 
+                         fmt->video.i_frame_rate_base );
         break;
 
     case SPU_ES: