1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "mozilla/ResultExtensions.h"
17 class Sinf
: public Atom
{
22 mDefaultCryptByteBlock(0),
23 mDefaultSkipByteBlock(0) {}
24 explicit Sinf(Box
& aBox
);
26 bool IsValid() override
{
27 return !!mDefaultEncryptionType
&& // Should have an encryption scheme
28 (mDefaultIVSize
> 0 || // and either a default IV size
29 mDefaultConstantIV
.Length() > 0); // or a constant IV.
32 uint8_t mDefaultIVSize
;
33 AtomType mDefaultEncryptionType
;
34 uint8_t mDefaultKeyID
[16];
35 uint8_t mDefaultCryptByteBlock
;
36 uint8_t mDefaultSkipByteBlock
;
37 CopyableTArray
<uint8_t> mDefaultConstantIV
;
42 explicit SinfParser(Box
& aBox
);
44 Sinf
& GetSinf() { return mSinf
; }
47 Result
<Ok
, nsresult
> ParseSchm(Box
& aBox
);
48 Result
<Ok
, nsresult
> ParseSchi(Box
& aBox
);
49 Result
<Ok
, nsresult
> ParseTenc(Box
& aBox
);
54 } // namespace mozilla
56 #endif // SINF_PARSER_H_