]> git.sesse.net Git - vlc/commitdiff
Add format string variable to display frame count. ($f)
authorAntoine Cellerier <dionoea@videolan.org>
Thu, 28 Feb 2008 21:58:14 +0000 (21:58 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Thu, 28 Feb 2008 21:58:14 +0000 (21:58 +0000)
src/text/strings.c

index 22004dd7607b7e212dfa9c47f262d13f0f1a1e0e..a9a8d79eed1a6654020cfb3c8bc7e044c76f1073 100644 (file)
@@ -719,6 +719,18 @@ char *__str_format_meta( vlc_object_t *p_object, const char *string )
                         INSERT_STRING( input_item_GetEncodedBy( p_item ) );
                     }
                     break;
+                case 'f':
+                    if( p_item && p_item->p_stats )
+                    {
+                        snprintf( buf, 10, "%d",
+                                  p_item->p_stats->i_displayed_pictures );
+                    }
+                    else
+                    {
+                        sprintf( buf, b_empty_if_na ? "" : "-" );
+                    }
+                    INSERT_STRING_NO_FREE( buf );
+                    break;
                 case 'g':
                     if( p_item )
                     {