How to use the template.vector.swf.f4v.BOX function in template

To help you get started, we’ve selected a few template examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(LengthSize, 'LengthSize'),
        (UI32, 'NumberEntry'),
        (lambda s: dyn.array(RandomAccessStructure,s['NumberEntry'].li.int()), 'RandomAccessSample'),
    ]

@Boxes.define
class mfro(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'Size'),
    ]

@Boxes.define
class sinf(pstruct.type):
    class OriginalFormatBox(BOX): pass
    class SchemeTypeBox(BOX): pass
    class SchemeInformationBox(BOX): pass
    _fields_ = [
        (OriginalFormatBox, 'OriginalFormatBox'),
        (SchemeTypeBox, 'SchemeTypeBox'),
        (SchemeInformationBox, 'SchemeInformationBox'),
    ]

@Boxes.define
class frma(pstruct.type):
    _fields_ = [(UI32,'UnencryptedDataFormat')]

@Boxes.define
class schm(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(UI32, 'Reserved'),
    ]

@Boxes.define
class nmhd(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
    ]

@Boxes.define
class dinf(BOXLIST): pass

@Boxes.define
class dref(pstruct.type):
    class DataEntryBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'EntryCount'),
        (lambda s: dyn.array(s.DataEntryBox, s['EntryCount'].li.int()), 'DataEntry'),
    ]

@Boxes.define
class url(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
    ]

@Boxes.define
class stbl(BOXLIST): pass
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
@Boxes.define
class schm(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'SchemeType'),
        (UI32, 'SchemeVersion'),
        (lambda s: STRING if s['Flags'] == 1 else ptype.undefined, 'SchemeUri'),
    ]

@Boxes.define
class schi(BOXLIST): pass

@Boxes.define
class adkm(pstruct.type):
    class AdobeDRMHeaderBox(BOX): pass
    class AdobeDRMAUFormatBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (AdobeDRMHeaderBox, 'Header'),
        (AdobeDRMAUFormatBox, 'AUFormat'),
    ]

@Boxes.define
class ahdr(pstruct.type):
    class StandardEncryptionParamsBox(BOX): pass
    class AdobeSignatureBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (StandardEncryptionParamsBox, 'StdEncryptionBox'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(__versioned, 'ModificationTime'),
        (UI32, 'TrackID'),
        (UI32, 'Reserved(0)'),
        (__versioned, 'Duration'),
        (dyn.array(UI32,2), 'Reserved(1)'),
        (SI16, 'Layer'),
        (SI16, 'AlternateGroup'),
        (SI8_8, 'Volume'),
        (UI16, 'Reserved(2)'),
        (dyn.array(SI32,9), 'TransformMatrix'),
        (UI16_16, 'Width'),
        (UI16_16, 'Height'),
    ]

@Boxes.define
class edts(BOX): pass

@Boxes.define
class elst(pstruct.type):
    class ELSTRECORD(pstruct.type):
        __versioned = lambda s: UI32 if s.getparent(elst)['Version'].li.int() == 0 else UI64
        __sversioned = lambda s: SI32 if s.getparent(elst)['Version'].li.int() == 0 else SI64
        _fields_ = [
            (__versioned, 'SegmentDuration'),
            (__sversioned, 'MediaTime'),
            (SI16, 'MediaRateInteger'),
            (SI16, 'MediaRateFraction'),
        ]

    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(UI32, 'NumberEntry'),
        (lambda s: dyn.array(RandomAccessStructure,s['NumberEntry'].li.int()), 'RandomAccessSample'),
    ]

@Boxes.define
class mfro(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'Size'),
    ]

@Boxes.define
class sinf(pstruct.type):
    class OriginalFormatBox(BOX): pass
    class SchemeTypeBox(BOX): pass
    class SchemeInformationBox(BOX): pass
    _fields_ = [
        (OriginalFormatBox, 'OriginalFormatBox'),
        (SchemeTypeBox, 'SchemeTypeBox'),
        (SchemeInformationBox, 'SchemeInformationBox'),
    ]

