An implementation of IMkvWriter using our File type.
More...
#include <mkv_writer.h>
|
Status | Open (const std::string &name) |
|
Status | Close () |
| Closes the file. MUST call Open before calling any other methods.
|
|
mkvmuxer::int32 | Write (const void *buf, mkvmuxer::uint32 len) override |
|
mkvmuxer::int64 | Position () const override |
|
mkvmuxer::int32 | Position (mkvmuxer::int64 position) override |
|
bool | Seekable () const override |
|
void | ElementStartNotify (mkvmuxer::uint64 element_id, mkvmuxer::int64 position) override |
|
int64_t | WriteFromFile (File *source) |
|
int64_t | WriteFromFile (File *source, int64_t max_copy) |
|
File * | file () |
|
An implementation of IMkvWriter using our File type.
Definition at line 23 of file mkv_writer.h.
◆ ElementStartNotify()
void shaka::media::MkvWriter::ElementStartNotify |
( |
mkvmuxer::uint64 |
element_id, |
|
|
mkvmuxer::int64 |
position |
|
) |
| |
|
override |
Element start notification. Called whenever an element identifier is about to be written to the stream. element_id is the element identifier, and 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.
Definition at line 95 of file mkv_writer.cc.
◆ Open()
Status shaka::media::MkvWriter::Open |
( |
const std::string & |
name | ) |
|
Opens the given file for writing. This MUST be called before any other calls.
- Parameters
-
name | The path to the file to open. |
- Returns
- Whether the operation succeeded.
Definition at line 18 of file mkv_writer.cc.
◆ Position() [1/2]
mkvmuxer::int64 shaka::media::MkvWriter::Position |
( |
| ) |
const |
|
override |
- Returns
- The offset of the output position from the beginning of the output.
Definition at line 76 of file mkv_writer.cc.
◆ Position() [2/2]
mkvmuxer::int32 shaka::media::MkvWriter::Position |
( |
mkvmuxer::int64 |
position | ) |
|
|
override |
Set the current File position.
- Returns
- 0 on success.
Definition at line 80 of file mkv_writer.cc.
◆ Seekable()
bool shaka::media::MkvWriter::Seekable |
( |
| ) |
const |
|
override |
- Returns
- true if the writer is seekable.
Definition at line 91 of file mkv_writer.cc.
◆ Write()
mkvmuxer::int32 shaka::media::MkvWriter::Write |
( |
const void * |
buf, |
|
|
mkvmuxer::uint32 |
len |
|
) |
| |
|
override |
Writes out len bytes of buf.
- Returns
- 0 on success.
Definition at line 42 of file mkv_writer.cc.
◆ WriteFromFile() [1/2]
int64_t shaka::media::MkvWriter::WriteFromFile |
( |
File * |
source | ) |
|
Writes the contents of the given file to this file.
- Returns
- The number of bytes written; or < 0 on error.
Definition at line 61 of file mkv_writer.cc.
◆ WriteFromFile() [2/2]
int64_t shaka::media::MkvWriter::WriteFromFile |
( |
File * |
source, |
|
|
int64_t |
max_copy |
|
) |
| |
Writes the contents of the given file to this file, up to a maximum number of bytes. If max_copy is negative, will copy to EOF.
- Returns
- The number of bytes written; or < 0 on error.
Definition at line 65 of file mkv_writer.cc.
The documentation for this class was generated from the following files: