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;
|
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
|
|
|
|
|
|
|
/// Fill MuxerOptions members using provided command line options.
|
|
|
|
bool GetMuxerOptions(MuxerOptions* muxer_options);
|
|
|
|
|
2014-06-26 01:33:09 +00:00
|
|
|
/// Fill MpdOptions members using provided command line options.
|
2017-01-07 02:40:37 +00:00
|
|
|
bool GetMpdOptions(bool on_demand_profile, MpdOptions* mpd_options);
|
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_
|