2014-02-14 23:21:05 +00:00
|
|
|
// Copyright 2014 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
2013-10-11 21:44:55 +00:00
|
|
|
|
|
|
|
#ifndef MEDIA_BASE_DECRYPTOR_SOURCE_H_
|
|
|
|
#define MEDIA_BASE_DECRYPTOR_SOURCE_H_
|
|
|
|
|
|
|
|
#include "base/memory/scoped_ptr.h"
|
|
|
|
#include "media/base/container_names.h"
|
|
|
|
#include "media/base/status.h"
|
|
|
|
|
2014-09-19 20:41:13 +00:00
|
|
|
namespace edash_packager {
|
2013-10-11 21:44:55 +00:00
|
|
|
namespace media {
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// DecryptorSource is responsible for decryption key acquisition.
|
2013-10-11 21:44:55 +00:00
|
|
|
class DecryptorSource {
|
|
|
|
public:
|
|
|
|
DecryptorSource() {}
|
|
|
|
virtual ~DecryptorSource() {}
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
/// NeedKey event handler.
|
|
|
|
/// @param container indicates the container format.
|
|
|
|
/// @param init_data specifies container dependent initialization data that
|
|
|
|
/// is used to initialize the decryption key.
|
|
|
|
/// @return OK on success, an adequate status on error.
|
2013-10-11 21:44:55 +00:00
|
|
|
virtual Status OnNeedKey(MediaContainerName container,
|
|
|
|
const std::string& init_data) = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(DecryptorSource);
|
|
|
|
};
|
|
|
|
|
2014-01-24 18:46:46 +00:00
|
|
|
} // namespace media
|
2014-09-19 20:41:13 +00:00
|
|
|
} // namespace edash_packager
|
2013-10-11 21:44:55 +00:00
|
|
|
|
|
|
|
#endif // MEDIA_BASE_DECRYPTOR_SOURCE_H_
|