Skip to content

Commit

Permalink
Renamed interleaved property for issue #25
Browse files Browse the repository at this point in the history
  • Loading branch information
iluvcapra committed Dec 11, 2023
1 parent a7b5187 commit b7b3083
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
13 changes: 13 additions & 0 deletions docs/source/implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,17 @@ RecordHalfSpeed >=2023.3 :meth:`~ptsl.Engine.record_hal
EditMemoryLocation >=2023.3 :meth:`~ptsl.Engine.edit_memory_location`
GetMemoryLocations >=2023.3 :meth:`~ptsl.Engine.get_memory_locations`
RegisterConnection >=2023.3 Implicit in :meth:`~ptsl.Client.__init__`
CreateMemoryLocation >=2023.6
CreateNewTracks >=2023.7
GetEditMode >=2023.7
SetEditMode >=2023.7
GetEditModeOptions >=2023.7
SetEditModeOptions >=2023.7
SelectTracksByName >=2023.7
SetZoomPreset >=2023.7
RecallZoomPreset >=2023.7
GetEditTool >=2023.7
SetEditTool >=2023.7
GetTimelineSelection >=2023.7
SetTimelineSelection >=2023.7
=================================== ========= =============================================================
2 changes: 1 addition & 1 deletion ptsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
- The third element increments with bug fixes or modifcations to docs,
build system, etc.
"""


from .client import Client
from .engine import Engine, open_engine
from .errors import CommandError
Expand Down
2 changes: 1 addition & 1 deletion ptsl/builders/create_session_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def stereo_io_settings(self):
def smpte51_io_settings(self):
self._io_settings = IO_51SMPTEMix

def interlaved(self, value: bool):
def interleaved(self, value: bool):
self._is_interleaved = value

def create(self) -> None:
Expand Down
40 changes: 39 additions & 1 deletion ptsl/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
MemoryLocationReference, MemoryLocationProperties, \
TimeProperties, CL_ClipLocation


@contextmanager
def open_engine(*args, **kwargs):
"""
Expand Down Expand Up @@ -323,6 +322,45 @@ def record_half_speed(self):
"""
self.client.run(ops.RecordHalfSpeed())

def create_memory_location(self,
location_number: int,
name: str,
start_time: str,
end_time: str,
time_properties: TimeProperties,
reference: MemoryLocationReference,
general_properties: MemoryLocationProperties,
comments: str) -> None:
"""
Create a new memory location.
"""
op = ops.CreateMemoryLocation(
number=location_number,
name=name,
start_time=start_time,
end_time=end_time,
time_properties=time_properties,
reference=reference,
general_properties=general_properties,
comments=comments
)

self.client.run(op)


def get_edit_mode(self):
"""
:returns: The current edit mode and options:
"""
op = ops.GetEditMode()
self.client.run(op)
mode = op.response.current_setting

op2 = ops.GetEditModeOptions()
self.client.run(op2)
options = op.response.edit_mode_options


def edit_memory_location(self, location_number: int,
name: str,
start_time: str, end_time: str,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_create2(self):
builder.wave_format()
builder.bit_depth(32)
builder.smpte51_io_settings()
builder.interlaved(False)
builder.interleaved(False)
builder.create()

engine.client.run.assert_called()
Expand Down

0 comments on commit b7b3083

Please sign in to comment.