[vlc-devel] [PATCH 2/2] Qt: add subtitles stats

Jean-Baptiste Kempf jb at videolan.org
Mon Mar 2 18:42:11 CET 2015


LGTM

On 02 Mar, Francois Cartegnie wrote :
> ---
>  modules/gui/qt4/components/info_panels.cpp | 8 ++++++++
>  modules/gui/qt4/components/info_panels.hpp | 3 +++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
> index a2d8db1..49cb09c 100644
> --- a/modules/gui/qt4/components/info_panels.cpp
> +++ b/modules/gui/qt4/components/info_panels.cpp
> @@ -564,6 +564,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent ): QWidget( parent )
>      /* Create the main categories */
>      CREATE_CATEGORY( audio, qtr("Audio") );
>      CREATE_CATEGORY( video, qtr("Video") );
> +    CREATE_CATEGORY( subs,  qtr("Subtitles") );
>      CREATE_CATEGORY( input, qtr("Input/Read") );
>      CREATE_CATEGORY( streaming, qtr("Output/Written/Sent") );
>  
> @@ -588,6 +589,9 @@ InputStatsPanel::InputStatsPanel( QWidget *parent ): QWidget( parent )
>      CREATE_AND_ADD_TO_CAT( vlost_frames_stat, qtr("Lost"),
>                             "0", video, qtr("frames") );
>  
> +    CREATE_AND_ADD_TO_CAT( sdecoded_stat, qtr("Decoded"),
> +                           "0", subs, qtr("blocks") );
> +
>      CREATE_AND_ADD_TO_CAT( send_stat, qtr("Sent"), "0", streaming, qtr("packets") );
>      CREATE_AND_ADD_TO_CAT( send_bytes_stat, qtr("Sent"),
>                             "0", streaming, "KiB" );
> @@ -606,6 +610,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent ): QWidget( parent )
>  
>      input->setExpanded( true );
>      video->setExpanded( true );
> +    subs->setExpanded( true );
>      streaming->setExpanded( true );
>      audio->setExpanded( true );
>  
> @@ -671,6 +676,9 @@ void InputStatsPanel::update( input_item_t *p_item )
>      UPDATE_INT( aplayed_stat,  p_item->p_stats->i_played_abuffers );
>      UPDATE_INT( alost_stat,    p_item->p_stats->i_lost_abuffers );
>  
> +    /* Subtitles */
> +    UPDATE_INT( sdecoded_stat, p_item->p_stats->i_decoded_subs );
> +
>  #undef UPDATE_INT
>  #undef UPDATE_FLOAT
>  
> diff --git a/modules/gui/qt4/components/info_panels.hpp b/modules/gui/qt4/components/info_panels.hpp
> index e2b7ac0..95b6e99 100644
> --- a/modules/gui/qt4/components/info_panels.hpp
> +++ b/modules/gui/qt4/components/info_panels.hpp
> @@ -143,6 +143,9 @@ private:
>      QTreeWidgetItem *aplayed_stat;
>      QTreeWidgetItem *alost_stat;
>  
> +    QTreeWidgetItem *subs;
> +    QTreeWidgetItem *sdecoded_stat;
> +
>      VLCStatsView *statsView;
>  public slots:
>      void update( input_item_t * );
> -- 
> 2.1.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list