~ubuntu-branches/ubuntu/wily/smplayer/wily

« back to all changes in this revision

Viewing changes to src/mediadata.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mto: (1.1.9 upstream) (3.1.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-nsklbxenl2hf2n6h
ImportĀ upstreamĀ versionĀ 0.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  smplayer, GUI front-end for mplayer.
 
2
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
 
3
 
 
4
    This program is free software; you can redistribute it and/or modify
 
5
    it under the terms of the GNU General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or
 
7
    (at your option) any later version.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
    GNU General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU General Public License
 
15
    along with this program; if not, write to the Free Software
 
16
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
*/
 
18
 
 
19
#ifndef _MEDIADATA_H_
 
20
#define _MEDIADATA_H_
 
21
 
 
22
/* Here we store some volatile info about the file we need to remember */
 
23
 
 
24
#include "tracks.h"
 
25
#include "subtracks.h"
 
26
#include "titletracks.h"
 
27
#include "config.h"
 
28
 
 
29
#include <QString>
 
30
#include <QSettings>
 
31
 
 
32
 
 
33
// Types of media
 
34
 
 
35
#define TYPE_UNKNOWN -1
 
36
#define TYPE_FILE 0
 
37
#define TYPE_DVD 1
 
38
#define TYPE_STREAM 2
 
39
#define TYPE_VCD 3
 
40
#define TYPE_AUDIO_CD 4
 
41
 
 
42
class MediaData {
 
43
 
 
44
public:
 
45
        MediaData();
 
46
        virtual ~MediaData();
 
47
 
 
48
        virtual void reset();
 
49
 
 
50
        QString filename;
 
51
        double duration;
 
52
 
 
53
        //Resolution of the video
 
54
        int video_width;
 
55
        int video_height;
 
56
        double video_aspect;
 
57
 
 
58
        int type; // file, dvd...
 
59
        QString dvd_id;
 
60
 
 
61
        bool novideo; // Only audio
 
62
 
 
63
        bool initialized;
 
64
 
 
65
        void list();
 
66
 
 
67
        Tracks videos;
 
68
        Tracks audios;
 
69
        TitleTracks titles; // for DVDs
 
70
 
 
71
        SubTracks subs;
 
72
 
 
73
#if GENERIC_CHAPTER_SUPPORT
 
74
        int chapters;
 
75
#else
 
76
        //int chapters, angles; // for DVDs
 
77
 
 
78
        // Matroshka chapters
 
79
        int mkv_chapters;
 
80
#endif
 
81
 
 
82
        // Clip info
 
83
        QString clip_name;
 
84
        QString clip_artist;
 
85
        QString clip_author;
 
86
        QString clip_album;
 
87
        QString clip_genre;
 
88
        QString clip_date;
 
89
        QString clip_track;
 
90
        QString clip_copyright;
 
91
        QString clip_comment;
 
92
        QString clip_software;
 
93
 
 
94
        QString stream_title;
 
95
        QString stream_url;
 
96
 
 
97
 
 
98
        // Other data not really useful for us,
 
99
        // just to show info to the user.
 
100
        QString demuxer;
 
101
        QString video_format;
 
102
        QString audio_format;
 
103
        int video_bitrate;
 
104
        QString video_fps;
 
105
        int audio_bitrate;
 
106
        int audio_rate;
 
107
        int audio_nch; // channels?
 
108
        QString video_codec;
 
109
        QString audio_codec;
 
110
 
 
111
        /*QString info();*/
 
112
        QString displayName();
 
113
};
 
114
 
 
115
#endif