Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TIIO_MOV_PROXY_H
Toshihiro Shimizu 890ddd
#define TIIO_MOV_PROXY_H
Toshihiro Shimizu 890ddd
Campbell Barton deffae
#if defined(x64) || defined(__LP64__) || defined(LINUX)
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
// Qt includes
Toshihiro Shimizu 890ddd
#include <qstring></qstring>
Toshihiro Shimizu 890ddd
#include <qlocalsocket></qlocalsocket>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tlevel_io.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
// QuickTime check
Toshihiro Shimizu 890ddd
bool IsQuickTimeInstalled();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
//    TLevelWriterMov Proxy - delegates to a background 32-bit process
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TLevelWriterMov final : public TLevelWriter {
Shinya Kitaoka 120a6e
  unsigned int m_id;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TLevelWriterMov(const TFilePath &path, TPropertyGroup *winfo);
Shinya Kitaoka 120a6e
  ~TLevelWriterMov();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setFrameRate(double fps);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TImageWriterP getFrameWriter(TFrameId fid);
Shinya Kitaoka 120a6e
  void save(const TImageP &img, int frameIndex);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void saveSoundTrack(TSoundTrack *st);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  static TLevelWriter *create(const TFilePath &f, TPropertyGroup *winfo) {
Shinya Kitaoka 120a6e
    return new TLevelWriterMov(f, winfo);
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  QLocalSocket *socket();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
//    TLevelReaderMov Proxy
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TLevelReaderMov final : public TLevelReader {
Shinya Kitaoka 120a6e
  unsigned int m_id;
Shinya Kitaoka 120a6e
  int m_lx, m_ly;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TLevelReaderMov(const TFilePath &path);
Shinya Kitaoka 120a6e
  ~TLevelReaderMov();
Shinya Kitaoka 120a6e
  TImageReaderP getFrameReader(TFrameId fid);
Shinya Kitaoka 120a6e
  TLevelP loadInfo();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  const TImageInfo *getImageInfo(TFrameId fid) { return m_info; }
Shinya Kitaoka 120a6e
  const TImageInfo *getImageInfo() { return m_info; }
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void enableRandomAccessRead(bool enable);
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
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  static TLevelReader *create(const TFilePath &f) {
Shinya Kitaoka 120a6e
    return new TLevelReaderMov(f);
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//===========================================================================
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
namespace Tiio {
Shinya Kitaoka d1f6c4
class MovWriterProperties final : public TPropertyGroup {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  MovWriterProperties();
Toshihiro Shimizu 890ddd
};
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_PROXY_H