docs/libs/gstreamer-libs-sections.txt: make sure GstBaseTransformClass shows up in the docs

Original commit message from CVS:

* docs/libs/gstreamer-libs-sections.txt:
make sure GstBaseTransformClass shows up in the docs
* libs/gst/base/gstbasetransform.c:
* libs/gst/base/gstbasetransform.h:
move docs so gtk-doc picks it up now
This commit is contained in:
Thomas Vander Stichele 2006-05-03 16:45:11 +00:00
parent 493b84107d
commit da6dcf9a64
4 changed files with 88 additions and 61 deletions

View file

@ -1,3 +1,11 @@
2006-05-03 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/libs/gstreamer-libs-sections.txt:
make sure GstBaseTransformClass shows up in the docs
* libs/gst/base/gstbasetransform.c:
* libs/gst/base/gstbasetransform.h:
move docs so gtk-doc picks it up now
2006-05-02 Stefan Kost <ensonic@users.sf.net> 2006-05-02 Stefan Kost <ensonic@users.sf.net>
* docs/libs/gstreamer-libs-sections.txt: * docs/libs/gstreamer-libs-sections.txt:

View file

@ -187,6 +187,7 @@ gst_base_sink_get_type
<TITLE>GstBaseTransform</TITLE> <TITLE>GstBaseTransform</TITLE>
<INCLUDE>gst/base/gstbasetransform.h</INCLUDE> <INCLUDE>gst/base/gstbasetransform.h</INCLUDE>
GstBaseTransform GstBaseTransform
GstBaseTransformClass
gst_base_transform_is_passthrough gst_base_transform_is_passthrough
gst_base_transform_set_passthrough gst_base_transform_set_passthrough
@ -202,7 +203,6 @@ GST_BASE_TRANSFORM_SINK_PAD
GST_BASE_TRANSFORM_SRC_PAD GST_BASE_TRANSFORM_SRC_PAD
<SUBSECTION Standard> <SUBSECTION Standard>
GstBaseTransformClass
GST_BASE_TRANSFORM GST_BASE_TRANSFORM
GST_IS_BASE_TRANSFORM GST_IS_BASE_TRANSFORM
GST_TYPE_BASE_TRANSFORM GST_TYPE_BASE_TRANSFORM

View file

