#include "chrome/services/media_gallery_util/media_parser.h"
#include "base/functional/bind.h"
#include "chrome/services/media_gallery_util/ipc_data_source.h"
#include "chrome/services/media_gallery_util/media_metadata_parser.h"
#include "media/media_buildflags.h"
#include "third_party/libyuv/include/libyuv.h"
#if BUILDFLAG(ENABLE_FFMPEG)
#include "media/filters/media_file_checker.h"
extern "C" {
#include <libavutil/cpu.h>
}
#endif
namespace {
void ParseMediaMetadataDone(
MediaParser::ParseMediaMetadataCallback callback,
MediaMetadataParser* ,
chrome::mojom::MediaMetadataPtr metadata,
const std::vector<metadata::AttachedImage>& attached_images) { … }
}
MediaParser::MediaParser() = default;
MediaParser::~MediaParser() = default;
void MediaParser::ParseMediaMetadata(
const std::string& mime_type,
int64_t total_size,
bool get_attached_images,
mojo::PendingRemote<chrome::mojom::MediaDataSource> media_data_source,
ParseMediaMetadataCallback callback) { … }
void MediaParser::CheckMediaFile(base::TimeDelta decode_time,
base::File file,
CheckMediaFileCallback callback) { … }
void MediaParser::GetCpuInfo(GetCpuInfoCallback callback) { … }