# Element Klass definition ## Purpose Applications should be able to retrieve elements from the registry of existing elements based on specific capabilities or features of the element. A playback application might want to retrieve all the elements that can be used for visualisation, for example, or a video editor might want to select all video effect filters. The topic of defining the klass of elements should be based on use cases. A list of classes that are used in a installation can be generated using: gst-inspect-1.0 -a | grep -ho Class:.\* | cut -c8- | sed "s/\\//\\\\n/g" | sort | uniq ## Proposal The GstElementDetails contains a field named klass that is a pointer to a string describing the element type. In this document we describe the format and contents of the string. Elements should adhere to this specification although that is not enforced to allow for wild (application specific) customisation. ###string format ['/'[/]*[/]* 4\) examples: apedemux : Extracter/Metadata audiotestsrc : Source/Audio autoaudiosink : Sink/Audio/Device cairotimeoverlay : Mixer/Video/Text dvdec : Decoder/Video dvdemux : Demuxer goom : Converter/Audio/Video id3demux : Extracter/Metadata udpsrc : Source/Network/Protocol/Device videomixer : Mixer/Video videoconvert : Filter/Video (intended use to convert video with as little visible change as possible) vertigotv : Effect/Video (intended use is to change the video) volume : Effect/Audio (intended use is to change the audio data) vorbisdec : Decoder/Audio vorbisenc : Encoder/Audio oggmux : Muxer adder : Mixer/Audio videobox : Effect/Video alsamixer : Control/Audio/Device audioconvert : Filter/Audio audioresample : Filter/Audio xvimagesink : Sink/Video/Device navseek : Filter/Debug decodebin : Decoder/Demuxer level : Filter/Analyzer/Audio tee : Connector/Debug ### open issues: - how to differentiate physical devices from logical ones? autoaudiosink : Sink/Audio/Device alsasink : Sink/Audio/Device ## Use cases - get a list of all elements implementing a video effect (pitivi): klass.contains (Effect & Video) - get list of muxers (pitivi): klass.contains (Muxer) - get list of video encoders (pitivi): klass.contains (Encoder & video) - Get a list of all audio/video visualisations (totem): klass.contains (Visualisation) - Get a list of all decoders/demuxer/metadata parsers/vis (playbin): klass.contains (Visualisation | Demuxer | Decoder | (Extractor & Metadata)) - Get a list of elements that can capture from an audio device (gst-properties): klass.contains (Source & Audio & Device) - filters out audiotestsrc, since it is not a device