1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
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 "chapters.h"
|
---|
28 | #include "config.h"
|
---|
29 |
|
---|
30 | #include <QString>
|
---|
31 | #include <QSettings>
|
---|
32 |
|
---|
33 |
|
---|
34 | // Types of media
|
---|
35 |
|
---|
36 | #define TYPE_UNKNOWN -1
|
---|
37 | #define TYPE_FILE 0
|
---|
38 | #define TYPE_DVD 1
|
---|
39 | #define TYPE_STREAM 2
|
---|
40 | #define TYPE_VCD 3
|
---|
41 | #define TYPE_AUDIO_CD 4
|
---|
42 | #define TYPE_TV 5
|
---|
43 |
|
---|
44 | #ifdef BLURAY_SUPPORT
|
---|
45 | #define TYPE_BLURAY 6
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | class MediaData {
|
---|
49 |
|
---|
50 | public:
|
---|
51 | MediaData();
|
---|
52 | virtual ~MediaData();
|
---|
53 |
|
---|
54 | virtual void reset();
|
---|
55 |
|
---|
56 | QString filename;
|
---|
57 | double duration;
|
---|
58 |
|
---|
59 | //Resolution of the video
|
---|
60 | int video_width;
|
---|
61 | int video_height;
|
---|
62 | double video_aspect;
|
---|
63 |
|
---|
64 | int type; // file, dvd...
|
---|
65 | QString dvd_id;
|
---|
66 |
|
---|
67 | bool novideo; // Only audio
|
---|
68 |
|
---|
69 | bool initialized;
|
---|
70 |
|
---|
71 | void list();
|
---|
72 |
|
---|
73 | #if PROGRAM_SWITCH
|
---|
74 | Tracks programs;
|
---|
75 | #endif
|
---|
76 | Tracks videos;
|
---|
77 | Tracks audios;
|
---|
78 | TitleTracks titles; // for DVDs
|
---|
79 |
|
---|
80 | SubTracks subs;
|
---|
81 |
|
---|
82 | Chapters chapters;
|
---|
83 |
|
---|
84 | int n_chapters;
|
---|
85 |
|
---|
86 | // Clip info
|
---|
87 | QString clip_name;
|
---|
88 | QString clip_artist;
|
---|
89 | QString clip_author;
|
---|
90 | QString clip_album;
|
---|
91 | QString clip_genre;
|
---|
92 | QString clip_date;
|
---|
93 | QString clip_track;
|
---|
94 | QString clip_copyright;
|
---|
95 | QString clip_comment;
|
---|
96 | QString clip_software;
|
---|
97 |
|
---|
98 | QString stream_title;
|
---|
99 | QString stream_url;
|
---|
100 |
|
---|
101 |
|
---|
102 | // Other data not really useful for us,
|
---|
103 | // just to show info to the user.
|
---|
104 | QString demuxer;
|
---|
105 | QString video_format;
|
---|
106 | QString audio_format;
|
---|
107 | int video_bitrate;
|
---|
108 | QString video_fps;
|
---|
109 | int audio_bitrate;
|
---|
110 | int audio_rate;
|
---|
111 | int audio_nch; // channels?
|
---|
112 | QString video_codec;
|
---|
113 | QString audio_codec;
|
---|
114 |
|
---|
115 | /*QString info();*/
|
---|
116 | QString displayName(bool show_tag = true);
|
---|
117 | };
|
---|
118 |
|
---|
119 | #endif
|
---|