#include "media/muxers/mp4_fragment_box_writer.h"
#include <memory>
#include <type_traits>
#include <vector>
#include "media/formats/mp4/fourccs.h"
#include "media/muxers/box_byte_stream.h"
#include "media/muxers/mp4_muxer_context.h"
#include "media/muxers/mp4_type_conversion.h"
#include "media/muxers/output_position_tracker.h"
namespace media {
namespace {
void ValidateSampleFlags(uint32_t flags) { … }
bool IsVideoTrackBox(const Mp4MuxerContext& context, uint32_t track_id) { … }
}
Mp4MovieFragmentBoxWriter::Mp4MovieFragmentBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::MovieFragment& box)
: … { … }
Mp4MovieFragmentBoxWriter::~Mp4MovieFragmentBoxWriter() = default;
void Mp4MovieFragmentBoxWriter::Write(BoxByteStream& writer) { … }
Mp4MovieFragmentHeaderBoxWriter::Mp4MovieFragmentHeaderBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::MovieFragmentHeader& box)
: … { … }
Mp4MovieFragmentHeaderBoxWriter::~Mp4MovieFragmentHeaderBoxWriter() = default;
void Mp4MovieFragmentHeaderBoxWriter::Write(BoxByteStream& writer) { … }
Mp4TrackFragmentBoxWriter::Mp4TrackFragmentBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::TrackFragment& box)
: … { … }
Mp4TrackFragmentBoxWriter::~Mp4TrackFragmentBoxWriter() = default;
void Mp4TrackFragmentBoxWriter::Write(BoxByteStream& writer) { … }
Mp4TrackFragmentHeaderBoxWriter::Mp4TrackFragmentHeaderBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::TrackFragmentHeader& box)
: … { … }
Mp4TrackFragmentHeaderBoxWriter::~Mp4TrackFragmentHeaderBoxWriter() = default;
void Mp4TrackFragmentHeaderBoxWriter::Write(BoxByteStream& writer) { … }
Mp4TrackFragmentDecodeTimeBoxWriter::Mp4TrackFragmentDecodeTimeBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::TrackFragmentDecodeTime& box)
: … { … }
Mp4TrackFragmentDecodeTimeBoxWriter::~Mp4TrackFragmentDecodeTimeBoxWriter() =
default;
void Mp4TrackFragmentDecodeTimeBoxWriter::Write(BoxByteStream& writer) { … }
Mp4TrackFragmentRunBoxWriter::Mp4TrackFragmentRunBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::TrackFragmentRun& box)
: … { … }
Mp4TrackFragmentRunBoxWriter::~Mp4TrackFragmentRunBoxWriter() = default;
void Mp4TrackFragmentRunBoxWriter::Write(BoxByteStream& writer) { … }
Mp4MediaDataBoxWriter::Mp4MediaDataBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::MediaData& box)
: … { … }
Mp4MediaDataBoxWriter::~Mp4MediaDataBoxWriter() = default;
void Mp4MediaDataBoxWriter::Write(BoxByteStream& writer) { … }
Mp4FragmentRandomAccessBoxWriter::Mp4FragmentRandomAccessBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::FragmentRandomAccess& box)
: … { … }
Mp4FragmentRandomAccessBoxWriter::~Mp4FragmentRandomAccessBoxWriter() = default;
void Mp4FragmentRandomAccessBoxWriter::Write(BoxByteStream& writer) { … }
Mp4TrackFragmentRandomAccessBoxWriter::Mp4TrackFragmentRandomAccessBoxWriter(
const Mp4MuxerContext& context,
const mp4::writable_boxes::TrackFragmentRandomAccess& box)
: … { … }
Mp4TrackFragmentRandomAccessBoxWriter::
~Mp4TrackFragmentRandomAccessBoxWriter() = default;
void Mp4TrackFragmentRandomAccessBoxWriter::Write(BoxByteStream& writer) { … }
Mp4FragmentRandomAccessOffsetBoxBoxWriter::
Mp4FragmentRandomAccessOffsetBoxBoxWriter(const Mp4MuxerContext& context)
: … { … }
Mp4FragmentRandomAccessOffsetBoxBoxWriter::
~Mp4FragmentRandomAccessOffsetBoxBoxWriter() = default;
void Mp4FragmentRandomAccessOffsetBoxBoxWriter::Write(BoxByteStream& writer) { … }
}