gstreamer_core/libs/gst/base/gstbasetransform.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    35 #define GST_BASE_TRANSFORM_CAST(obj)	((GstBaseTransform *)(obj))
    35 #define GST_BASE_TRANSFORM_CAST(obj)	((GstBaseTransform *)(obj))
    36 
    36 
    37 /**
    37 /**
    38  * GST_BASE_TRANSFORM_SINK_NAME:
    38  * GST_BASE_TRANSFORM_SINK_NAME:
    39  *
    39  *
    40  * The name of the templates for the sink pad.
    40  * the name of the templates for the sink pad
    41  */
    41  */
    42 #define GST_BASE_TRANSFORM_SINK_NAME	"sink"
    42 #define GST_BASE_TRANSFORM_SINK_NAME	"sink"
    43 /**
    43 /**
    44  * GST_BASE_TRANSFORM_SRC_NAME:
    44  * GST_BASE_TRANSFORM_SRC_NAME:
    45  *
    45  *
    46  * The name of the templates for the source pad.
    46  * the name of the templates for the source pad
    47  */
    47  */
    48 #define GST_BASE_TRANSFORM_SRC_NAME	"src"
    48 #define GST_BASE_TRANSFORM_SRC_NAME	"src"
    49 
    49 
    50 /**
    50 /**
    51  * GST_BASE_TRANSFORM_SRC_PAD:
    51  * GST_BASE_TRANSFORM_SRC_PAD:
   142   gpointer       _gst_reserved[GST_PADDING_LARGE - 1];
   142   gpointer       _gst_reserved[GST_PADDING_LARGE - 1];
   143 };
   143 };
   144 
   144 
   145 /**
   145 /**
   146  * GstBaseTransformClass:
   146  * GstBaseTransformClass:
   147  * @transform_caps: Optional.  Given the pad in this direction and the given
   147  * @transform_caps: Optional.  given the pad in this direction and the given
   148  *                  caps, what caps are allowed on the other pad in this
   148  *                  caps, what caps are allowed on the other pad in this
   149  *                  element ?
   149  *                  element ?
   150  * @fixate_caps:    Optional. Given the pad in this direction and the given
   150  * @fixate_caps:    Optional. Given the pad in this direction and the given
   151  *                  caps, fixate the caps on the other pad.
   151  *                  caps, fixate the caps on the other pad.
   152  * @transform_size: Optional. Given the size of a buffer in the given direction
   152  * @transform_size: Optional. given the size of a buffer in the given direction
   153  *                  with the given caps, calculate the size in bytes of a buffer
   153  *                  with the given caps, calculate the size in bytes of a buffer
   154  *                  on the other pad with the given other caps.
   154  *                  on the other pad with the given other caps.
   155  *                  The default implementation uses get_unit_size and keeps
   155  *                  The default implementation uses get_unit_size and keeps
   156  *                  the number of units the same.
   156  *                  the number of units the same.
   157  * @get_unit_size:  Required if the transform is not in-place.
   157  * @get_unit_size:  Required if the transform is not in-place.
   180  *                         Subclasses can override this to do their own
   180  *                         Subclasses can override this to do their own
   181  *                         allocation of output buffers.  Elements that only do
   181  *                         allocation of output buffers.  Elements that only do
   182  *                         analysis can return a subbuffer or even just
   182  *                         analysis can return a subbuffer or even just
   183  *                         increment the reference to the input buffer (if in
   183  *                         increment the reference to the input buffer (if in
   184  *                         passthrough mode)
   184  *                         passthrough mode)
   185  * @before_transform: Optional. Since 0.10.22
       
   186  *                    This method is called right before the base class will
       
   187  *                    start processing. Dynamic properties or other delayed
       
   188  *                    configuration could be performed in this method.
       
   189  *
   185  *
   190  * Subclasses can override any of the available virtual methods or not, as
   186  * Subclasses can override any of the available virtual methods or not, as
   191  * needed. At minimum either @transform or @transform_ip need to be overridden.
   187  * needed. At minimum either @transform or @transform_ip need to be overridden.
   192  * If the element can overwrite the input data with the results (data is of the
   188  * If the element can overwrite the input data with the results (data is of the
   193  * same type and quantity) it should provide @transform_ip.
   189  * same type and quantity) it should provide @transform_ip.
   233      GstBuffer *input, gint size, GstCaps *caps, GstBuffer **buf);
   229      GstBuffer *input, gint size, GstCaps *caps, GstBuffer **buf);
   234 
   230 
   235   /* src event */
   231   /* src event */
   236   gboolean      (*src_event)      (GstBaseTransform *trans, GstEvent *event);
   232   gboolean      (*src_event)      (GstBaseTransform *trans, GstEvent *event);
   237 
   233 
   238   void          (*before_transform)  (GstBaseTransform *trans, GstBuffer *buffer);
       
   239 
       
   240   /*< private >*/
   234   /*< private >*/
   241   gpointer       _gst_reserved[GST_PADDING_LARGE - 2];
   235   gpointer       _gst_reserved[GST_PADDING_LARGE - 1];
   242 };
   236 };
   243 #ifdef __SYMBIAN32__
   237 #ifdef __SYMBIAN32__
   244 IMPORT_C
   238 IMPORT_C
   245 #endif
   239 #endif
   246 
   240 
   295 #endif
   289 #endif
   296 
   290 
   297 
   291 
   298 void            gst_base_transform_set_gap_aware    (GstBaseTransform *trans,
   292 void            gst_base_transform_set_gap_aware    (GstBaseTransform *trans,
   299                                                      gboolean gap_aware);
   293                                                      gboolean gap_aware);
   300 #ifdef __SYMBIAN32__
   294 
   301 IMPORT_C
       
   302 #endif
       
   303 
       
   304 
       
   305 void		gst_base_transform_suggest          (GstBaseTransform *trans,
       
   306 	                                             GstCaps *caps, guint size);
       
   307 #ifdef __SYMBIAN32__
       
   308 IMPORT_C
       
   309 #endif
       
   310 
       
   311 void		gst_base_transform_reconfigure      (GstBaseTransform *trans);
       
   312 G_END_DECLS
   295 G_END_DECLS
   313 
   296 
   314 #endif /* __GST_BASE_TRANSFORM_H__ */
   297 #endif /* __GST_BASE_TRANSFORM_H__ */