DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | List of all members
shaka::media::MkvWriter Class Reference

An implementation of IMkvWriter using our File type. More...

#include <mkv_writer.h>

Inheritance diagram for shaka::media::MkvWriter:

Public Member Functions

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 ()
 

Detailed Description

An implementation of IMkvWriter using our File type.

Definition at line 21 of file mkv_writer.h.

Member Function Documentation

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 90 of file mkv_writer.cc.

Status shaka::media::MkvWriter::Open ( const std::string &  name)

Opens the given file for writing. This MUST be called before any other calls.

Parameters
nameThe path to the file to open.
Returns
Whether the operation succeeded.

Definition at line 16 of file mkv_writer.cc.

mkvmuxer::int64 shaka::media::MkvWriter::Position ( ) const
override
Returns
The offset of the output position from the beginning of the output.

Definition at line 71 of file mkv_writer.cc.

mkvmuxer::int32 shaka::media::MkvWriter::Position ( mkvmuxer::int64  position)
override

Set the current File position.

Returns
0 on success.

Definition at line 75 of file mkv_writer.cc.

bool shaka::media::MkvWriter::Seekable ( ) const
override
Returns
true if the writer is seekable.

Definition at line 86 of file mkv_writer.cc.

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 37 of file mkv_writer.cc.

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 56 of file mkv_writer.cc.

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 60 of file mkv_writer.cc.


The documentation for this class was generated from the following files: