Skip to content

Can't access camera pipeline_mode #33

@andi-spajk

Description

@andi-spajk

Hi everyone

I am unable to use the pipeline_mode getter. I see the getter/setter inside the SeekCamera class in the camera.py module, but the class docstring doesn't actually specify them. I also noticed a pipeline_mode getter in the frame header docstring, but the class does not actually contain this method. They're like inverses of each other.

Here is how I access camera.pipeline_mode:

def on_event(camera, event_type, event_status, renderer):
    if event_type == SeekCameraManagerEvent.CONNECT:
        print("{}: {}".format(str(event_type), camera.chipid))

        camera.color_palette = SeekCameraColorPalette.TYRIAN
        camera.register_frame_available_callback(on_frame, renderer)
        camera.capture_session_start(SeekCameraFrameFormat.PRE_AGC)

        print(camera.pipeline_mode)

        renderer.camera = camera

    elif event_type == SeekCameraManagerEvent.DISCONNECT:
        # etc...

and renderer.frame.header.pipeline_mode:

def on_frame(camera, camera_frame, renderer):
    with renderer.frame_condition:
        renderer.frame = camera_frame.pre_agc

        print(renderer.frame.header.pipeline_mode)

        renderer.frame_condition.notify()

Here are the error messages for both:

Exception ignored on calling ctypes callback function: <function cseekcamera_manager_register_event_callback.<locals>._event_callback at 0x000001EAB8203D30>
Traceback (most recent call last):
  File "C:\Users\andrea\AppData\Local\Programs\Python\Python39\lib\site-packages\seekcamera\_clib.py", line 605, in _event_callback
    manager.event_callback(camera_, event_type, event_status, manager.user_data)
  File "C:\Users\andrea\AppData\Local\Programs\Python\Python39\lib\site-packages\seekcamera\camera.py", line 603, in _event_callback
    self._event_callback(camera_, event_type_, None, self._user_data)
  File "C:\Users\andrea\programs\python\research-summer24\minimal_ex.py", line 58, in on_event
    print(camera.pipeline_mode)
AttributeError: 'SeekCamera' object has no attribute 'pipeline_mode'


Exception ignored on calling ctypes callback function: <function cseekcamera_register_frame_available_callback.<locals>._frame_available_callback at 0x00000249C5142EE0>
Traceback (most recent call last):
  File "C:\Users\andrea\AppData\Local\Programs\Python\Python39\lib\site-packages\seekcamera\_clib.py", line 791, in _frame_available_callback
    camera.event_callback(camera, CSeekCameraFrame(camera_frame), camera.user_data)
  File "C:\Users\andrea\AppData\Local\Programs\Python\Python39\lib\site-packages\seekcamera\camera.py", line 1207, in _frame_available_callback
    self._frame_available_callback(
  File "C:\Users\andrea\programs\python\research-summer24\minimal_ex.py", line 46, in on_frame
    print(renderer.frame.header.pipeline_mode)
AttributeError: 'SeekCameraFrameHeader' object has no attribute 'pipeline_mode'

I checked the SDK User Guide and SDK C Programming Guide, and there is no hint as to why this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions