chromium/media/filters/audio_file_reader.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/filters/audio_file_reader.h"

#include <stddef.h>

#include <cmath>
#include <memory>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/numerics/safe_math.h"
#include "base/time/time.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_sample_types.h"
#include "media/base/media_switches.h"
#include "media/ffmpeg/ffmpeg_common.h"
#include "media/ffmpeg/ffmpeg_decoding_loop.h"
#include "media/ffmpeg/scoped_av_packet.h"
#include "media/formats/mpeg/mpeg1_audio_stream_parser.h"

namespace media {

// AAC(M4A) decoding specific constants.
static const int kAACPrimingFrameCount =;
static const int kAACRemainderFrameCount =;

AudioFileReader::AudioFileReader(FFmpegURLProtocol* protocol)
    :{}

AudioFileReader::~AudioFileReader() {}

bool AudioFileReader::Open() {}

bool AudioFileReader::OpenDemuxer() {}

bool AudioFileReader::OpenDecoder() {}

bool AudioFileReader::HasKnownDuration() const {}

void AudioFileReader::Close() {}

int AudioFileReader::Read(
    std::vector<std::unique_ptr<AudioBus>>* decoded_audio_packets,
    int packets_to_read) {}

base::TimeDelta AudioFileReader::GetDuration() const {}

int AudioFileReader::GetNumberOfFrames() const {}

bool AudioFileReader::OpenDemuxerForTesting() {}

bool AudioFileReader::ReadPacketForTesting(AVPacket* output_packet) {}

bool AudioFileReader::ReadPacket(AVPacket* output_packet) {}

bool AudioFileReader::OnNewFrame(
    int* total_frames,
    std::vector<std::unique_ptr<AudioBus>>* decoded_audio_packets,
    AVFrame* frame) {}

bool AudioFileReader::IsMp3File() {}

bool AudioFileReader::SeekForTesting(base::TimeDelta seek_time) {}

const AVStream* AudioFileReader::GetAVStreamForTesting() const {}

}  // namespace media