2014-05-08 21:02:36 +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
|
|
|
|
//
|
2014-06-11 00:33:40 +00:00
|
|
|
// Packager utility functions.
|
2014-05-08 21:02:36 +00:00
|
|
|
|
2017-02-21 18:36:50 +00:00
|
|
|
#ifndef PACKAGER_APP_PACKAGER_UTIL_H_
|
|
|
|
#define PACKAGER_APP_PACKAGER_UTIL_H_
|
2014-05-08 21:02:36 +00:00
|
|
|
|
|
|
|
#include <gflags/gflags.h>
|
2017-02-21 18:36:50 +00:00
|
|
|
|
2016-08-17 17:41:40 +00:00
|
|
|
#include <memory>
|
2014-05-08 21:02:36 +00:00
|
|
|
|
|
|
|
DECLARE_bool(dump_stream_info);
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2014-09-19 20:41:13 +00:00
|
|
|
|
2014-06-26 01:33:09 +00:00
|
|
|
struct MpdOptions;
|
|
|
|
|
2014-05-08 21:02:36 +00:00
|
|
|
namespace media {
|
|
|
|
|
2014-08-20 23:51:15 +00:00
|
|
|
class KeySource;
|
2017-02-24 01:17:47 +00:00
|
|
|
struct ChunkingOptions;
|
2017-03-11 02:49:55 +00:00
|
|
|
struct EncryptionOptions;
|
2014-05-28 00:55:36 +00:00
|
|
|
struct MuxerOptions;
|
2014-05-08 21:02:36 +00:00
|
|
|
|
2014-08-20 23:51:15 +00:00
|
|
|
/// Create KeySource based on provided command line options for content
|
|
|
|
/// encryption. Also fetches keys.
|
2016-08-17 17:41:40 +00:00
|
|
|
/// @return A std::unique_ptr containing a new KeySource, or nullptr if
|
2014-05-08 21:02:36 +00:00
|
|
|
/// encryption is not required.
|
2016-08-17 17:41:40 +00:00
|
|
|
std::unique_ptr<KeySource> CreateEncryptionKeySource();
|
2014-08-20 23:51:15 +00:00
|
|
|
|
|
|
|
/// Create KeySource based on provided command line options for content
|
|
|
|
/// decryption. Does not fetch keys.
|
2016-08-17 17:41:40 +00:00
|
|
|
/// @return A std::unique_ptr containing a new KeySource, or nullptr if
|
|
|
|
/// decryption is not required.
|
|
|
|
std::unique_ptr<KeySource> CreateDecryptionKeySource();
|
2014-05-08 21:02:36 +00:00
|
|
|
|
2017-02-24 01:17:47 +00:00
|
|
|
/// @return ChunkingOptions from provided command line options.
|
|
|
|
ChunkingOptions GetChunkingOptions();
|
2014-05-08 21:02:36 +00:00
|
|
|
|
2017-03-11 02:49:55 +00:00
|
|
|
/// @return EncryptionOptions from provided command line options.
|
|
|
|
EncryptionOptions GetEncryptionOptions();
|
|
|
|
|
2017-02-24 01:17:47 +00:00
|
|
|
/// @return MuxerOptions from provided command line options.
|
|
|
|
MuxerOptions GetMuxerOptions();
|
|
|
|
|
|
|
|
/// @return MpdOptions from provided command line options.
|
|
|
|
MpdOptions GetMpdOptions(bool on_demand_profile);
|
2014-06-26 01:33:09 +00:00
|
|
|
|
2014-05-08 21:02:36 +00:00
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2014-05-08 21:02:36 +00:00
|
|
|
|
2017-02-21 18:36:50 +00:00
|
|
|
#endif // PACKAGER_APP_PACKAGER_UTIL_H_
|