Skip to content

virtucamera.VCServer Attributes

shycats edited this page May 14, 2021 · 5 revisions

All attributes are read-only


SERVER_VERSION : tuple of 3 int
    version of PyVirtuCamera as (major,minor,patch)

is_event_loop_running : bool
    True while the server is running, from the moment the server
    is started with VCServer.start_serving() to the moment the
    server is completely stopped, when VCBase.server_did_stop()
    is called. When VCServer is created with VCServer.EVENTMODE_PULL,
    VCServer.execute_pending_events() must be called
    regularly while VCServer.is_event_loop_running is True.

Related: VCServer.start_serving() ||| VCServer.stop_serving() ||| VCBase.server_did_stop() ||| VCServer.execute_pending_events()


current_camera : str
    The name of the camera currently selected in VirtuCamera app.

capture_mode : int
    Mode to be used for capturing the viewport. One of:
        * VCServer.CAPMODE_SCREENSHOT
        * VCServer.CAPMODE_BUFFER
        * VCServer.CAPMODE_BUFFER_POINTER

    See VCServer.set_capture_mode() and VCBase.capture_will_start()
    for more details.

Related: VCServer.set_capture_mode() ||| VCBase.capture_will_start()


capture_format : int
    Pixel format when a buffer is used. One of:
        * VCServer.CAPFORMAT_UBYTE_RGB
        * VCServer.CAPFORMAT_UBYTE_BGR
        * VCServer.CAPFORMAT_UBYTE_RGBA
        * VCServer.CAPFORMAT_UBYTE_BGRA

    See VCServer.set_capture_mode() and VCBase.capture_will_start()
    for more details.

Related: VCServer.set_capture_mode() ||| VCBase.capture_will_start()


capture_width : int
    Horizontal size of the captured image in pixels.

Related: VCServer.set_capture_resolution()


capture_height : int
    Vertical size of the captured image in pixels.

Related: VCServer.set_capture_resolution()


use_vflip : bool
    True if vertical flip of the viewport video feed
    is enabled, False otherwise.

Related: VCServer.set_vertical_flip()


is_stopping : bool
    True while the server is shutting down all its processes
    after VCServer.stop_serving() is called.

Related: VCServer.stop_serving() ||| VCBase.server_did_stop()


is_serving : bool
    True while the server is open to incomming connections
    from the app.

Related: VCServer.start_serving()


is_connected : bool
    True while an app is connected to the server.

is_capturing : bool
    True during a viewport video capture session.

Related: VCBase.capture_will_start() ||| VCBase.capture_did_end()


server_port : int
    Port where the server is listening for incomming connections
    after calling VCServer.start_serving()

Related: VCServer.start_serving()


client_ip : str
    Network address of the client app connected to the server.

client_port : int
    Network port of the client app connected to the server.

Clone this wiki locally