threefive 2.4.45__tar.gz → 2.4.49__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {threefive-2.4.45/threefive.egg-info → threefive-2.4.49}/PKG-INFO +19 -21
  2. {threefive-2.4.45 → threefive-2.4.49}/README.md +18 -20
  3. {threefive-2.4.45 → threefive-2.4.49}/threefive/cue.py +14 -23
  4. {threefive-2.4.45 → threefive-2.4.49}/threefive/descriptors.py +7 -2
  5. {threefive-2.4.45 → threefive-2.4.49}/threefive/version.py +1 -1
  6. {threefive-2.4.45 → threefive-2.4.49/threefive.egg-info}/PKG-INFO +19 -21
  7. {threefive-2.4.45 → threefive-2.4.49}/LICENSE +0 -0
  8. {threefive-2.4.45 → threefive-2.4.49}/bin/threefive +0 -0
  9. {threefive-2.4.45 → threefive-2.4.49}/setup.cfg +0 -0
  10. {threefive-2.4.45 → threefive-2.4.49}/setup.py +0 -0
  11. {threefive-2.4.45 → threefive-2.4.49}/threefive/__init__.py +0 -0
  12. {threefive-2.4.45 → threefive-2.4.49}/threefive/base.py +0 -0
  13. {threefive-2.4.45 → threefive-2.4.49}/threefive/bitn.py +0 -0
  14. {threefive-2.4.45 → threefive-2.4.49}/threefive/commands.py +0 -0
  15. {threefive-2.4.45 → threefive-2.4.49}/threefive/crc.py +0 -0
  16. {threefive-2.4.45 → threefive-2.4.49}/threefive/decode.py +0 -0
  17. {threefive-2.4.45 → threefive-2.4.49}/threefive/encode.py +0 -0
  18. {threefive-2.4.45 → threefive-2.4.49}/threefive/packetdata.py +0 -0
  19. {threefive-2.4.45 → threefive-2.4.49}/threefive/section.py +0 -0
  20. {threefive-2.4.45 → threefive-2.4.49}/threefive/segment.py +0 -0
  21. {threefive-2.4.45 → threefive-2.4.49}/threefive/segmentation.py +0 -0
  22. {threefive-2.4.45 → threefive-2.4.49}/threefive/smoketest.py +0 -0
  23. {threefive-2.4.45 → threefive-2.4.49}/threefive/stream.py +0 -0
  24. {threefive-2.4.45 → threefive-2.4.49}/threefive/stuff.py +0 -0
  25. {threefive-2.4.45 → threefive-2.4.49}/threefive/upids.py +0 -0
  26. {threefive-2.4.45 → threefive-2.4.49}/threefive.egg-info/SOURCES.txt +0 -0
  27. {threefive-2.4.45 → threefive-2.4.49}/threefive.egg-info/dependency_links.txt +0 -0
  28. {threefive-2.4.45 → threefive-2.4.49}/threefive.egg-info/requires.txt +0 -0
  29. {threefive-2.4.45 → threefive-2.4.49}/threefive.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: threefive
3
- Version: 2.4.45
3
+ Version: 2.4.49
4
4
  Summary: The Undisputed Heavyweight Champion of SCTE-35.
5
5
  Home-page: https://github.com/futzu/threefive
6
6
  Author: Adrian and a Cast of Thousands.
@@ -25,20 +25,35 @@ License-File: LICENSE
25
25
 
26
26
 
27
27
  ___
28
- # Latest __threefive__ version is `2`.`4`.`45`
29
- * this is the 279th release of threefive
28
+ # Latest __threefive__ version is `2`.`4`.`49`
29
+ * this is the 281th release of threefive
30
30
  * Cyclomatic Complexity Score 1.99
31
31
  * EIDR UPIDs are now in compact binary format
32
32
  * Stream class now includes PCR timestamps
33
33
  * Stream class now logs PAT, PMT, and SDT changes
34
34
  * SCTE-35 PES Packets are now properly handled
35
-
35
+ * Unknown UPID types handled properly
36
+ * fixed Cue.load() and encode_to_hex()
36
37
  ---
37
38
 
38
39
 
39
40
 
40
41
  # `Documentation`
41
42
 
