DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
packager_util.h
1 // Copyright 2014 Google Inc. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 //
7 // Packager utility functions.
8 
9 #ifndef PACKAGER_APP_PACKAGER_UTIL_H_
10 #define PACKAGER_APP_PACKAGER_UTIL_H_
11 
12 #include <memory>
13 
14 #include "packager/base/optional.h"
15 #include "packager/media/base/fourccs.h"
16 #include "packager/packager.h"
17 
18 namespace shaka {
19 
20 // TODO(kqyang): Should we consolidate XxxParams and XxxOptions?
21 struct ChunkingParams;
22 struct DecryptionParams;
23 struct EncryptionParams;
24 struct Mp4OutputParams;
25 struct MpdOptions;
26 struct MpdParams;
27 
28 namespace media {
29 
30 class MediaHandler;
31 class KeySource;
32 class Status;
33 struct ChunkingOptions;
34 struct EncryptionOptions;
35 struct MuxerOptions;
36 
43 std::unique_ptr<KeySource> CreateEncryptionKeySource(
44  FourCC protection_scheme,
45  const EncryptionParams& encryption_params);
46 
51 std::unique_ptr<KeySource> CreateDecryptionKeySource(
52  const DecryptionParams& decryption_params);
53 
55 ChunkingOptions GetChunkingOptions(const ChunkingParams& chunking_params);
56 
58 EncryptionOptions GetEncryptionOptions(
59  const EncryptionParams& encryption_params);
60 
62 MuxerOptions GetMuxerOptions(const std::string& temp_dir,
63  const Mp4OutputParams& mp4_params);
64 
66 MpdOptions GetMpdOptions(bool on_demand_profile, const MpdParams& mpd_params);
67 
72 Status ConnectHandlers(std::vector<std::shared_ptr<MediaHandler>>& handlers);
73 
74 } // namespace media
75 } // namespace shaka
76 
77 #endif // PACKAGER_APP_PACKAGER_UTIL_H_