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

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

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Check track ids via track_id_to_demux_stream_map_ Created 4 years, 5 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 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_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 23 matching lines...) Expand all
34 ~MojoDemuxerStreamAdapter() override; 34 ~MojoDemuxerStreamAdapter() override;
35 35
36 // DemuxerStream implementation. 36 // DemuxerStream implementation.
37 void Read(const ReadCB& read_cb) override; 37 void Read(const ReadCB& read_cb) override;
38 AudioDecoderConfig audio_decoder_config() override; 38 AudioDecoderConfig audio_decoder_config() override;
39 VideoDecoderConfig video_decoder_config() override; 39 VideoDecoderConfig video_decoder_config() override;
40 Type type() const override; 40 Type type() const override;
41 void EnableBitstreamConverter() override; 41 void EnableBitstreamConverter() override;
42 bool SupportsConfigChanges() override; 42 bool SupportsConfigChanges() override;
43 VideoRotation video_rotation() override; 43 VideoRotation video_rotation() override;
44 bool enabled() const override;
45 void set_enabled(bool enabled, base::TimeDelta timestamp) override;
46 void SetStreamRestartedCB(const StreamRestartedCB& cb) override;
44 47
45 private: 48 private:
46 void OnStreamReady(mojom::DemuxerStream::Type type, 49 void OnStreamReady(mojom::DemuxerStream::Type type,
47 mojo::ScopedDataPipeConsumerHandle pipe, 50 mojo::ScopedDataPipeConsumerHandle pipe,
48 mojom::AudioDecoderConfigPtr audio_config, 51 mojom::AudioDecoderConfigPtr audio_config,
49 mojom::VideoDecoderConfigPtr video_config); 52 mojom::VideoDecoderConfigPtr video_config);
50 53
51 // The callback from |demuxer_stream_| that a read operation has completed. 54 // The callback from |demuxer_stream_| that a read operation has completed.
52 // |read_cb| is a callback from the client who invoked Read() on |this|. 55 // |read_cb| is a callback from the client who invoked Read() on |this|.
53 void OnBufferReady(mojom::DemuxerStream::Status status, 56 void OnBufferReady(mojom::DemuxerStream::Status status,
(...skipping 24 matching lines...) Expand all
78 // DataPipe for deserializing the data section of DecoderBuffers from. 81 // DataPipe for deserializing the data section of DecoderBuffers from.
79 mojo::ScopedDataPipeConsumerHandle stream_pipe_; 82 mojo::ScopedDataPipeConsumerHandle stream_pipe_;
80 83
81 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_; 84 base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_;
82 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter); 85 DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter);
83 }; 86 };
84 87
85 } // namespace media 88 } // namespace media
86 89
87 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_ 90 #endif // MEDIA_MOJO_SERVICES_MOJO_DEMUXER_STREAM_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698