roll skia to 4057
[chromium-blink-merge.git] / media / filters / chunk_demuxer_client.h
blob3fbe6e351d00e5705cd26e0a44595400e95cf57f
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_
8 #include "base/memory/scoped_ptr.h"
10 namespace media {
12 class ChunkDemuxer;
14 // Interface used to notify an external object when a ChunkDemuxer
15 // is opened & closed.
16 class ChunkDemuxerClient {
17 public:
18 // Called when a ChunkDemuxer object is opened.
19 virtual void DemuxerOpened(ChunkDemuxer* demuxer) = 0;
21 // The ChunkDemuxer passed via last DemuxerOpened() call is now
22 // closed. Any further calls on the demuxer will result in an error.
23 virtual void DemuxerClosed() = 0;
25 // A decryption key associated with |init_data| may be needed to decrypt the
26 // media being demuxed before decoding. Note that the demuxing itself does not
27 // need decryption.
28 virtual void KeyNeeded(scoped_array<uint8> init_data, int init_data_size) = 0;
31 } // namespace media
33 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_