| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2010 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 | #define TYPE_TV 5
|
|---|
| 42 |
|
|---|
| 43 | class MediaData {
|
|---|
| 44 |
|
|---|
| 45 | public:
|
|---|
| 46 | MediaData();
|
|---|
| 47 | virtual ~MediaData();
|
|---|
| 48 |
|
|---|
| 49 | virtual void reset();
|
|---|
| 50 |
|
|---|
| 51 | QString filename;
|
|---|
| 52 | double duration;
|
|---|
| 53 |
|
|---|
| 54 | //Resolution of the video
|
|---|
| 55 | int video_width;
|
|---|
| 56 | int video_height;
|
|---|
| 57 | double video_aspect;
|
|---|
| 58 |
|
|---|
| 59 | int type; // file, dvd...
|
|---|
| 60 | QString dvd_id;
|
|---|
| 61 |
|
|---|
| 62 | bool novideo; // Only audio
|
|---|
| 63 |
|
|---|
| 64 | bool initialized;
|
|---|
| 65 |
|
|---|
| 66 | void list();
|
|---|
| 67 |
|
|---|
| 68 | #if PROGRAM_SWITCH
|
|---|
| 69 | Tracks programs;
|
|---|
| 70 | #endif
|
|---|
| 71 | Tracks videos;
|
|---|
| 72 | Tracks audios;
|
|---|
| 73 | TitleTracks titles; // for DVDs
|
|---|
| 74 |
|
|---|
| 75 | SubTracks subs;
|
|---|
| 76 |
|
|---|
| 77 | #if GENERIC_CHAPTER_SUPPORT
|
|---|
| 78 | int chapters;
|
|---|
| 79 | #else
|
|---|
| 80 | //int chapters, angles; // for DVDs
|
|---|
| 81 |
|
|---|
| 82 | // Matroshka chapters
|
|---|
| 83 | int mkv_chapters;
|
|---|
| 84 | #endif
|
|---|
| 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();
|
|---|
| 117 | };
|
|---|
| 118 |
|
|---|
| 119 | #endif
|
|---|