Tizen WASM Player
Tizen TV WebAssembly Media Player extension allowing for a low-level elementary media stream playback.
elementary_audio_track_config.h
Go to the documentation of this file.
1 // Copyright 2020 Samsung Electronics
2 // TizenTV Emscripten extensions are available under two separate licenses, the
3 // MIT license and the University of Illinois/NCSA Open Source License. Both
4 // these licenses can be found in the LICENSE file.
5 
6 #ifndef INCLUDE_SAMSUNG_WASM_ELEMENTARY_AUDIO_TRACK_CONFIG_H_
7 #define INCLUDE_SAMSUNG_WASM_ELEMENTARY_AUDIO_TRACK_CONFIG_H_
8 
9 #include <cstdint>
10 #include <string>
11 #include <vector>
12 
14 
15 namespace samsung {
16 namespace wasm {
17 
19 enum class SampleFormat {
20  kUnknown,
21  kU8,
22  kS16,
23  kS32,
24  kF32,
25  kPlanarS16,
26  kPlanarF32,
27  kPlanarS32,
28  kS24,
29  kAc3,
30  kEac3,
31 };
32 
34 enum class ChannelLayout {
35  kNone,
36  kUnsupported,
37  kMono,
38  kStereo,
39  k2Point1,
40  k2_1,
41  k2_2,
42  k3_1,
43  k4_0,
44  k4_1,
45  k4_1QuadSide,
46  k5_0,
47  k5_0Back,
48  k5_1,
49  k5_1Back,
50  k6_0,
51  k6_0Front,
52  k6_1,
53  k6_1Back,
54  k6_1Front,
55  k7_0,
56  k7_0Front,
57  k7_1,
58  k7_1Wide,
59  k7_1WideBack,
60  kDiscrete,
61  kHexagonal,
62  kOctagonal,
63  kQuad,
65  kSurround,
66 };
67 
71 
72  ElementaryAudioTrackConfig(std::string mime_type,
73  std::vector<uint8_t> extradata,
74  SampleFormat sample_format,
75  ChannelLayout channel_layout,
76  uint32_t samples_per_second)
77  : ElementaryAudioTrackConfig(std::move(mime_type),
78  std::move(extradata),
80  sample_format,
81  channel_layout,
82  samples_per_second) {}
83 
84  ElementaryAudioTrackConfig(std::string mime_type,
85  std::vector<uint8_t> extradata,
86  DecodingMode decoding_mode,
87  SampleFormat sample_format,
88  ChannelLayout channel_layout,
89  uint32_t samples_per_second)
90  : ElementaryMediaTrackConfig(std::move(mime_type),
91  std::move(extradata),
92  decoding_mode),
93  sample_format(sample_format),
94  channel_layout(channel_layout),
95  samples_per_second(samples_per_second) {}
96 
100 };
101 
102 } // namespace wasm
103 } // namespace samsung
104 
105 #endif // INCLUDE_SAMSUNG_WASM_ELEMENTARY_AUDIO_TRACK_CONFIG_H_
Compressed E-AC3 bitstream.
Front L + R + C, LFE, Side L + R, Back L + R.
Front L + R + C, Side L + R, Front LofC, Front RofC.
ElementaryAudioTrackConfig(std::string mime_type, std::vector< uint8_t > extradata, SampleFormat sample_format, ChannelLayout channel_layout, uint32_t samples_per_second)
Stereo L + R, Side L + R, Front LofC + RofC.
Stereo L + R, Front C, LFE, Side L + R, Rear, Center.
Front L, Front R, Front C, LFE, Back L + R.
Stereo L + R, Front C, LFE.
Stereo L + R, Front C, Side L + R, Back C.
Front L + R + C, Back L + R.
Unsigned 8-bit w/ bias of 128.
Front L + R + C, LFE, Back L + R, Front LofC + RofC.
Channels are not explicitly mapped to speakers.
Stereo L + R, Side L, Side R, Front LofC + RofC, LFE.
Front L + R + C, LFE, Side L + R, Front LofC + RofC.
Front L + R + C, LFE, Side L + R.
Stereo L + R, Front C, LFE, Back L + R, Rear Center.
Compressed AC3 bitstream.
Channel Layout is unsupported.
Contains audio ElementaryMediaTrack config.
Front L + R + C, Side L + R, Back L + R.
Front L + R + C, Back C.
Front L + R + C, Side L + R.
Front L + R, Back L + R.
Stereo L + R, Front C, Back L + R + C.
Stereo L + R, Front C, Rear C, LFE.
Common part of audio and video configs.
ChannelLayout
Lists audio channel layouts recognized by WASM Player.
ElementaryAudioTrackConfig(std::string mime_type, std::vector< uint8_t > extradata, DecodingMode decoding_mode, SampleFormat sample_format, ChannelLayout channel_layout, uint32_t samples_per_second)
SampleFormat
Lists audio sampling formats recognized by WASM Player.
Channel Layout is unspecified.
Front L + R + C, Side L + R, Back L + R + C.
Front L + R, Side L + R.
Front L + R, Side L + R, LFE.