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

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

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and strip down. Created 4 years, 7 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_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_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/audio_decoder.h" 10 #include "media/base/audio_decoder.h"
11 #include "media/mojo/interfaces/audio_decoder.mojom.h" 11 #include "media/mojo/interfaces/audio_decoder.mojom.h"
12 #include "media/mojo/interfaces/media_types.mojom.h"
12 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
13 #include "mojo/public/cpp/system/data_pipe.h" 14 #include "mojo/public/cpp/system/data_pipe.h"
14 15
15 namespace base { 16 namespace base {
16 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
17 } 18 }
18 19
19 namespace media { 20 namespace media {
20 21
21 // An AudioDecoder that proxies to an interfaces::AudioDecoder. 22 // An AudioDecoder that proxies to an interfaces::AudioDecoder.
(...skipping 19 matching lines...) Expand all
41 void OnBufferDecoded(interfaces::AudioBufferPtr buffer) final; 42 void OnBufferDecoded(interfaces::AudioBufferPtr buffer) final;
42 43
43 private: 44 private:
44 // Callback for connection error on |remote_decoder_|. 45 // Callback for connection error on |remote_decoder_|.
45 void OnConnectionError(); 46 void OnConnectionError();
46 47
47 // Called when |remote_decoder_| finished initialization. 48 // Called when |remote_decoder_| finished initialization.
48 void OnInitialized(bool success, bool needs_bitstream_conversion); 49 void OnInitialized(bool success, bool needs_bitstream_conversion);
49 50
50 // Called when |remote_decoder_| accepted or rejected DecoderBuffer. 51 // Called when |remote_decoder_| accepted or rejected DecoderBuffer.
51 void OnDecodeStatus(interfaces::AudioDecoder::DecodeStatus decode_status); 52 void OnDecodeStatus(interfaces::DecodeStatus decode_status);
52 53
53 // called when |remote_decoder_| finished Reset() sequence. 54 // called when |remote_decoder_| finished Reset() sequence.
54 void OnResetDone(); 55 void OnResetDone();
55 56
56 // A helper method that creates data pipe and sets the data connection to 57 // A helper method that creates data pipe and sets the data connection to
57 // the service. 58 // the service.
58 void CreateDataPipe(); 59 void CreateDataPipe();
59 60
60 // A helper method to serialize the data section of DecoderBuffer into pipe. 61 // A helper method to serialize the data section of DecoderBuffer into pipe.
61 interfaces::DecoderBufferPtr TransferDecoderBuffer( 62 interfaces::DecoderBufferPtr TransferDecoderBuffer(
(...skipping 29 matching lines...) Expand all
91 // Flag telling whether this decoder requires bitstream conversion. 92 // Flag telling whether this decoder requires bitstream conversion.
92 // Passed from |remote_decoder_| as a result of its initialization. 93 // Passed from |remote_decoder_| as a result of its initialization.
93 bool needs_bitstream_conversion_; 94 bool needs_bitstream_conversion_;
94 95
95 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder); 96 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder);
96 }; 97 };
97 98
98 } // namespace media 99 } // namespace media
99 100
100 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ 101 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698