1 // Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the LICENSE file in the root of the source
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
14 #include "mkvmuxer.hpp"
15 #include "mkvmuxertypes.hpp"
19 // Default implementation of the IMkvWriter interface on Windows.
20 class MkvWriter : public IMkvWriter {
23 explicit MkvWriter(FILE* fp);
26 // IMkvWriter interface
27 virtual int64 Position() const;
28 virtual int32 Position(int64 position);
29 virtual bool Seekable() const;
30 virtual int32 Write(const void* buffer, uint32 length);
31 virtual void ElementStartNotify(uint64 element_id, int64 position);
33 // Creates and opens a file for writing. |filename| is the name of the file
34 // to open. This function will overwrite the contents of |filename|. Returns
36 bool Open(const char* filename);
38 // Closes an opened file.
42 // File handle to output file.
44 bool writer_owns_file_;
46 LIBWEBM_DISALLOW_COPY_AND_ASSIGN(MkvWriter);
49 } // end namespace mkvmuxer
51 #endif // MKVWRITER_HPP