예제 #1
0
def do():
    try: 
        threefive.decode(sys.argv[1])
    except: 
        # Handles piped in data
        try: threefive.decode()
        except: pass
예제 #2
0
파일: cli.py 프로젝트: vladdoster/threefive
def do():
    if not sys.argv[1:]:
        threefive.decode()
    else:
        try:
            args = sys.argv[1:]
            for arg in args:
                print(f"Next is {arg}\n\n")
                threefive.decode(arg)
        except:
            pass
예제 #3
0
def clean_list(full_list, spliceCommandType, networkid):
    '''
    This method eliminates all the triggers that are any type other than spliceCommandType
    and all the triggers that are not of networkid 
    '''
    type_list = []
    for i in range(0, len(full_list)):
        item = full_list[i].split(":")
        if item[1] == networkid:
            cue = threefive.decode(item[3]).get()
            if cue["info_section"]["splice_command_type"] == spliceCommandType:
                type_list.append(full_list[i])
    return type_list
"""
Example from the specification

14.5. Time_Signal–Program_Overlap_Start

"""

from threefive import decode

Hex = "0xFC302F000000000000FFFFF00506FEAEBFFF640019021743554549480000087F9F0808000000002CA56CF5170000951DB0A8"

decode(Hex)
예제 #5
0
#!/usr/bin/env python3

import sys
import threefive
'''
example command line tool.
pass in a file name or message string to decode

example:
python cli.py '/DBIAAAAAAAA///wBQb+ek2ItgAyAhdDVUVJSAAAGH+fCAgAAAAALMvDRBEAAAIXQ1VFSUgAABl/nwgIAAAAACyk26AQAACZcuND'

or 
python cli.py /path/to/mpeg.ts

'''

threefive.decode(sys.argv[1])
예제 #6
0
from threefive import decode

"""
Splice null command example

"""


decode("Splice_Null.cue")
예제 #7
0
"""
Example from the specification

14.2. Splice_Insert

"""

import threefive

Hex = "0xFC302F000000000000FFFFF014054800008F7FEFFE7369C02EFE0052CCF500000000000A0008435545490000013562DBA30A"
Base64 = "/DAvAAAAAAAA///wFAVIAACPf+/+c2nALv4AUsz1AAAAAAAKAAhDVUVJAAABNWLbowo="
"""
Using Hex
"""
htf = threefive.decode(Hex)
htf.show()

"""
Using Base64 auto
(output should be the same as above)
"""
btf = threefive.decode(Base64)
btf.show()
# Re-encode the info section
btf.info_section.encode()
예제 #8
0
from threefive import decode
"""
Splice null command example

"""

hexed = "0xFC301100000000000000FFFFFF0000004F253396"

decode(hexed)
예제 #9
0
"""
SCTE35 DTMF Descriptor Example

Usage:
    pypy3 Dtmf_Descriptor.py

"""

from threefive import decode

dtmf = b"/DAsAAAAAAAAAP/wDwUAAABef0/+zPACTQAAAAAADAEKQ1VFSbGfMTIxIxGolm3/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"

decode(dtmf)
예제 #10
0
import threefive
"""
Another Splice Insert example
"""

hexed = "0xFC302100000000000000FFF01005000003DB7FEF7F7E0020F580C0000000000019913DA5"
threefive.decode(hexed)
"""
Example from the specification

14.3. Time_Signal–Placement_Opportunity_End

"""

from threefive import decode

be_six_four = "/DAvAAAAAAAA///wBQb+dGKQoAAZAhdDVUVJSAAAjn+fCAgAAAAALKChijUCAKnMZ1g="

decode(be_six_four)
예제 #12
0
"""
Example from the specification

14.3. Time_Signal–Placement_Opportunity_End

"""

from threefive import decode

Base64 = "/DAvAAAAAAAA///wBQb+dGKQoAAZAhdDVUVJSAAAjn+fCAgAAAAALKChijUCAKnMZ1g="

decode(Base64)