Commit a0222dfd authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

media/gpu/chromeos: cleanup video_decoder_pipeline.*

This CL fixes three things in the mentioned files:
- Removes the unnecessary namespace resolution of ::media::Status.
- Comments out unused parameter names in Initialize().
- Remove unimplemented static method GetCreateVDFunctions().

No new code/functionality intended, only style refactoring.

TBR=hiroh@chromium.org since changes are just cosmetic.

Bug: 1040291
Change-Id: I711683337aca0e018f19131dfad15887d36d0f36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259486Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781334}
parent 9dc62f3d
...@@ -25,7 +25,7 @@ namespace media { ...@@ -25,7 +25,7 @@ namespace media {
namespace { namespace {
// Get a list of the available functions for creating VideoDeocoder. // Get a list of the available functions for creating VideoDecoder.
base::queue<VideoDecoderPipeline::CreateVDFunc> GetCreateVDFunctions( base::queue<VideoDecoderPipeline::CreateVDFunc> GetCreateVDFunctions(
VideoDecoderPipeline::CreateVDFunc cur_create_vd_func) { VideoDecoderPipeline::CreateVDFunc cur_create_vd_func) {
static constexpr VideoDecoderPipeline::CreateVDFunc kCreateVDFuncs[] = { static constexpr VideoDecoderPipeline::CreateVDFunc kCreateVDFuncs[] = {
......
...@@ -178,11 +178,11 @@ bool VideoDecoderPipeline::CanReadWithoutStalling() const { ...@@ -178,11 +178,11 @@ bool VideoDecoderPipeline::CanReadWithoutStalling() const {
} }
void VideoDecoderPipeline::Initialize(const VideoDecoderConfig& config, void VideoDecoderPipeline::Initialize(const VideoDecoderConfig& config,
bool low_delay, bool /* low_delay */,
CdmContext* cdm_context, CdmContext* cdm_context,
InitCB init_cb, InitCB init_cb,
const OutputCB& output_cb, const OutputCB& output_cb,
const WaitingCB& waiting_cb) { const WaitingCB& /* waiting_cb */) {
DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(client_sequence_checker_);
VLOGF(2) << "config: " << config.AsHumanReadableString(); VLOGF(2) << "config: " << config.AsHumanReadableString();
...@@ -241,7 +241,7 @@ void VideoDecoderPipeline::InitializeTask(const VideoDecoderConfig& config, ...@@ -241,7 +241,7 @@ void VideoDecoderPipeline::InitializeTask(const VideoDecoderConfig& config,
void VideoDecoderPipeline::CreateAndInitializeVD( void VideoDecoderPipeline::CreateAndInitializeVD(
base::queue<VideoDecoderPipeline::CreateVDFunc> create_vd_funcs, base::queue<VideoDecoderPipeline::CreateVDFunc> create_vd_funcs,
VideoDecoderConfig config, VideoDecoderConfig config,
::media::Status parent_error) { Status parent_error) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_sequence_checker_);
DCHECK(init_cb_); DCHECK(init_cb_);
DCHECK(!decoder_); DCHECK(!decoder_);
...@@ -278,8 +278,8 @@ void VideoDecoderPipeline::CreateAndInitializeVD( ...@@ -278,8 +278,8 @@ void VideoDecoderPipeline::CreateAndInitializeVD(
void VideoDecoderPipeline::OnInitializeDone( void VideoDecoderPipeline::OnInitializeDone(
base::queue<VideoDecoderPipeline::CreateVDFunc> create_vd_funcs, base::queue<VideoDecoderPipeline::CreateVDFunc> create_vd_funcs,
VideoDecoderConfig config, VideoDecoderConfig config,
::media::Status parent_error, Status parent_error,
::media::Status status) { Status status) {
DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(decoder_sequence_checker_);
DCHECK(init_cb_); DCHECK(init_cb_);
DVLOGF(4) << "Initialization status = " << status.code(); DVLOGF(4) << "Initialization status = " << status.code();
......
...@@ -38,7 +38,7 @@ class DmabufVideoFramePool; ...@@ -38,7 +38,7 @@ class DmabufVideoFramePool;
// Note: All methods and callbacks should be called on the same sequence. // Note: All methods and callbacks should be called on the same sequence.
class MEDIA_GPU_EXPORT DecoderInterface { class MEDIA_GPU_EXPORT DecoderInterface {
public: public:
using InitCB = base::OnceCallback<void(::media::Status status)>; using InitCB = base::OnceCallback<void(Status status)>;
// TODO(crbug.com/998413): Replace VideoFrame to GpuMemoryBuffer-based // TODO(crbug.com/998413): Replace VideoFrame to GpuMemoryBuffer-based
// instance. // instance.
using OutputCB = base::RepeatingCallback<void(scoped_refptr<VideoFrame>)>; using OutputCB = base::RepeatingCallback<void(scoped_refptr<VideoFrame>)>;
...@@ -147,7 +147,6 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder, ...@@ -147,7 +147,6 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder,
int GetMaxDecodeRequests() const override; int GetMaxDecodeRequests() const override;
bool NeedsBitstreamConversion() const override; bool NeedsBitstreamConversion() const override;
bool CanReadWithoutStalling() const override; bool CanReadWithoutStalling() const override;
void Initialize(const VideoDecoderConfig& config, void Initialize(const VideoDecoderConfig& config,
bool low_delay, bool low_delay,
CdmContext* cdm_context, CdmContext* cdm_context,
...@@ -168,11 +167,6 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder, ...@@ -168,11 +167,6 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder,
const gfx::Rect& visible_rect) override; const gfx::Rect& visible_rect) override;
private: private:
// Get a list of the available functions for creating VideoDeocoder except
// |current_func| one.
static base::queue<CreateVDFunc> GetCreateVDFunctions(
CreateVDFunc current_func);
VideoDecoderPipeline( VideoDecoderPipeline(
scoped_refptr<base::SequencedTaskRunner> client_task_runner, scoped_refptr<base::SequencedTaskRunner> client_task_runner,
std::unique_ptr<DmabufVideoFramePool> frame_pool, std::unique_ptr<DmabufVideoFramePool> frame_pool,
...@@ -189,11 +183,11 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder, ...@@ -189,11 +183,11 @@ class MEDIA_GPU_EXPORT VideoDecoderPipeline : public VideoDecoder,
void CreateAndInitializeVD(base::queue<CreateVDFunc> create_vd_funcs, void CreateAndInitializeVD(base::queue<CreateVDFunc> create_vd_funcs,
VideoDecoderConfig config, VideoDecoderConfig config,
::media::Status parent_error); Status parent_error);
void OnInitializeDone(base::queue<CreateVDFunc> create_vd_funcs, void OnInitializeDone(base::queue<CreateVDFunc> create_vd_funcs,
VideoDecoderConfig config, VideoDecoderConfig config,
::media::Status parent_error, Status parent_error,
::media::Status success); Status success);
void OnDecodeDone(bool eos_buffer, DecodeCB decode_cb, DecodeStatus status); void OnDecodeDone(bool eos_buffer, DecodeCB decode_cb, DecodeStatus status);
void OnResetDone(); void OnResetDone();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment