You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.0 KiB
63 lines
2.0 KiB
11 years ago
|
/***************************************************************************
|
||
|
Copyright (C) 2006
|
||
|
by Marco Gulino <marco@kmobiletools.org>
|
||
|
|
||
|
This program is free software; you can redistribute it and/or modify
|
||
|
it under the terms of the GNU General Public License as published by
|
||
|
the Free Software Foundation; either version 2 of the License, or
|
||
|
(at your option) any later version.
|
||
|
|
||
|
This program is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
GNU General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with this program; if not, write to the
|
||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
***************************************************************************/
|
||
|
|
||
3 years ago
|
#ifndef _mplayer_thumbnailer_H_
|
||
|
#define _mplayer_thumbnailer_H_
|
||
11 years ago
|
|
||
6 years ago
|
#include <tqstring.h>
|
||
|
#include <tqcstring.h>
|
||
11 years ago
|
|
||
6 years ago
|
#include <tqpixmap.h>
|
||
11 years ago
|
#include <tdeio/thumbcreator.h>
|
||
11 years ago
|
|
||
11 years ago
|
class TQProcess;
|
||
|
class TQCString;
|
||
11 years ago
|
class KTempDir;
|
||
|
class KRandomSequence;
|
||
|
class KPixmapSplitter;
|
||
6 years ago
|
#include <tqobject.h>
|
||
11 years ago
|
|
||
3 years ago
|
class MPlayerThumbnailer : public TQObject, public ThumbCreator
|
||
11 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
3 years ago
|
MPlayerThumbnailer();
|
||
|
virtual ~MPlayerThumbnailer();
|
||
11 years ago
|
virtual bool create(const TQString &path, int width, int height, TQImage &img);
|
||
11 years ago
|
virtual Flags flags() const;
|
||
|
protected:
|
||
11 years ago
|
TQPixmap getFrame(const TQString &path, int flags);
|
||
|
static uint imageVariance(TQImage image );
|
||
11 years ago
|
private:
|
||
|
KPixmapSplitter *m_splitter;
|
||
|
char *m_data;
|
||
|
int m_dataSize;
|
||
11 years ago
|
TQPixmap m_pixmap;
|
||
|
TQProcess *mplayerprocess;
|
||
|
TQStringList customargs;
|
||
11 years ago
|
KTempDir *tmpdir;
|
||
|
KRandomSequence *rand;
|
||
11 years ago
|
TQString playerBin;
|
||
11 years ago
|
enum frameflags { framerandom=0x1, framestart=0x2, frameend=0x4 };
|
||
|
struct { int towidth; int toheight; int fps; int seconds; } fileinfo;
|
||
|
};
|
||
|
|
||
|
#endif
|