source: smplayer/trunk/src/extensions.cpp@ 136

Last change on this file since 136 was 135, checked in by Silvan Scherrer, 13 years ago

SMplayer: update trunk to 0.8.1

  • Property svn:eol-style set to LF
File size: 2.2 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2012 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#include "extensions.h"
20
21ExtensionList::ExtensionList() : QStringList()
22{
23}
24
25QString ExtensionList::forFilter() {
26 QString s;
27 for (int n=0; n < count(); n++) {
28 s = s + "*." + at(n) + " ";
29 }
30 if (!s.isEmpty()) s = " (" + s + ")";
31 return s;
32}
33
34QString ExtensionList::forRegExp() {
35 QString s;
36 for (int n=0; n < count(); n++) {
37 if (!s.isEmpty()) s = s + "|";
38 s = s + "^" + at(n) + "$";
39 }
40 return s;
41}
42
43Extensions::Extensions()
44{
45 _video << "avi" << "vfw" << "divx"
46 << "mpg" << "mpeg" << "m1v" << "m2v" << "mpv" << "dv" << "3gp"
47 << "mov" << "mp4" << "m4v" << "mqv"
48 << "dat" << "vcd"
49 << "ogg" << "ogm" << "ogv" << "ogx"
50 << "asf" << "wmv"
51 << "bin" << "iso" << "vob"
52 << "mkv" << "nsv" << "ram" << "flv"
53 << "rm" << "swf"
54 << "ts" << "rmvb" << "dvr-ms" << "m2t" << "m2ts" << "rec" << "wtv"
55 << "f4v" << "hdmov" << "webm" << "vp8" ;
56
57 _audio << "mp3" << "ogg" << "oga" << "wav" << "wma" << "ac3" << "ra" << "ape" << "flac" << "thd" << "mka" << "m4a";
58
59 _subtitles << "srt" << "sub" << "ssa" << "ass" << "idx" << "txt" << "smi"
60 << "rt" << "utf" << "aqt";
61
62 _playlist << "m3u" << "m3u8" << "pls";
63
64 _multimedia = _video;
65 for (int n = 0; n < _audio.count(); n++) {
66 if (!_multimedia.contains(_audio[n])) _multimedia << _audio[n];
67 }
68
69 _all_playable << _multimedia << _playlist;
70}
71
72Extensions::~Extensions() {
73}
74
Note: See TracBrowser for help on using the repository browser.