@ -60,18 +60,22 @@
* element negotiates the same caps on both pads. * element negotiates the same caps on both pads.
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* passthrough_on_same_caps on an element that doesn't implement a transform_caps * passthrough_on_same_caps on an element that doesn't implement a
* function is useful for elements that only inspect data (such as level) * transform_caps function is useful for elements that only inspect data
* (such as level)
* </para></listitem> * </para></listitem>
* </itemizedlist> * </itemizedlist>
* <itemizedlist> * <itemizedlist>
* <title>Example elements</title> * <title>Example elements</title>
* <listitem>Level</listitem> * <listitem>Level</listitem>
* <listitem>Videoscale, audioconvert, ffmpegcolorspace, audioresample in certain modes.</listitem> * <listitem>Videoscale, audioconvert, ffmpegcolorspace, audioresample in
* certain modes.</listitem>
* </itemizedlist> * </itemizedlist>
* </listitem> * </listitem>
* <listitem> * <listitem>
* <itemizedlist><title>Modifications in-place - input buffer and output buffer are the same thing.</title> * <itemizedlist>
* <title>Modifications in-place - input buffer and output buffer are the
* same thing.</title>
* <listitem><para> * <listitem><para>
* The element must implement a transform_ip function. * The element must implement a transform_ip function.
* </para></listitem> * </para></listitem>
@ -79,41 +83,46 @@
* Output buffer size must <= input buffer size * Output buffer size must <= input buffer size
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* If the always_in_place flag is set, non-writable buffers will be copied and * If the always_in_place flag is set, non-writable buffers will be copied
* passed to the transform_ip function, otherwise a new buffer will be created * and passed to the transform_ip function, otherwise a new buffer will be
* and the transform function called. * created and the transform function called.
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* Incoming writable buffers will be passed to the transform_ip function immediately. * Incoming writable buffers will be passed to the transform_ip function
* </para></listitem> * immediately. </para></listitem>
* <listitem><para> * <listitem><para>
* only implementing transform_ip and not transform implies always_in_place = * only implementing transform_ip and not transform implies always_in_place
* TRUE * = TRUE
* </para></listitem> * </para></listitem>
* </itemizedlist> * </itemizedlist>
* <itemizedlist> * <itemizedlist>
* <title>Example elements</title> * <title>Example elements</title>
* <listitem>Volume</listitem> * <listitem>Volume</listitem>
* <listitem>Audioconvert in certain modes (signed/unsigned conversion)</listitem> * <listitem>Audioconvert in certain modes (signed/unsigned
* <listitem>ffmpegcolorspace in certain modes (endianness swapping)</listitem> * conversion)</listitem>
* <listitem>ffmpegcolorspace in certain modes (endianness
* swapping)</listitem>
* </itemizedlist> * </itemizedlist>
* </listitem> * </listitem>
* <listitem> * <listitem>
* <itemizedlist><title>Modifications only to the caps/metadata of a buffer</title> * <itemizedlist>
* <title>Modifications only to the caps/metadata of a buffer</title>
* <listitem><para> * <listitem><para>
* The element does not require writable data, but non-writable buffers should * The element does not require writable data, but non-writable buffers
* be subbuffered so that the meta-information can be replaced. * should be subbuffered so that the meta-information can be replaced.
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* Elements wishing to operate in this mode should replace the * Elements wishing to operate in this mode should replace the
* prepare_output_buffer method to create subbuffers of the input buffer and * prepare_output_buffer method to create subbuffers of the input buffer
* set always_in_place to TRUE * and set always_in_place to TRUE
* </para></listitem> * </para></listitem>
* </itemizedlist> * </itemizedlist>
* <itemizedlist> * <itemizedlist>
* <title>Example elements</title> * <title>Example elements</title>
* <listitem>Capsfilter when setting caps on outgoing buffers that have none.</listitem> * <listitem>Capsfilter when setting caps on outgoing buffers that have
* <listitem>identity when it is going to re-timestamp buffers by datarate.</listitem> * none.</listitem>
* <listitem>identity when it is going to re-timestamp buffers by
* datarate.</listitem>
* </itemizedlist> * </itemizedlist>
* </listitem> * </listitem>
* <listitem> * <listitem>
@ -130,14 +139,15 @@
* </itemizedlist> * </itemizedlist>
* <itemizedlist> * <itemizedlist>
* <title>Example elements</title> * <title>Example elements</title>
* <listitem>Videoscale, ffmpegcolorspace, audioconvert when doing scaling/conversions</listitem> * <listitem>Videoscale, ffmpegcolorspace, audioconvert when doing
* scaling/conversions</listitem>
* </itemizedlist> * </itemizedlist>
* </listitem> * </listitem>
* <listitem> * <listitem>
* <itemizedlist><title>Special output buffer allocations</title> * <itemizedlist><title>Special output buffer allocations</title>
* <listitem><para> * <listitem><para>
* Elements which need to do special allocation of their output buffers other * Elements which need to do special allocation of their output buffers
* than what gst_buffer_pad_alloc allows should implement a * other than what gst_buffer_pad_alloc allows should implement a
* prepare_output_buffer method, which calls the parent implementation and * prepare_output_buffer method, which calls the parent implementation and
* passes the newly allocated buffer. * passes the newly allocated buffer.
* </para></listitem> * </para></listitem>
@ -157,8 +167,8 @@
* interested in modifying the buffers. * interested in modifying the buffers.
* </para></listitem> * </para></listitem>
* <listitem><para> * <listitem><para>
* Elements which are always in passthrough mode whenever the same caps has * Elements which are always in passthrough mode whenever the same caps
* been negotiated on both pads can set the class variable * has been negotiated on both pads can set the class variable
* passthrough_on_same_caps to have this behaviour automatically. * passthrough_on_same_caps to have this behaviour automatically.
* </para></listitem> * </para></listitem>
* </itemizedlist> * </itemizedlist>

