#include "media/video/offloading_video_encoder.h"
#include "base/task/bind_post_task.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/trace_event/trace_event.h"
#include "media/base/video_frame.h"
#include "media/video/video_encoder_info.h"
namespace media {
OffloadingVideoEncoder::OffloadingVideoEncoder(
std::unique_ptr<VideoEncoder> wrapped_encoder,
const scoped_refptr<base::SequencedTaskRunner> work_runner,
const scoped_refptr<base::SequencedTaskRunner> callback_runner)
: … { … }
OffloadingVideoEncoder::OffloadingVideoEncoder(
std::unique_ptr<VideoEncoder> wrapped_encoder)
: … { … }
void OffloadingVideoEncoder::Initialize(VideoCodecProfile profile,
const Options& options,
EncoderInfoCB info_cb,
OutputCB output_cb,
EncoderStatusCB done_cb) { … }
void OffloadingVideoEncoder::Encode(scoped_refptr<VideoFrame> frame,
const EncodeOptions& encode_options,
EncoderStatusCB done_cb) { … }
void OffloadingVideoEncoder::ChangeOptions(const Options& options,
OutputCB output_cb,
EncoderStatusCB done_cb) { … }
void OffloadingVideoEncoder::Flush(EncoderStatusCB done_cb) { … }
OffloadingVideoEncoder::~OffloadingVideoEncoder() { … }
template <class T>
T OffloadingVideoEncoder::WrapCallback(T cb) { … }
}