43
+
44
+ * SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
45
+
46
+ * [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
47
+
48
+ * SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
49
+
50
+ * [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
51
+
52
+ * [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
53
+
54
+
55
+
56
+
42
57
  <details><summary>Install</summary>
43
58
  <br/>
44
59
  * install threefive with pip
@@ -79,23 +94,6 @@ a@slow:~/threefive$
79
94
  </details>
80
95
 
81
96
 
82
-
83
-
84
- #### SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
85
-
86
- #### [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
87
-
88
- #### SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
89
-
90
- #### [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
91
-
92
- #### [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
93
-
94
-
95
-
96
-
97
-
98
-
99
97
  <details><summary>Cue Class</summary>
100
98
 
101
99
  * src [cue.py](https://github.com/futzu/SCTE35-threefive/blob/master/threefive/cue.py)
@@ -9,20 +9,35 @@
9
9
 
10
10
 
11
11
  ___
12
- # Latest __threefive__ version is `2`.`4`.`45`
13
- * this is the 279th release of threefive
12
+ # Latest __threefive__ version is `2`.`4`.`49`
13
+ * this is the 281th release of threefive
14
14
  * Cyclomatic Complexity Score 1.99
15
15
  * EIDR UPIDs are now in compact binary format
16
16
  * Stream class now includes PCR timestamps
17
17
  * Stream class now logs PAT, PMT, and SDT changes
18
18
  * SCTE-35 PES Packets are now properly handled
19
-
19
+ * Unknown UPID types handled properly
20
+ * fixed Cue.load() and encode_to_hex()
20
21
  ---
21
22
 
22
23
 
23
24
 
24
25
  # `Documentation`
25
26
 
27
+
28
+ * SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
29
+
30
+ * [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
31
+
32
+ * SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
33
+
34
+ * [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
35
+
36
+ * [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
37
+
38
+
39
+
40
+
26
41
  <details><summary>Install</summary>
27
42
  <br/>
28
43
  * install threefive with pip
@@ -63,23 +78,6 @@ a@slow:~/threefive$
63
78
  </details>
64
79
 
65
80
 
66
-
67
-
68
- #### SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
69
-
70
- #### [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
71
-
72
- #### SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
73
-
74
- #### [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
75
-
76
- #### [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
77
-
78
-
79
-
80
-
81
-
82
-
83
81
  <details><summary>Cue Class</summary>
84
82
 
85
83
  * src [cue.py](https://github.com/futzu/SCTE35-threefive/blob/master/threefive/cue.py)
@@ -126,7 +126,7 @@ class Cue(SCTE35Base):
126
126
  data = data + "="
127
127
  return data
128
128
 
129
- def _mk_bits(self, data):
129
+ def _mk_bits(self,data):
130
130
  """
131
131
  cue._mk_bits Converts
132
132
  Hex and Base64 strings into bytes.
@@ -160,13 +160,11 @@ class Cue(SCTE35Base):
160
160
  Cue.info_section.descriptor_loop_length,
161
161
  then call Cue._descriptor_loop
162
162
  """
163
- if bites:
164
- dll = (bites[0] << 8) | bites[1]
165
- self.info_section.descriptor_loop_length = dll
166
- bites = bites[2:]
167
- self._descriptor_loop(bites[:dll])
168
- bites = bites[dll:]
169
- return bites
163
+ dll = (bites[0] << 8) | bites[1]
164
+ self.info_section.descriptor_loop_length = dll
165
+ bites = bites[2:]
166
+ self._descriptor_loop(bites[:dll])
167
+ return bites[dll:]
170
168
 
171
169
  def mk_info_section(self, bites):
172
170
  """
@@ -218,9 +216,6 @@ class Cue(SCTE35Base):
218
216
  dscptr_bites = self._unloop_descriptors()
219
217
  dll = len(dscptr_bites)
220
218
  self.info_section.descriptor_loop_length = dll
221
- if not self.command:
222
- err_mesg = "\033[7mA splice command is required\033[27m"
223
- raise ValueError(err_mesg)
224
219
  cmd_bites = self.command.encode()
225
220
  cmdl = self.command.command_length = len(cmd_bites)
226
221
  self.info_section.splice_command_length = cmdl
@@ -286,18 +281,14 @@ class Cue(SCTE35Base):
286
281
  'descriptors': [list of {dicts}],
287
282
  }
288
283
  """
289
- try:
290
- if isinstance(stuff, str):
291
- stuff = json.loads(stuff)
292
- if "info_section" in stuff:
293
- self.load_info_section(stuff["info_section"])
294
- if "command" in stuff:
295
- self.load_command(stuff["command"])
296
- if "descriptors" in stuff:
297
- self.load_descriptors(stuff["descriptors"])
298
- return True
299
- except:
300
- return False
284
+ if isinstance(stuff, str):
285
+ stuff = json.loads(stuff)
286
+ if "info_section" in stuff:
287
+ self.load_info_section(stuff["info_section"])
288
+ if "command" in stuff:
289
+ self.load_command(stuff["command"])
290
+ if "descriptors" in stuff:
291
+ self.load_descriptors(stuff["descriptors"])
301
292
 
302
293
  def load_info_section(self, isec):
303
294
  """
@@ -359,8 +359,11 @@ class SegmentationDescriptor(SpliceDescriptor):
359
359
  self.segmentation_duration = self.as_90k(self.segmentation_duration_ticks)
360
360
  self.segmentation_upid_type = bitbin.as_int(8)
361
361
  self.segmentation_upid_length = bitbin.as_int(8)
362
- the_upid = upid_map[self.segmentation_upid_type][1](
363
- bitbin, self.segmentation_upid_type, self.segmentation_upid_length
362
+ upid_type = self.segmentation_upid_type
363
+ if upid_type not in upid_map:
364
+ upid_type = 0xFD
365
+ the_upid = upid_map[upid_type][1](
366
+ bitbin, upid_type, self.segmentation_upid_length
364
367
  )
365
368
  self.segmentation_upid_type_name, self.segmentation_upid = the_upid.decode()
366
369
  self.segmentation_type_id = bitbin.as_int(8)
@@ -434,6 +437,8 @@ class SegmentationDescriptor(SpliceDescriptor):
434
437
  self._chk_var(int, nbin.add_int, "segmentation_upid_type", 8)
435
438
  self._chk_var(int, nbin.add_int, "segmentation_upid_length", 8)
436
439
  upid_type = self.segmentation_upid_type
440
+ if upid_type not in upid_map:
441
+ upid_type = 0xFD
437
442
  the_upid = upid_map[upid_type][1](
438
443
  None, upid_type, self.segmentation_upid_length
439
444
  )
@@ -2,4 +2,4 @@
2
2
  threefive.version
3
3
  from the cli tool run: threefive version
4
4
  """
5
- version='2.4.45'
5
+ version='2.4.49'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: threefive
3
- Version: 2.4.45
3
+ Version: 2.4.49
4
4
  Summary: The Undisputed Heavyweight Champion of SCTE-35.
5
5
  Home-page: https://github.com/futzu/threefive
6
6
  Author: Adrian and a Cast of Thousands.
@@ -25,20 +25,35 @@ License-File: LICENSE
25
25
 
26
26
 
27
27
  ___
28
- # Latest __threefive__ version is `2`.`4`.`45`
29
- * this is the 279th release of threefive
28
+ # Latest __threefive__ version is `2`.`4`.`49`
29
+ * this is the 281th release of threefive
30
30
  * Cyclomatic Complexity Score 1.99
31
31
  * EIDR UPIDs are now in compact binary format
32
32
  * Stream class now includes PCR timestamps
33
33
  * Stream class now logs PAT, PMT, and SDT changes
34
34
  * SCTE-35 PES Packets are now properly handled
35
-
35
+ * Unknown UPID types handled properly
36
+ * fixed Cue.load() and encode_to_hex()
36
37
  ---
37
38
 
38
39
 
39
40
 
40
41
  # `Documentation`
41
42
 
43
+
44
+ * SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
45
+
46
+ * [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
47
+
48
+ * SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
49
+
50
+ * [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
51
+
52
+ * [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
53
+
54
+
55
+
56
+
42
57
  <details><summary>Install</summary>
43
58
  <br/>
44
59
  * install threefive with pip
@@ -79,23 +94,6 @@ a@slow:~/threefive$
79
94
  </details>
80
95
 
81
96
 
82
-
83
-
84
- #### SCTE-35 on the [command line](https://github.com/futzu/scte35parser-threefive/blob/master/cli.md)
85
-
86
- #### [Trigger on SCTE-35 events](https://github.com/futzu/scte35parser-threefive/blob/master/trigger.md) using threefive.Stream
87
-
88
- #### SCTE-35 code [examples](https://github.com/futzu/SCTE35-threefive/blob/master/examples/README.md)
89
-
90
- #### [Encoding](https://github.com/futzu/scte35parser-threefive/blob/master/Encoding.md) and [Encoding | more ](https://github.com/futzu/scte35parser-threefive/blob/master/EncodingPipeMore.md)
91
-
92
- #### [Parse SCTE-35 programmatically ](https://github.com/futzu/scte35parser-threefive/blob/master/prog.md) with a few lines of code
93
-
94
-
95
-
96
-
97
-
98
-
99
97
  <details><summary>Cue Class</summary>
100
98
 
101
99
  * src [cue.py](https://github.com/futzu/SCTE35-threefive/blob/master/threefive/cue.py)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes