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

Side by Side Diff: media/mojo/services/mojo_audio_decoder_service.h

Issue 1834303005: Refactor audio and video decoder status into common file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 8 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
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_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 30 matching lines...) Expand all
41 void Reset(const ResetCallback& callback) final; 41 void Reset(const ResetCallback& callback) final;
42 42
43 private: 43 private:
44 // Called by |decoder_| upon finishing initialization. 44 // Called by |decoder_| upon finishing initialization.
45 void OnInitialized(const InitializeCallback& callback, 45 void OnInitialized(const InitializeCallback& callback,
46 scoped_refptr<MediaKeys> cdm, 46 scoped_refptr<MediaKeys> cdm,
47 bool success); 47 bool success);
48 48
49 // Called by |decoder_| when DecoderBuffer is accepted or rejected. 49 // Called by |decoder_| when DecoderBuffer is accepted or rejected.
50 void OnDecodeStatus(const DecodeCallback& callback, 50 void OnDecodeStatus(const DecodeCallback& callback,
51 media::AudioDecoder::Status status); 51 media::DecodeStatus status);
52 52
53 // Called by |decoder_| when reset sequence is finished. 53 // Called by |decoder_| when reset sequence is finished.
54 void OnResetDone(const ResetCallback& callback); 54 void OnResetDone(const ResetCallback& callback);
55 55
56 // Called by |decoder_| for each decoded buffer. 56 // Called by |decoder_| for each decoded buffer.
57 void OnAudioBufferReady(const scoped_refptr<AudioBuffer>& audio_buffer); 57 void OnAudioBufferReady(const scoped_refptr<AudioBuffer>& audio_buffer);
58 58
59 // A helper method to read and deserialize DecoderBuffer from data pipe. 59 // A helper method to read and deserialize DecoderBuffer from data pipe.
60 scoped_refptr<DecoderBuffer> ReadDecoderBuffer( 60 scoped_refptr<DecoderBuffer> ReadDecoderBuffer(
61 interfaces::DecoderBufferPtr buffer); 61 interfaces::DecoderBufferPtr buffer);
(...skipping 20 matching lines...) Expand all
82 82
83 base::WeakPtr<MojoAudioDecoderService> weak_this_; 83 base::WeakPtr<MojoAudioDecoderService> weak_this_;
84 base::WeakPtrFactory<MojoAudioDecoderService> weak_factory_; 84 base::WeakPtrFactory<MojoAudioDecoderService> weak_factory_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService); 86 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService);
87 }; 87 };
88 88
89 } // namespace media 89 } // namespace media
90 90
91 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ 91 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_audio_decoder.cc ('k') | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698