View file

@ -50,7 +50,7 @@ G_BEGIN_DECLS
/** /**
* GST_BASE_TRANSFORM_SRC_PAD: * GST_BASE_TRANSFORM_SRC_PAD:
* @obj: base transform instance * @obj: base transform instance
* *
* Gives the pointer to the source #GstPad object of the element. * Gives the pointer to the source #GstPad object of the element.
* *
* Since: 0.10.4 * Since: 0.10.4
@ -60,7 +60,7 @@ G_BEGIN_DECLS
/** /**
* GST_BASE_TRANSFORM_SINK_PAD: * GST_BASE_TRANSFORM_SINK_PAD:
* @obj: base transform instance * @obj: base transform instance
* *
* Gives the pointer to the sink #GstPad object of the element. * Gives the pointer to the sink #GstPad object of the element.
* *
* Since: 0.10.4 * Since: 0.10.4
@ -114,12 +114,44 @@ struct _GstBaseTransform {
}; };
/** /**
* GstBaseTransformClass::transform_caps: * GstBaseTransformClass:
* @direction: the pad direction * @transform_caps: Optional. given the pad in this direction and the given
* @caps: the caps * caps, what caps are allowed on the other pad in this
* * element ?
* This method should answer the question "given this pad, and given these * @fixate_caps: Optional. Given the pad in this direction and the given
* caps, what caps would you allow on the other pad inside your element ?" * caps, fixate the caps on the other pad.
* @transform_size: Optional. given the size of a buffer in the given direction
* with the given caps, calculate the size in bytes of a buffer
* on the other pad with the given other caps.
* The default implementation uses get_unit_size and keeps
* the number of units the same.
* @get_unit_size: Required if the transform is not in-place.
* get the size in bytes of one unit for the given caps.
* @set_caps: allows the subclass to be notified of the actual caps set.
* @start: Optional.
* Called when the element starts processing.
* Allows opening external resources.
* @stop: Optional.
* Called when the element stops processing.
* Allows closing external resources.
* @transform: Required if the element does not operate in-place.
* Transforms one incoming buffer to one outgoing buffer.
* The function is allowed to change size/timestamp/duration
* of the outgoing buffer.
* @transform_ip: Required if the element operates in-place.
* Transform the incoming buffer in-place.
* @event: Optional.
* Event handler on the sink pad.
* @src_event: Optional.
* Event handler on the source pad.
* @passthrough_on_same_caps: If set to TRUE, passthrough mode will be
* automatically enabled if the caps are the same.
* @prepare_output_buffer: Optional.
* Subclasses can override this to do their own
* allocation of output buffers. Elements that only do
* analysis can return a subbuffer or even just
* increment the reference to the input buffer (if in
* passthrough mode)
*/ */
struct _GstBaseTransformClass { struct _GstBaseTransformClass {
GstElementClass parent_class; GstElementClass parent_class;
@ -127,60 +159,37 @@ struct _GstBaseTransformClass {
/*< public >*/ /*< public >*/
/* virtual methods for subclasses */ /* virtual methods for subclasses */
/* given the (non-)fixed simple caps on the pad in the given direction,
* what can I do on the other pad ? */
GstCaps* (*transform_caps) (GstBaseTransform *trans, GstCaps* (*transform_caps) (GstBaseTransform *trans,
GstPadDirection direction, GstPadDirection direction,
GstCaps *caps); GstCaps *caps);
/* given caps on one pad, how would you fixate caps on the other pad ? */
void (*fixate_caps) (GstBaseTransform *trans, void (*fixate_caps) (GstBaseTransform *trans,
GstPadDirection direction, GstCaps *caps, GstPadDirection direction, GstCaps *caps,
GstCaps *othercaps); GstCaps *othercaps);
/* given the size of a buffer in the given direction with the given caps,
* calculate the byte size of an buffer on the other side with the given
* other caps; the default
* implementation uses get_size and keeps the number of units the same */
gboolean (*transform_size) (GstBaseTransform *trans, gboolean (*transform_size) (GstBaseTransform *trans,
GstPadDirection direction, GstPadDirection direction,
GstCaps *caps, guint size, GstCaps *caps, guint size,
GstCaps *othercaps, guint *othersize); GstCaps *othercaps, guint *othersize);
/* get the byte size of one unit for a given caps.
* Always needs to be implemented if the transform is not in-place. */
gboolean (*get_unit_size) (GstBaseTransform *trans, GstCaps *caps, gboolean (*get_unit_size) (GstBaseTransform *trans, GstCaps *caps,
guint *size); guint *size);
/* notify the subclass of new caps */
gboolean (*set_caps) (GstBaseTransform *trans, GstCaps *incaps, gboolean (*set_caps) (GstBaseTransform *trans, GstCaps *incaps,
GstCaps *outcaps); GstCaps *outcaps);
/* start and stop processing, ideal for opening/closing the resource */
gboolean (*start) (GstBaseTransform *trans); gboolean (*start) (GstBaseTransform *trans);
gboolean (*stop) (GstBaseTransform *trans); gboolean (*stop) (GstBaseTransform *trans);
/* sink event */
gboolean (*event) (GstBaseTransform *trans, GstEvent *event); gboolean (*event) (GstBaseTransform *trans, GstEvent *event);
/* transform one incoming buffer to one outgoing buffer.
* Always needs to be implemented unless always operating in-place.
* transform function is allowed to change size/timestamp/duration of
* the outgoing buffer. */
GstFlowReturn (*transform) (GstBaseTransform *trans, GstBuffer *inbuf, GstFlowReturn (*transform) (GstBaseTransform *trans, GstBuffer *inbuf,
GstBuffer *outbuf); GstBuffer *outbuf);
/* transform a buffer inplace */
GstFlowReturn (*transform_ip) (GstBaseTransform *trans, GstBuffer *buf); GstFlowReturn (*transform_ip) (GstBaseTransform *trans, GstBuffer *buf);
/* FIXME: When adjusting the padding, move these to nicer places in the class */ /* FIXME: When adjusting the padding, move these to nicer places in the class */
/* Set by child classes to automatically do passthrough mode */
gboolean passthrough_on_same_caps; gboolean passthrough_on_same_caps;
/* Subclasses can override this to do their own allocation of output buffers.
* Elements that only do analysis can return a subbuffer or even just
* increment the reference to the input buffer (if in passthrough mode)
*/
GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans, GstFlowReturn (*prepare_output_buffer) (GstBaseTransform * trans,
GstBuffer *input, gint size, GstCaps *caps, GstBuffer **buf); GstBuffer *input, gint size, GstCaps *caps, GstBuffer **buf);
@ -201,11 +210,11 @@ void gst_base_transform_set_in_place (GstBaseTransform *trans,
gboolean in_place); gboolean in_place);
gboolean gst_base_transform_is_in_place (GstBaseTransform *trans); gboolean gst_base_transform_is_in_place (GstBaseTransform *trans);
void gst_base_transform_update_qos (GstBaseTransform *trans, void gst_base_transform_update_qos (GstBaseTransform *trans,
gdouble proportion, gdouble proportion,
GstClockTimeDiff diff, GstClockTimeDiff diff,
GstClockTime timestamp); GstClockTime timestamp);
void gst_base_transform_set_qos_enabled (GstBaseTransform *trans, void gst_base_transform_set_qos_enabled (GstBaseTransform *trans,
gboolean enabled); gboolean enabled);
gboolean gst_base_transform_is_qos_enabled (GstBaseTransform *trans); gboolean gst_base_transform_is_qos_enabled (GstBaseTransform *trans);