Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_FILTERS_CHUNK_DEMUXER_CLIENT_H_ | 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_ |
| 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_ | 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| 11 | 11 |
| 12 class ChunkDemuxer; | 12 class ChunkDemuxer; |
| 13 | 13 |
| 14 // Interface used to notify an external object when a ChunkDemuxer | 14 // Interface used to notify an external object when a ChunkDemuxer |
| 15 // is opened & closed. | 15 // is opened & closed. |
| 16 class ChunkDemuxerClient { | 16 class ChunkDemuxerClient { |
| 17 public: | 17 public: |
| 18 // Called when a ChunkDemuxer object is opened. | 18 // Called when a ChunkDemuxer object is opened. |
| 19 virtual void DemuxerOpened(ChunkDemuxer* demuxer) = 0; | 19 virtual void DemuxerOpened(ChunkDemuxer* demuxer) = 0; |
| 20 | 20 |
| 21 // The ChunkDemuxer passed via last DemuxerOpened() call is now | 21 // The ChunkDemuxer passed via last DemuxerOpened() call is now |
| 22 // closed. Any further calls on the demuxer will result in an error. | 22 // closed. Any further calls on the demuxer will result in an error. |
| 23 virtual void DemuxerClosed() = 0; | 23 virtual void DemuxerClosed() = 0; |
| 24 | 24 |
| 25 // A decryption key associated with |init_data| may be needed to decrypt the | 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 | 26 // media being demuxed before decoding. Note that the demuxing itself does not |
| 27 // need decryption. | 27 // need decryption. |
| 28 virtual void KeyNeeded(scoped_array<uint8> init_data, int init_data_size) = 0; | 28 virtual void DemuxerNeedKey(scoped_array<uint8> init_data, |
| 29 int init_data_size) = 0; | |
| 30 | |
| 31 protected: | |
| 32 ~ChunkDemuxerClient() {} | |
|
scherkus (not reviewing)
2012/06/13 23:35:08
virtual
xhwang
2012/06/15 01:41:04
Done. Also done for DecryptorClient::~DecryptorCli
ddorwin
2012/06/15 04:29:25
Why does this need to be virtual? Delete is never
scherkus (not reviewing)
2012/06/15 04:36:36
Refer to both Google C++ style guide (all methods
xhwang
2012/06/15 16:39:18
Yeah, I discussed this with scherkus and forwarded
| |
| 29 }; | 33 }; |
| 30 | 34 |
| 31 } // namespace media | 35 } // namespace media |
| 32 | 36 |
| 33 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_ | 37 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_CLIENT_H_ |
| OLD | NEW |