From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/avi/kfile_avi.h | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 kfile-plugins/avi/kfile_avi.h (limited to 'kfile-plugins/avi/kfile_avi.h') diff --git a/kfile-plugins/avi/kfile_avi.h b/kfile-plugins/avi/kfile_avi.h new file mode 100644 index 00000000..62a2bf22 --- /dev/null +++ b/kfile-plugins/avi/kfile_avi.h @@ -0,0 +1,90 @@ +/* This file is part of the KDE project + * Copyright (C) 2002 Shane Wright + * + * 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 version 2. + * + * 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; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * + */ + +#ifndef __KFILE_AVI_H__ +#define __KFILE_AVI_H__ + +#include +#include + +#if !defined(__osf__) +#include +#else +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#endif + + + +class QStringList; + +class KAviPlugin: public KFilePlugin +{ + Q_OBJECT + +public: + KAviPlugin( QObject *parent, const char *name, const QStringList& args ); + + + + virtual bool readInfo( KFileMetaInfo& info, uint what); + +private: + + bool read_avi(); + bool read_list(); + bool read_avih(); + bool read_strl(); + + bool read_strf(uint32_t blocksize); + bool read_strh(uint32_t blocksize); + + // methods to sort out human readable names for the codecs + const char * resolve_audio(uint16_t id); + + QFile f; + QDataStream dstream; + + // AVI header information + bool done_avih; + uint32_t avih_microsecperframe; + uint32_t avih_maxbytespersec; + uint32_t avih_reserved1; + uint32_t avih_flags; + uint32_t avih_totalframes; + uint32_t avih_initialframes; + uint32_t avih_streams; + uint32_t avih_buffersize; + uint32_t avih_width; + uint32_t avih_height; + uint32_t avih_scale; + uint32_t avih_rate; + uint32_t avih_start; + uint32_t avih_length; + + char handler_vids[5]; // leave room for trailing \0 + char handler_auds[5]; + uint16_t handler_audio; // the ID of the audio codec + bool done_audio; + + bool wantstrf; + +}; + +#endif -- cgit v1.2.1