GStreamer Plugin Writer's Guide | ||
---|---|---|
<<< Previous | Basic Concepts | Next >>> |
Pads are used to negotiate links and data flow between elements in GStreamer. A pad can be viewed as a "place" or "port" on an element where links may be made with other elements. Pads have specific data handling capabilities: A pad only knows how to give or receive certain types of data. Links are only allowed when the capabilities of two pads are compatible.
An analogy may be helpful here. A pad is similar to a plug or jack on a physical device. Consider, for example, a home theater system consisting of an amplifier, a DVD player, and a (silent) video projector. Linking the DVD player to the amplifier is allowed because both devices have audio jacks, and linking the projector to the DVD player is allowed because both devices have compatible video jacks. Links between the projector and the amplifier may not be made because the projector and amplifier have different types of jacks. Pads in GStreamer serve the same purpose as the jacks in the home theater system.
For the moment, all data in GStreamer flows one way through a link between elements. Data flows out of one element through one or more source pads, and elements accept incoming data through one or more sink pads. Source and sink elements have only source and sink pads, respectively.
See the GStreamer Library Reference for the current implementation details of a GstPad
.
<<< Previous | Home | Next >>> |
Basic Concepts | Up | Buffers |