Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TIIO_3GP_PROXY_H
Toshihiro Shimizu 890ddd
#define TIIO_3GP_PROXY_H
Toshihiro Shimizu 890ddd
Jerome Duval b2d63b
#if defined(x64) || defined(__LP64__) || defined(LINUX) || defined(FREEBSD) || defined(HAIKU) || (defined(_WIN32) && defined(__GNUC__))
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
//    TLevelWriter3gp Proxy - delegates to a background 32-bit process
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TLevelWriter3gp final : public TLevelWriter {
Shinya Kitaoka 120a6e
  unsigned int m_id;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TLevelWriter3gp(const TFilePath &path, TPropertyGroup *winfo);
Shinya Kitaoka 120a6e
  ~TLevelWriter3gp();
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 TLevelWriter3gp(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
//    TLevelReader3gp Proxy
Toshihiro Shimizu 890ddd
//******************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TLevelReader3gp 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
  TLevelReader3gp(const TFilePath &path);
Shinya Kitaoka 120a6e
  ~TLevelReader3gp();
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 TLevelReader3gp(f);
Shinya Kitaoka 120a6e
  }
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_3GP_PROXY_H