mkvmuxer: Revert changes to IMkvWriter types.
- Restore integer typedefs in mkvmuxertypes.h. - Revert integer type changes in IMkvWriter declaration. - Revert integer type changes in mkvwriter.{cc,h} Change-Id: I3e9f8a3d079f485a3ea051f7477c803f9c9087e4
This commit is contained in:
parent
030518edd3
commit
784b6fe4fe
@ -37,14 +37,14 @@ const uint64_t kMaxTrackNumber = 126;
|
|||||||
class IMkvWriter {
|
class IMkvWriter {
|
||||||
public:
|
public:
|
||||||
// Writes out |len| bytes of |buf|. Returns 0 on success.
|
// 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
|
// Returns the offset of the output position from the beginning of the
|
||||||
// output.
|
// output.
|
||||||
virtual int64_t Position() const = 0;
|
virtual int64 Position() const = 0;
|
||||||
|
|
||||||
// Set the current File position. Returns 0 on success.
|
// 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.
|
// Returns true if the writer is seekable.
|
||||||
virtual bool Seekable() const = 0;
|
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
|
// |position| is the location in the WebM stream where the first octet of the
|
||||||
// element identifier will be written.
|
// element identifier will be written.
|
||||||
// Note: the |MkvId| enumeration in webmids.hpp defines element values.
|
// 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:
|
protected:
|
||||||
IMkvWriter();
|
IMkvWriter();
|
||||||
|
@ -9,6 +9,15 @@
|
|||||||
#ifndef MKVMUXER_MKVMUXERTYPES_H_
|
#ifndef MKVMUXER_MKVMUXERTYPES_H_
|
||||||
#define 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
|
// Copied from Chromium basictypes.h
|
||||||
// A macro to disallow the copy constructor and operator= functions
|
// A macro to disallow the copy constructor and operator= functions
|
||||||
// This should be used in the private: declarations for a class
|
// This should be used in the private: declarations for a class
|
||||||
|
@ -20,7 +20,7 @@ MkvWriter::MkvWriter(FILE* fp) : file_(fp), writer_owns_file_(false) {}
|
|||||||
|
|
||||||
MkvWriter::~MkvWriter() { Close(); }
|
MkvWriter::~MkvWriter() { Close(); }
|
||||||
|
|
||||||
int32_t MkvWriter::Write(const void* buffer, uint32_t length) {
|
int32 MkvWriter::Write(const void* buffer, uint32 length) {
|
||||||
if (!file_)
|
if (!file_)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ void MkvWriter::Close() {
|
|||||||
file_ = NULL;
|
file_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t MkvWriter::Position() const {
|
int64 MkvWriter::Position() const {
|
||||||
if (!file_)
|
if (!file_)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ int64_t MkvWriter::Position() const {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t MkvWriter::Position(int64_t position) {
|
int32 MkvWriter::Position(int64 position) {
|
||||||
if (!file_)
|
if (!file_)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -83,6 +83,6 @@ int32_t MkvWriter::Position(int64_t position) {
|
|||||||
|
|
||||||
bool MkvWriter::Seekable() const { return true; }
|
bool MkvWriter::Seekable() const { return true; }
|
||||||
|
|
||||||
void MkvWriter::ElementStartNotify(uint64_t, int64_t) {}
|
void MkvWriter::ElementStartNotify(uint64, int64) {}
|
||||||
|
|
||||||
} // namespace mkvmuxer
|
} // namespace mkvmuxer
|
||||||
|
@ -24,11 +24,11 @@ class MkvWriter : public IMkvWriter {
|
|||||||
virtual ~MkvWriter();
|
virtual ~MkvWriter();
|
||||||
|
|
||||||
// IMkvWriter interface
|
// IMkvWriter interface
|
||||||
virtual int64_t Position() const;
|
virtual int64 Position() const;
|
||||||
virtual int32_t Position(int64_t position);
|
virtual int32 Position(int64 position);
|
||||||
virtual bool Seekable() const;
|
virtual bool Seekable() const;
|
||||||
virtual int32_t Write(const void* buffer, uint32_t length);
|
virtual int32 Write(const void* buffer, uint32 length);
|
||||||
virtual void ElementStartNotify(uint64_t element_id, int64_t position);
|
virtual void ElementStartNotify(uint64 element_id, int64 position);
|
||||||
|
|
||||||
// Creates and opens a file for writing. |filename| is the name of the file
|
// 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
|
// to open. This function will overwrite the contents of |filename|. Returns
|
||||||
|
Loading…
x
Reference in New Issue
Block a user