#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/cast/test/receiver/video_decoder.h"
#include <stdint.h>
#include <string_view>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/values.h"
#include "media/base/video_codecs.h"
#include "media/base/video_frame_pool.h"
#include "media/base/video_util.h"
#include "media/cast/cast_environment.h"
#include "media/cast/common/encoded_frame.h"
#include "media/cast/common/openscreen_conversion_helpers.h"
#include "third_party/libvpx/source/libvpx/vpx/vp8dx.h"
#include "third_party/libvpx/source/libvpx/vpx/vpx_decoder.h"
#include "third_party/libyuv/include/libyuv/convert.h"
#include "ui/gfx/geometry/size.h"
namespace media {
namespace cast {
class VideoDecoder::ImplBase
: public base::RefCountedThreadSafe<VideoDecoder::ImplBase> { … };
class VideoDecoder::Vp8Impl final : public VideoDecoder::ImplBase { … };
class VideoDecoder::FakeImpl final : public VideoDecoder::ImplBase { … };
VideoDecoder::VideoDecoder(
const scoped_refptr<CastEnvironment>& cast_environment,
VideoCodec codec)
: … { … }
VideoDecoder::~VideoDecoder() = default;
OperationalStatus VideoDecoder::InitializationResult() const { … }
void VideoDecoder::DecodeFrame(std::unique_ptr<EncodedFrame> encoded_frame,
const DecodeFrameCallback& callback) { … }
}
}