Object design
RGC's object model is based on (or, more appropriately, it extends) the GObject object model (which in itself is a mess, but I won't digress here...). "Objects" are entities (typically from a single source file which have a name, derive from a Class, and provide:
- methods
- think of these as functions associated with an object. For example, the FmInputGst object provides a play method.
- properties
- a single value, part of the object's state. It can be usually read and modified. For example, the FmEffectGain provides a gain property (a volume control).
- signals
- an object can throw a signal. It's used to notify the client applications of some event. The application must usually register a callback to receive a signal. For example, the FmInputGst object provides a end_of_file signal which is fired when the playing position reaches the end of the input file.
Additionally, each object has an associated reference count (which starts at 1), that can be manipulated with the rgc_ref messages. As the refcount reaches 0, the object is destroyed, and its remote references will become invalid.
A client can request information about the features of a particular object using the RGC introspection interface (rgc_query_ and friends).