@Boxes.define
class frma(pstruct.type):
    _fields_ = [(UI32,'UnencryptedDataFormat')]

@Boxes.define
class schm(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
class schi(BOXLIST): pass

@Boxes.define
class adkm(pstruct.type):
    class AdobeDRMHeaderBox(BOX): pass
    class AdobeDRMAUFormatBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (AdobeDRMHeaderBox, 'Header'),
        (AdobeDRMAUFormatBox, 'AUFormat'),
    ]

@Boxes.define
class ahdr(pstruct.type):
    class StandardEncryptionParamsBox(BOX): pass
    class AdobeSignatureBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (StandardEncryptionParamsBox, 'StdEncryptionBox'),
        (lambda s: AdobeSignatureBox if s['Version'].li.int() == 1 else ptype.undefined, 'Signature'),
    ]

@Boxes.define
class aprm(pstruct.type):
    class EncryptionInfoBox(BOX): pass
    class KeyInfoBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (EncryptionInfoBox, 'EncInfoBox'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(EncryptionInfoBox, 'EncInfoBox'),
        (KeyInfoBox, 'KeyInfoBox'),
    ]

@Boxes.define
class aeib(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (STRING, 'EncryptionAlgorithm'),
        (UI8, 'KeyLength'),
    ]

@Boxes.define
class akey(pstruct.type):
    class APSParamsBox(BOX): pass
    class FMRMSv2ParamsBox(BOX): pass

    def __Params(self):
        res = self.getparent(aprm)
        return APSParamsBox if res['Version'].li.int() == 1 else FMRMSv2PAramsBox

    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (__Params, 'Params'),
    ]

@Boxes.define
class flxs(pstruct.type):
    _fields_ = [
        (STRING, 'FmrmsV2Metadata'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
@Boxes.define
class blnk(pstruct.type):
    _fields_ = [
        (UI16, 'StartChar'),
        (UI16, 'EndChar'),
    ]

@Boxes.define
class twrp(pstruct.type):
    _fields_ = [
        (UI8, 'WrapFlag'),
    ]

### file types
class File(BOX): pass

if __name__ == '__main__':
    import ptypes,swf.f4v as f4v
    ptypes.setsource('c:/users/user/Documents/blah.flv',mode='rb')
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
(lambda s: dyn.array(RandomAccessStructure,s['NumberEntry'].li.int()), 'RandomAccessSample'),
    ]

@Boxes.define
class mfro(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'Size'),
    ]

@Boxes.define
class sinf(pstruct.type):
    class OriginalFormatBox(BOX): pass
    class SchemeTypeBox(BOX): pass
    class SchemeInformationBox(BOX): pass
    _fields_ = [
        (OriginalFormatBox, 'OriginalFormatBox'),
        (SchemeTypeBox, 'SchemeTypeBox'),
        (SchemeInformationBox, 'SchemeInformationBox'),
    ]

@Boxes.define
class frma(pstruct.type):
    _fields_ = [(UI32,'UnencryptedDataFormat')]

@Boxes.define
class schm(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (UI32, 'SchemeType'),
github arizvisa / syringe / template / vector / swf / f4v.py View on Github external
]

@Boxes.define
class ahdr(pstruct.type):
    class StandardEncryptionParamsBox(BOX): pass
    class AdobeSignatureBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (StandardEncryptionParamsBox, 'StdEncryptionBox'),
        (lambda s: AdobeSignatureBox if s['Version'].li.int() == 1 else ptype.undefined, 'Signature'),
    ]

@Boxes.define
class aprm(pstruct.type):
    class EncryptionInfoBox(BOX): pass
    class KeyInfoBox(BOX): pass
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (EncryptionInfoBox, 'EncInfoBox'),
        (KeyInfoBox, 'KeyInfoBox'),
    ]

@Boxes.define
class aeib(pstruct.type):
    _fields_ = [
        (UI8, 'Version'),
        (UI24, 'Flags'),
        (STRING, 'EncryptionAlgorithm'),
        (UI8, 'KeyLength'),
    ]