chromium/media/formats/webcodecs/webcodecs_encoded_chunk_stream_parser.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/formats/webcodecs/webcodecs_encoded_chunk_stream_parser.h"

#include <string>

#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "media/base/media_log.h"
#include "media/base/media_track.h"
#include "media/base/media_tracks.h"
#include "media/base/stream_parser.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/timestamp_constants.h"

namespace {

// TODO(crbug.com/40155657): Since these must be identical to those generated
// in the SourceBuffer, consider moving these to possibly stream_parser.h.
// Meanwhile, must be kept in sync with similar constexpr in SourceBuffer
// manually.
constexpr media::StreamParser::TrackId kWebCodecsAudioTrackId =;
constexpr media::StreamParser::TrackId kWebCodecsVideoTrackId =;

}  // namespace

namespace media {

WebCodecsEncodedChunkStreamParser::WebCodecsEncodedChunkStreamParser(
    std::unique_ptr<AudioDecoderConfig> audio_config)
    :{}

WebCodecsEncodedChunkStreamParser::WebCodecsEncodedChunkStreamParser(
    std::unique_ptr<VideoDecoderConfig> video_config)
    :{}

WebCodecsEncodedChunkStreamParser::~WebCodecsEncodedChunkStreamParser() =
    default;

void WebCodecsEncodedChunkStreamParser::Init(
    InitCB init_cb,
    NewConfigCB config_cb,
    NewBuffersCB new_buffers_cb,
    EncryptedMediaInitDataCB /* ignored */,
    NewMediaSegmentCB new_segment_cb,
    EndMediaSegmentCB end_of_segment_cb,
    MediaLog* media_log) {}

void WebCodecsEncodedChunkStreamParser::Flush() {}

bool WebCodecsEncodedChunkStreamParser::GetGenerateTimestampsFlag() const {}

bool WebCodecsEncodedChunkStreamParser::AppendToParseBuffer(
    base::span<const uint8_t> /* buf */) {}

StreamParser::ParseStatus WebCodecsEncodedChunkStreamParser::Parse(
    int /* max_pending_bytes_to_inspect */) {}

bool WebCodecsEncodedChunkStreamParser::ProcessChunks(
    std::unique_ptr<BufferQueue> buffer_queue) {}

void WebCodecsEncodedChunkStreamParser::ChangeState(State new_state) {}

}  // namespace media