Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Side by Side Diff: media/mojo/clients/mojo_video_decoder.h

Issue 2408063009: media: Use native DecodeStatus in media mojo interfaces (Closed)
Patch Set: comments addressed Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/mojo/clients/mojo_audio_decoder.cc ('k') | media/mojo/clients/mojo_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_
6 #define MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ 6 #define MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/video_decoder.h" 10 #include "media/base/video_decoder.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void Reset(const base::Closure& closure) final; 44 void Reset(const base::Closure& closure) final;
45 bool NeedsBitstreamConversion() const final; 45 bool NeedsBitstreamConversion() const final;
46 bool CanReadWithoutStalling() const final; 46 bool CanReadWithoutStalling() const final;
47 int GetMaxDecodeRequests() const final; 47 int GetMaxDecodeRequests() const final;
48 48
49 // mojom::VideoDecoderClient implementation. 49 // mojom::VideoDecoderClient implementation.
50 void OnVideoFrameDecoded(mojom::VideoFramePtr frame) final; 50 void OnVideoFrameDecoded(mojom::VideoFramePtr frame) final;
51 51
52 private: 52 private:
53 void OnInitializeDone(bool status); 53 void OnInitializeDone(bool status);
54 void OnDecodeDone(mojom::DecodeStatus status); 54 void OnDecodeDone(DecodeStatus status);
55 void OnResetDone(); 55 void OnResetDone();
56 56
57 void BindRemoteDecoder(); 57 void BindRemoteDecoder();
58 void OnConnectionError(); 58 void OnConnectionError();
59 59
60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
61 GpuVideoAcceleratorFactories* gpu_factories_; 61 GpuVideoAcceleratorFactories* gpu_factories_;
62 62
63 // Used to pass the remote decoder from the constructor (on the main thread) 63 // Used to pass the remote decoder from the constructor (on the main thread)
64 // to Initialize() (on the media thread). 64 // to Initialize() (on the media thread).
65 mojom::VideoDecoderPtrInfo remote_decoder_info_; 65 mojom::VideoDecoderPtrInfo remote_decoder_info_;
66 66
67 InitCB init_cb_; 67 InitCB init_cb_;
68 OutputCB output_cb_; 68 OutputCB output_cb_;
69 DecodeCB decode_cb_; 69 DecodeCB decode_cb_;
70 base::Closure reset_cb_; 70 base::Closure reset_cb_;
71 71
72 mojom::VideoDecoderPtr remote_decoder_; 72 mojom::VideoDecoderPtr remote_decoder_;
73 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_; 73 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_;
74 bool remote_decoder_bound_ = false; 74 bool remote_decoder_bound_ = false;
75 bool has_connection_error_ = false; 75 bool has_connection_error_ = false;
76 mojo::AssociatedBinding<VideoDecoderClient> client_binding_; 76 mojo::AssociatedBinding<VideoDecoderClient> client_binding_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder); 78 DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder);
79 }; 79 };
80 80
81 } // namespace media 81 } // namespace media
82 82
83 #endif // MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_ 83 #endif // MEDIA_MOJO_CLIENTS_MOJO_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/mojo/clients/mojo_audio_decoder.cc ('k') | media/mojo/clients/mojo_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698