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

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

Issue 2416183002: media: Use native DemuxerStream enum types 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/filters/source_buffer_state.cc ('k') | media/mojo/clients/mojo_demuxer_stream_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DEMUXER_STREAM_IMPL_H_ 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_DEMUXER_STREAM_IMPL_H_
6 #define MEDIA_MOJO_CLIENTS_MOJO_DEMUXER_STREAM_IMPL_H_ 6 #define MEDIA_MOJO_CLIENTS_MOJO_DEMUXER_STREAM_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 25 matching lines...) Expand all
36 void Read(const ReadCallback& callback) override; 36 void Read(const ReadCallback& callback) override;
37 void EnableBitstreamConverter() override; 37 void EnableBitstreamConverter() override;
38 38
39 // Sets an error handler that will be called if a connection error occurs on 39 // Sets an error handler that will be called if a connection error occurs on
40 // the bound message pipe. 40 // the bound message pipe.
41 void set_connection_error_handler(const base::Closure& error_handler) { 41 void set_connection_error_handler(const base::Closure& error_handler) {
42 binding_.set_connection_error_handler(error_handler); 42 binding_.set_connection_error_handler(error_handler);
43 } 43 }
44 44
45 private: 45 private:
46 using Type = media::DemuxerStream::Type;
47 using Status = media::DemuxerStream::Status;
48
46 void OnBufferReady(const ReadCallback& callback, 49 void OnBufferReady(const ReadCallback& callback,
47 media::DemuxerStream::Status status, 50 Status status,
48 const scoped_refptr<media::DecoderBuffer>& buffer); 51 const scoped_refptr<media::DecoderBuffer>& buffer);
49 52
50 mojo::Binding<mojom::DemuxerStream> binding_; 53 mojo::Binding<mojom::DemuxerStream> binding_;
51 54
52 // See constructor. We do not own |stream_|. 55 // See constructor. We do not own |stream_|.
53 media::DemuxerStream* stream_; 56 media::DemuxerStream* stream_;
54 57
55 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_; 58 std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_;
56 59
57 base::WeakPtrFactory<MojoDemuxerStreamImpl> weak_factory_; 60 base::WeakPtrFactory<MojoDemuxerStreamImpl> weak_factory_;
58 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamImpl); 61 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamImpl);
59 }; 62 };
60 63
61 } // namespace media 64 } // namespace media
62 65
63 #endif // MEDIA_MOJO_CLIENTS_MOJO_DEMUXER_STREAM_IMPL_H_ 66 #endif // MEDIA_MOJO_CLIENTS_MOJO_DEMUXER_STREAM_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/source_buffer_state.cc ('k') | media/mojo/clients/mojo_demuxer_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698