diff --git a/mkvmuxer/mkvmuxer.h b/mkvmuxer/mkvmuxer.h index 1559d56..55ba071 100644 --- a/mkvmuxer/mkvmuxer.h +++ b/mkvmuxer/mkvmuxer.h @@ -37,14 +37,14 @@ const uint64_t kMaxTrackNumber = 126; class IMkvWriter { public: // Writes out |len| bytes of |buf|. Returns 0 on success. - virtual int32_t Write(const void* buf, uint32_t len) = 0; + virtual int32 Write(const void* buf, uint32 len) = 0; // Returns the offset of the output position from the beginning of the // output. - virtual int64_t Position() const = 0; + virtual int64 Position() const = 0; // Set the current File position. Returns 0 on success. - virtual int32_t Position(int64_t position) = 0; + virtual int32 Position(int64 position) = 0; // Returns true if the writer is seekable. virtual bool Seekable() const = 0; @@ -54,7 +54,7 @@ class IMkvWriter { // |position| is the location in the WebM stream where the first octet of the // element identifier will be written. // Note: the |MkvId| enumeration in webmids.hpp defines element values. - virtual void ElementStartNotify(uint64_t element_id, int64_t position) = 0; + virtual void ElementStartNotify(uint64 element_id, int64 position) = 0; protected: IMkvWriter(); diff --git a/mkvmuxer/mkvmuxertypes.h b/mkvmuxer/mkvmuxertypes.h index f5c80f6..e5db121 100644 --- a/mkvmuxer/mkvmuxertypes.h +++ b/mkvmuxer/mkvmuxertypes.h @@ -9,6 +9,15 @@ #ifndef MKVMUXER_MKVMUXERTYPES_H_ #define MKVMUXER_MKVMUXERTYPES_H_ +namespace mkvmuxer { +typedef unsigned char uint8; +typedef short int16; +typedef int int32; +typedef unsigned int uint32; +typedef long long int64; +typedef unsigned long long uint64; +} // namespace mkvmuxer + // Copied from Chromium basictypes.h // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class diff --git a/mkvmuxer/mkvwriter.cc b/mkvmuxer/mkvwriter.cc index d7d6de9..ca48e14 100644 --- a/mkvmuxer/mkvwriter.cc +++ b/mkvmuxer/mkvwriter.cc @@ -20,7 +20,7 @@ MkvWriter::MkvWriter(FILE* fp) : file_(fp), writer_owns_file_(false) {} MkvWriter::~MkvWriter() { Close(); } -int32_t MkvWriter::Write(const void* buffer, uint32_t length) { +int32 MkvWriter::Write(const void* buffer, uint32 length) { if (!file_) return -1; @@ -59,7 +59,7 @@ void MkvWriter::Close() { file_ = NULL; } -int64_t MkvWriter::Position() const { +int64 MkvWriter::Position() const { if (!file_) return 0; @@ -70,7 +70,7 @@ int64_t MkvWriter::Position() const { #endif } -int32_t MkvWriter::Position(int64_t position) { +int32 MkvWriter::Position(int64 position) { if (!file_) return -1; @@ -83,6 +83,6 @@ int32_t MkvWriter::Position(int64_t position) { bool MkvWriter::Seekable() const { return true; } -void MkvWriter::ElementStartNotify(uint64_t, int64_t) {} +void MkvWriter::ElementStartNotify(uint64, int64) {} } // namespace mkvmuxer diff --git a/mkvmuxer/mkvwriter.h b/mkvmuxer/mkvwriter.h index ea6656e..4227c63 100644 --- a/mkvmuxer/mkvwriter.h +++ b/mkvmuxer/mkvwriter.h @@ -24,11 +24,11 @@ class MkvWriter : public IMkvWriter { virtual ~MkvWriter(); // IMkvWriter interface - virtual int64_t Position() const; - virtual int32_t Position(int64_t position); + virtual int64 Position() const; + virtual int32 Position(int64 position); virtual bool Seekable() const; - virtual int32_t Write(const void* buffer, uint32_t length); - virtual void ElementStartNotify(uint64_t element_id, int64_t position); + virtual int32 Write(const void* buffer, uint32 length); + virtual void ElementStartNotify(uint64 element_id, int64 position); // Creates and opens a file for writing. |filename| is the name of the file // to open. This function will overwrite the contents of |filename|. Returns