|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TIIO_3GP_H
|
|
Toshihiro Shimizu |
890ddd |
#define TIIO_3_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifdef x64
|
|
Toshihiro Shimizu |
890ddd |
#include "tiio_3gp_proxy.h"
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include <windows.h></windows.h>
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
namespace QuickTime {
|
|
Toshihiro Shimizu |
890ddd |
#define list List
|
|
Toshihiro Shimizu |
890ddd |
#define map Map
|
|
Toshihiro Shimizu |
890ddd |
#define iterator Iterator
|
|
Toshihiro Shimizu |
890ddd |
#define float_t Float_t
|
|
Shinya Kitaoka |
6526c7 |
#define int_fast8_t QT_int_fast8_t
|
|
Shinya Kitaoka |
6526c7 |
#define int_fast16_t QT_int_fast16_t
|
|
Shinya Kitaoka |
6526c7 |
#define uint_fast16_t QT_uint_fast16_t
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "QTML.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "Movies.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "Script.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "FixMath.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "Sound.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "QuickTimeComponents.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tquicktime.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef list
|
|
Toshihiro Shimizu |
890ddd |
#undef map
|
|
Toshihiro Shimizu |
890ddd |
#undef iterator
|
|
Toshihiro Shimizu |
890ddd |
#undef float_t
|
|
Shinya Kitaoka |
6526c7 |
#undef QT_int_fast8_t
|
|
Shinya Kitaoka |
6526c7 |
#undef QT_int_fast16_t
|
|
Shinya Kitaoka |
6526c7 |
#undef QT_uint_fast16_t
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tlevel_io.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "tthreadmessage.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
using namespace QuickTime;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TImageWriter3gp;
|
|
Toshihiro Shimizu |
890ddd |
class TImageReader3gp;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
bool IsQuickTimeInstalled();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class TLevelWriter3gp : public TLevelWriter {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TLevelWriter3gp(const TFilePath &path, TPropertyGroup *winfo);
|
|
Shinya Kitaoka |
120a6e |
~TLevelWriter3gp();
|
|
Shinya Kitaoka |
473e70 |
TImageWriterP getFrameWriter(TFrameId fid) override;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
bool m_initDone;
|
|
Shinya Kitaoka |
120a6e |
int m_IOError;
|
|
Shinya Kitaoka |
120a6e |
Handle m_dataRef;
|
|
Shinya Kitaoka |
120a6e |
Handle m_hMovieData;
|
|
Shinya Kitaoka |
120a6e |
Handle m_soundDataRef;
|
|
Shinya Kitaoka |
120a6e |
Handle m_hSoundMovieData;
|
|
Shinya Kitaoka |
120a6e |
MovieExportComponent m_myExporter;
|
|
Shinya Kitaoka |
120a6e |
void save(const TImageP &img, int frameIndex);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
Movie m_movie;
|
|
Shinya Kitaoka |
120a6e |
Track m_videoTrack;
|
|
Shinya Kitaoka |
120a6e |
Media m_videoMedia;
|
|
Shinya Kitaoka |
120a6e |
GWorldPtr m_gworld;
|
|
Shinya Kitaoka |
120a6e |
PixMapHandle m_pixmap;
|
|
Shinya Kitaoka |
120a6e |
short m_refNum;
|
|
Shinya Kitaoka |
120a6e |
UCHAR m_cancelled;
|
|
Shinya Kitaoka |
120a6e |
TSoundTrack *m_st;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
PixelXRGB *buf;
|
|
Shinya Kitaoka |
120a6e |
int buf_lx;
|
|
Shinya Kitaoka |
120a6e |
int buf_ly;
|
|
Shinya Kitaoka |
120a6e |
TThread::Mutex m_mutex;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
static TLevelWriter *create(const TFilePath &f, TPropertyGroup *winfo) {
|
|
Shinya Kitaoka |
120a6e |
return new TLevelWriter3gp(f, winfo);
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Shinya Kitaoka |
473e70 |
void saveSoundTrack(TSoundTrack *st) override;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class TLevelReader3gp : public TLevelReader {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TLevelReader3gp(const TFilePath &path);
|
|
Shinya Kitaoka |
120a6e |
~TLevelReader3gp();
|
|
Shinya Kitaoka |
473e70 |
TImageReaderP getFrameReader(TFrameId fid) override;
|
|
Shinya Kitaoka |
120a6e |
// friend class TImageReaderMov;
|
|
Shinya Kitaoka |
473e70 |
TLevelP loadInfo() override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void load(const TRasterP &rasP, int frameIndex, const TPoint &pos,
|
|
Shinya Kitaoka |
120a6e |
int shrinkX = 1, int shrinkY = 1);
|
|
Shinya Kitaoka |
120a6e |
TDimension getSize() const { return TDimension(m_lx, m_ly); }
|
|
Shinya Kitaoka |
120a6e |
TRect getBBox() const { return TRect(0, 0, m_lx - 1, m_ly - 1); }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int m_IOError;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
short m_refNum;
|
|
Shinya Kitaoka |
120a6e |
Movie m_movie;
|
|
Shinya Kitaoka |
120a6e |
short m_resId;
|
|
Shinya Kitaoka |
120a6e |
Track m_track;
|
|
Shinya Kitaoka |
120a6e |
long m_depth;
|
|
Shinya Kitaoka |
120a6e |
std::vector<timevalue> currentTimes;</timevalue>
|
|
Shinya Kitaoka |
120a6e |
int m_lx, m_ly;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
static TLevelReader *create(const TFilePath &f) {
|
|
Shinya Kitaoka |
120a6e |
return new TLevelReader3gp(f);
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Shinya Kitaoka |
120a6e |
TThread::Mutex m_mutex;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif //! x64
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif // TIIO_MOV_H
|