#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 {
constexpr media::StreamParser::TrackId kWebCodecsAudioTrackId = …;
constexpr media::StreamParser::TrackId kWebCodecsVideoTrackId = …;
}
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 ,
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> ) { … }
StreamParser::ParseStatus WebCodecsEncodedChunkStreamParser::Parse(
int ) { … }
bool WebCodecsEncodedChunkStreamParser::ProcessChunks(
std::unique_ptr<BufferQueue> buffer_queue) { … }
void WebCodecsEncodedChunkStreamParser::ChangeState(State new_state) { … }
}