utilities.element_registry module¶
Utilities for registering elements to a mixin class that can call elements as methods
- Motivation:
- Inspectability
By making each method statically as opposed to dynamically (from registry list), the full traceback is inspectable before runtime, allowing for easier development and clearer, more concise readability.
- Performance
Dynamically setting methods on import is inefficient, though it is clever
- class utilities.element_registry.ElementRegistry[source]¶
Bases:
object
Class that defines the pass-through behavior of registered pipeparts elements that are called as methods of an instance (as opposed to calling the pipeparts functions directly)
All methods of this class are procedurally generated (except _attach_element), by running the following code from the test_stream module:
print(test_stream.generate_element_mixin())
- Notes:
- Motivation:
A alternate implementation set attributes dynamically, which though a smaller amount of code, was not inspectable before runtime (bad). This mixin class may be less fancy, but it allows for inspection which will improve development workflow (and demystify the pass-through methods of Stream class)
- New Elements:
Since registration happens statically (before runtime), adding a new element to the elements registries will not have an effect unless a similar method is added to this Mixin class. However, thanks to the test suite, adding a new element will raise a test failure unless this Mixin class is rebuilt.
- abs(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkabs
- adder(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkadder
- appsink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkappsink
- audioamplify(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudioamplify
- audiochebband(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudiochebband
- audiocheblimit(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudiocheblimit
- audioconvert(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudioconvert
- audiorate(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudiorate
- audioundersample(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkaudioundersample
- autoaudiosink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkautoaudiosink
- autochisq(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkautochisq
- avimux(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkavimux
- bitvectorgen(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkbitvectorgen
- bursttriggergen(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkbursttriggergen
- capsfilter(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkcapsfilter
- capssetter(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkcapssetter
- channelgram(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkchannelgram
- checktimestamps(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkchecktimestamps
- colorspace(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkcolorspace
- computegamma(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkcomputegamma
- condition(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts_condition.mkcondition
- controlsnksrc(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function lloidparts.mkcontrolsnksrc
- deglitcher(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkdeglitcher
- drop(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkdrop
- fakesink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkfakesink
- filesink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkfilesink
- firbank(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkfirbank
- firfilter(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkfirfilter
- flacenc(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkflacenc
- framecppchanneldemux(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkframecppchanneldemux
- framecppchannelmux(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkframecppchannelmux_from_list
- framecppfilesink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkframecppfilesink
- gate(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkgate
- histogram(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkhistogram
- htgate(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts_condition.mkhtgate
- iirfilter(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkiirfilter
- injections(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkinjections
- integrate(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkintegrate
- interpolator(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkinterpolator
- itac(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkitac
- itacac(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkitacac
- latency(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mklatency
- lloid_branch(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function lloidparts.mkLLOIDbranch
- lloid_hoft_to_snr_slices(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function lloidparts.mkLLOIDhoftToSnrSlices
- lloid_snr_chisq_to_triggers(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function lloidparts.mkLLOIDSnrChisqToTriggers
- lloid_snr_slices_to_timeslice_chisq(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function lloidparts.mkLLOIDSnrSlicesToTimeSliceChisq
- matrixmixer(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkmatrixmixer
- mean(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkmean
- multiband(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts_condition.mkmultiband
- multifilesink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkmultifilesink
- multiplier(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkmultiplier
- nofakedisconts(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mknofakedisconts
- nxydump(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mknxydump
- nxydumpsink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mknxydumpsink
- nxydumpsinktee(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mknxydumpsinktee
- odctodqv(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkodctodqv
- oggmux(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkoggmux
- ogmvideosink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkogmvideosink
- peak(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkpeak
- playbacksink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkplaybacksink
- pow(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkpow
- progressreport(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkprogressreport
- queue(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkqueue
- reblock(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkreblock
- resample(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkresample
- shift(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkshift
- spectrumplot(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkspectrumplot
- statevector(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkstatevector
- sumsquares(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mksumsquares
- taginject(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktaginject
- tcpserversink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktcpserversink
- tdwhiten(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktdwhiten
- tee(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktee
- theoraenc(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktheoraenc
- togglecomplex(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktogglecomplex
- trigger(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktrigger
- triggergen(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktriggergen
- triggerxmlwritersink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktriggerxmlwritersink
- trim(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mktrim
- uridecodebin(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkuridecodebin
- videosink(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkvideosink
- vorbisenc(*srcs, **kwargs)[source]¶
Automatically generated pass-through method for function pipeparts.mkvorbisenc
- class utilities.element_registry.RegisteredElement(func: function, base_name: Optional[str] = None, mod_name: Optional[str] = None)[source]¶
Bases:
object
A function to register as a method
- LEGACY_PREFIX = 'mk'¶
- property name¶
Method that can be overridden by subclasses for special naming behavior
- utilities.element_registry.generate_registered_method_source(elements: Optional[List[RegisteredElement]] = None) str [source]¶
This function is only to be used when making changes to the element registry, though it is also allowed to edit the ElementRegistry class directly. This function helps automatically generate the method source code for the ElementRegistry class using the attributes of the registered elements.
- Args:
- elements:
List[RegisteredElement], default None, if None use ALL_ELEMENTS registered below
- Returns:
str