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

Last change on this file since 102 was 93, checked in by Silvan Scherrer, 15 years ago

smplayer: 0.6.9

File size: 2.2 KB
Line 
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#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"
50 << "asf" << "wmv"
51 << "bin" << "iso" << "vob"
52 << "mkv" << "nsv" << "ram" << "flv"
53 << "rm" << "swf"
54 << "ts" << "rmvb" << "dvr-ms" << "m2t" << "m2ts" << "rec";
55
56 _audio << "mp3" << "ogg" << "wav" << "wma" << "ac3" << "ra" << "ape" << "flac";
57
58 _subtitles << "srt" << "sub" << "ssa" << "ass" << "idx" << "txt" << "smi"
59 << "rt" << "utf" << "aqt";
60
61 _playlist << "m3u" << "m3u8" << "pls";
62
63 _multimedia = _video;
64 for (int n = 0; n < _audio.count(); n++) {
65 if (!_multimedia.contains(_audio[n])) _multimedia << _audio[n];
66 }
67
68 _all_playable << _multimedia << _playlist;
69}
70
71Extensions::~Extensions() {
72}
73
Note: See TracBrowser for help on using the repository browser.