| #pragma once |
| |
| #ifndef TIIO_MOV_H |
| #define TIIO_MOV_H |
| |
| #ifdef __LP64__ |
| #include "tiio_mov_proxy.h" |
| #else |
| |
| |
| |
| |
| |
| |
| #include <QuickTime/QuickTime.h> |
| |
| #include "tquicktime.h" |
| #include "tlevel_io.h" |
| #include "tthread.h" |
| #include "tthreadmessage.h" |
| |
| bool IsQuickTimeInstalled(); |
| |
| class TLevelWriterMov : public TLevelWriter { |
| std::vector<std::pair<int, TimeValue>> m_savedFrames; |
| |
| public: |
| TLevelWriterMov(const TFilePath &path, TPropertyGroup *winfo); |
| ~TLevelWriterMov(); |
| TImageWriterP getFrameWriter(TFrameId fid); |
| |
| int m_IOError; |
| |
| void save(const TImageP &img, int frameIndex); |
| |
| private: |
| Movie m_movie; |
| Track m_videoTrack; |
| Media m_videoMedia; |
| Track m_soundTrack; |
| Media m_soundMedia; |
| |
| GWorldPtr m_gworld; |
| PixMapHandle m_pixmap; |
| |
| short m_refNum; |
| |
| PixelXRGB *buf; |
| int buf_lx; |
| int buf_ly; |
| int m_firstFrame; |
| TThread::Mutex m_mutex; |
| ComponentInstance m_ci; |
| |
| public: |
| static TLevelWriter *create(const TFilePath &f, TPropertyGroup *winfo) { |
| return new TLevelWriterMov(f, winfo); |
| }; |
| void saveSoundTrack(TSoundTrack *st); |
| }; |
| |
| class TLevelReaderMov : public TLevelReader { |
| bool m_readAsToonzOutput; |
| |
| public: |
| TLevelReaderMov(const TFilePath &path); |
| ~TLevelReaderMov(); |
| TImageReaderP getFrameReader(TFrameId fid); |
| |
| TLevelP loadInfo(); |
| |
| void enableRandomAccessRead(bool enable) { m_readAsToonzOutput = enable; } |
| void load(const TRasterP &rasP, int frameIndex, const TPoint &pos, |
| int shrinkX = 1, int shrinkY = 1); |
| TDimension getSize() const { return TDimension(m_lx, m_ly); } |
| TRect getBBox() const { return TRect(0, 0, m_lx - 1, m_ly - 1); } |
| |
| int m_IOError; |
| |
| private: |
| short m_refNum; |
| Movie m_movie; |
| short m_resId; |
| Track m_track; |
| long m_depth; |
| map<int, TimeValue> currentTimes; |
| int m_lx, m_ly; |
| |
| public: |
| static TLevelReader *create(const TFilePath &f) { |
| return new TLevelReaderMov(f); |
| }; |
| TThread::Mutex m_mutex; |
| |
| TLevelP loadToonzOutputFormatInfo(); |
| }; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| namespace Tiio { |
| |
| class MovWriterProperties : public TPropertyGroup { |
| |
| |
| |
| public: |
| MovWriterProperties(); |
| |
| |
| |
| |
| |
| |
| |
| }; |
| } |
| |
| #endif |
| |
| #endif |