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 22004dd..a9a8d79 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 )
                     {