pub(crate) struct AudioCaptureSettings {Show 13 fields
pub(crate) device_name: Py<PyAny>,
pub(crate) sample_rate: u32,
pub(crate) channels: i32,
pub(crate) opus_bitrate: i32,
pub(crate) frame_duration_ms: f64,
pub(crate) use_vbr: bool,
pub(crate) opus_complexity: Option<i32>,
pub(crate) use_silence_gate: bool,
pub(crate) debug_logging: bool,
pub(crate) latency_ms: i32,
pub(crate) omit_audio_header: bool,
pub(crate) red_distance: i32,
pub(crate) output_socket: String,
}Expand description
Python-facing capture/encode configuration read by start_capture.
Declared #[pyclass(dict)] so callers may stash extra attributes on instances; the
fields below are the ones read by attribute name in extract_settings. device_name
accepts str | bytes | None.
Fields§
§device_name: Py<PyAny>§sample_rate: u32§channels: i32§opus_bitrate: i32§frame_duration_ms: f64§use_vbr: bool§opus_complexity: Option<i32>Opus encoder complexity, 0 (cheapest) to 10; out-of-range values raise ValueError at
start. None leaves the encoder at libopus’s default. Applied when the encoder is
created, so it does not change during a running capture.
use_silence_gate: bool§debug_logging: bool§latency_ms: i32§omit_audio_header: bool§red_distance: i32§output_socket: StringUnix socket path on which the capture serves its packets as an Ogg Opus stream to every consumer that connects; empty serves none. A path that cannot be bound fails the start like any other startup error.
Implementations§
Trait Implementations§
impl DerefToPyAny for AudioCaptureSettings
impl ExtractPyClassWithClone for AudioCaptureSettings
Source§impl<'py> IntoPyObject<'py> for AudioCaptureSettings
impl<'py> IntoPyObject<'py> for AudioCaptureSettings
Source§type Target = AudioCaptureSettings
type Target = AudioCaptureSettings
Source§type Output = Bound<'py, <AudioCaptureSettings as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <AudioCaptureSettings as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for AudioCaptureSettings
impl PyClass for AudioCaptureSettings
Source§impl PyClassImpl for AudioCaptureSettings
impl PyClassImpl for AudioCaptureSettings
Source§const MODULE: Option<&str> = ::core::option::Option::None
const MODULE: Option<&str> = ::core::option::Option::None
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// accepts `str | bytes | None`.
const RAW_DOC: &'static CStr = /// accepts `str | bytes | None`.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<AudioCaptureSettings as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<AudioCaptureSettings>
type Layout = <<AudioCaptureSettings as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<AudioCaptureSettings>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for AudioCaptureSettings
impl PyClassNewTextSignature for AudioCaptureSettings
const TEXT_SIGNATURE: &'static str = "()"
Source§impl PyMethods<AudioCaptureSettings> for PyClassImplCollector<AudioCaptureSettings>
impl PyMethods<AudioCaptureSettings> for PyClassImplCollector<AudioCaptureSettings>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for AudioCaptureSettings
impl PyTypeInfo for AudioCaptureSettings
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.Auto Trait Implementations§
impl !RefUnwindSafe for AudioCaptureSettings
impl Freeze for AudioCaptureSettings
impl Send for AudioCaptureSettings
impl Sync for AudioCaptureSettings
impl Unpin for AudioCaptureSettings
impl UnsafeUnpin for AudioCaptureSettings
impl UnwindSafe for AudioCaptureSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more