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 struct ChunkingOptions;
33 struct EncryptionOptions;
34 struct MuxerOptions;
35 
42 std::unique_ptr<KeySource> CreateEncryptionKeySource(
43  FourCC protection_scheme,
44  const EncryptionParams& encryption_params);
45 
50 std::unique_ptr<KeySource> CreateDecryptionKeySource(
51  const DecryptionParams& decryption_params);
52 
54 ChunkingOptions GetChunkingOptions(const ChunkingParams& chunking_params);
55 
57 EncryptionOptions GetEncryptionOptions(
58  const EncryptionParams& encryption_params);
59 
61 MuxerOptions GetMuxerOptions(const std::string& temp_dir,
62  const Mp4OutputParams& mp4_params);
63 
65 MpdOptions GetMpdOptions(bool on_demand_profile, const MpdParams& mpd_params);
66 
71 Status ConnectHandlers(std::vector<std::shared_ptr<MediaHandler>>& handlers);
72 
73 } // namespace media
74 } // namespace shaka
75 
76 #endif // PACKAGER_APP_PACKAGER_UTIL_H_