mediainfo.hpp 2.64 KB
Newer Older
1
/*****************************************************************************
2
 * mediainfo.hpp : Information about a stream
3
 ****************************************************************************
4
 * Copyright (C) 2006-2007 the VideoLAN team
5
 * $Id$
6 7
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
8
 *          Jean-Baptiste Kempf <jb@videolan.org>
9 10 11 12 13 14 15 16 17 18 19 20 21
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
22 23
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 ******************************************************************************/
24

25 26
#ifndef _MEDIAINFO_DIALOG_H_
#define _MEDIAINFO_DIALOG_H_
27 28

#include "util/qvlcframe.hpp"
29
#include "components/info_panels.hpp"
30

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
31
class QTabWidget;
32
class InfoTab;
33
class QLineEdit;
34

35
class MediaInfoDialog : public QVLCFrame
36 37 38
{
    Q_OBJECT;
public:
39 40 41 42 43
    MediaInfoDialog( intf_thread_t *,
                     input_item_t *,
                     bool stats = true,
                     bool mainInput = false );

44
    static MediaInfoDialog * getInstance( intf_thread_t *p_intf )
45
    {
46 47 48 49
        if( !instance) instance = new MediaInfoDialog( p_intf,
                                                       NULL,
                                                       true,
                                                       true );
50 51
        return instance;
    }
52

Clément Stenac's avatar
Clément Stenac committed
53 54 55 56 57
    static void killInstance()
    {
        if( instance ) delete instance;
        instance= NULL;
    }
58

59
    virtual ~MediaInfoDialog();
60

61
    void showTab( int );
62
#if 0
63
    void setInput( input_item_t * );
64
#endif
65

66
private:
67
    input_item_t *p_item;
68
    static MediaInfoDialog *instance;
69

70
    bool mainInput;
71
    bool stats;
72
    bool b_cleaned;
73
    int i_runs;
74

75
    QTabWidget *IT;
76 77 78 79
    InputStatsPanel *ISP;
    MetaPanel *MP;
    InfoPanel *IP;
    ExtraMetaPanel *EMP;
80

81
    QPushButton *saveMetaButton;
82 83
    QLineEdit *uriLine;

84
public slots:
85
    void update( input_thread_t * );
86
    void update( input_item_t *, bool, bool );
87

88
private slots:
89
    void close();
90
    void clear();
91
    void saveMeta();
92
    void showMetaSaveButton();
93
    void updateButtons( int i_tab );
94 95 96
};

#endif