An implementation of IMkvWriter using our File type.
More...
#include <mkv_writer.h>
An implementation of IMkvWriter using our File type.
Definition at line 21 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 93 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 16 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 74 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 78 of file mkv_writer.cc.
◆ Seekable()
bool shaka::media::MkvWriter::Seekable |
( |
| ) |
const |
|
override |
- Returns
- true if the writer is seekable.
Definition at line 89 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 40 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 59 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 63 of file mkv_writer.cc.
The documentation for this class was generated from the following files: