mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
gst/gstbuffer.c: Copy more flags.
Original commit message from CVS: * gst/gstbuffer.c: (_gst_buffer_copy): Copy more flags. * gst/gstcaps.c: (gst_caps_is_equal): Fix some docs. Make _is_equal fast in the trivial cases. * gst/gstminiobject.c: * gst/gstminiobject.h: More docs. Spifify .h file. * gst/gstutils.c: Small doc update.
This commit is contained in:
parent
5f2e3c2cfb
commit
93e4477d56
6 changed files with 56 additions and 19 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2005-11-11 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstbuffer.c: (_gst_buffer_copy):
|
||||
Copy more flags.
|
||||
|
||||
* gst/gstcaps.c: (gst_caps_is_equal):
|
||||
Fix some docs.
|
||||
Make _is_equal fast in the trivial cases.
|
||||
|
||||
* gst/gstminiobject.c:
|
||||
* gst/gstminiobject.h:
|
||||
More docs. Spifify .h file.
|
||||
|
||||
* gst/gstutils.c:
|
||||
Small doc update.
|
||||
|
||||
2005-11-11 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasetransform.c:
|
||||
|
|
|
@ -199,7 +199,8 @@ _gst_buffer_copy (GstBuffer * buffer)
|
|||
|
||||
/* copy relevant flags */
|
||||
mask = GST_BUFFER_FLAG_PREROLL | GST_BUFFER_FLAG_IN_CAPS |
|
||||
GST_BUFFER_FLAG_DELTA_UNIT;
|
||||
GST_BUFFER_FLAG_DELTA_UNIT | GST_BUFFER_FLAG_DISCONT |
|
||||
GST_BUFFER_FLAG_GAP;
|
||||
GST_MINI_OBJECT (copy)->flags |= GST_MINI_OBJECT (buffer)->flags & mask;
|
||||
|
||||
/* we simply copy everything from our parent */
|
||||
|
|
|
@ -868,6 +868,10 @@ gst_caps_is_subset (const GstCaps * subset, const GstCaps * superset)
|
|||
gboolean
|
||||
gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
|
||||
{
|
||||
/* NULL <-> NULL is allowed here */
|
||||
if (caps1 == caps2)
|
||||
return TRUE;
|
||||
|
||||
g_return_val_if_fail (caps1 != NULL, FALSE);
|
||||
g_return_val_if_fail (caps2 != NULL, FALSE);
|
||||
|
||||
|
@ -1537,9 +1541,9 @@ gst_caps_load_thyself (xmlNodePtr parent)
|
|||
* @caps: a pointer to #GstCaps
|
||||
* @newcaps: a #GstCaps to replace *caps
|
||||
*
|
||||
* Replaces *caps with @newcaps. Frees the #GstCaps in the location
|
||||
* Replaces *caps with @newcaps. Unrefs the #GstCaps in the location
|
||||
* pointed to by @caps, if applicable, then modifies @caps to point to
|
||||
* @newcaps.
|
||||
* @newcaps. An additional ref on @newcaps is taken.
|
||||
*/
|
||||
void
|
||||
gst_caps_replace (GstCaps ** caps, GstCaps * newcaps)
|
||||
|
|
|
@ -134,7 +134,7 @@ gst_mini_object_init (GTypeInstance * instance, gpointer klass)
|
|||
|
||||
/**
|
||||
* gst_mini_object_new:
|
||||
* @type: the GType of the mini-object to create
|
||||
* @type: the #GType of the mini-object to create
|
||||
*
|
||||
* Creates a new mini-object of the desired type.
|
||||
*
|
||||
|
@ -183,7 +183,7 @@ gst_mini_object_copy (const GstMiniObject * mini_object)
|
|||
* @mini_object: the mini-object to check
|
||||
*
|
||||
* Checks if a mini-object is writable. A mini-object is writable
|
||||
* if the reference count is one and the GST_MINI_OBJECT_FLAG_READONLY
|
||||
* if the reference count is one and the #GST_MINI_OBJECT_FLAG_READONLY
|
||||
* flag is not set. Modification of a mini-object should only be
|
||||
* done after verifying that it is writable.
|
||||
*
|
||||
|
|
|
@ -128,11 +128,21 @@ typedef enum
|
|||
*/
|
||||
#define GST_MINI_OBJECT_REFCOUNT_VALUE(obj) (g_atomic_int_get (&(GST_MINI_OBJECT_CAST(obj))->refcount))
|
||||
|
||||
/**
|
||||
* GstMiniObject:
|
||||
* @instance: type instance
|
||||
* @refcount: atomic refcount
|
||||
* @flags: extra flags.
|
||||
*
|
||||
* Base class for refcounted lightweight objects.
|
||||
*/
|
||||
struct _GstMiniObject {
|
||||
GTypeInstance instance;
|
||||
/*< public >*/ /* with COW */
|
||||
gint refcount;
|
||||
guint flags;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
|
@ -142,27 +152,31 @@ struct _GstMiniObjectClass {
|
|||
GstMiniObjectCopyFunction copy;
|
||||
GstMiniObjectFinalizeFunction finalize;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_mini_object_get_type (void);
|
||||
GType gst_mini_object_get_type (void);
|
||||
|
||||
GstMiniObject * gst_mini_object_new (GType type);
|
||||
GstMiniObject * gst_mini_object_copy (const GstMiniObject *mini_object);
|
||||
gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
|
||||
GstMiniObject * gst_mini_object_make_writable (GstMiniObject *mini_object);
|
||||
GstMiniObject* gst_mini_object_new (GType type);
|
||||
GstMiniObject* gst_mini_object_copy (const GstMiniObject *mini_object);
|
||||
gboolean gst_mini_object_is_writable (const GstMiniObject *mini_object);
|
||||
GstMiniObject* gst_mini_object_make_writable (GstMiniObject *mini_object);
|
||||
|
||||
GstMiniObject * gst_mini_object_ref (GstMiniObject *mini_object);
|
||||
void gst_mini_object_unref (GstMiniObject *mini_object);
|
||||
/* refcounting */
|
||||
GstMiniObject* gst_mini_object_ref (GstMiniObject *mini_object);
|
||||
void gst_mini_object_unref (GstMiniObject *mini_object);
|
||||
void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
|
||||
|
||||
void gst_mini_object_replace (GstMiniObject **olddata, GstMiniObject *newdata);
|
||||
/* GParamSpec */
|
||||
GParamSpec* gst_param_spec_mini_object (const char *name, const char *nick,
|
||||
const char *blurb, GType object_type,
|
||||
GParamFlags flags);
|
||||
|
||||
GParamSpec * gst_param_spec_mini_object (const char *name, const char *nick,
|
||||
const char *blurb, GType object_type, GParamFlags flags);
|
||||
|
||||
void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||
void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||
GstMiniObject * gst_value_get_mini_object (const GValue *value);
|
||||
/* GValue stuff */
|
||||
void gst_value_set_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||
void gst_value_take_mini_object (GValue *value, GstMiniObject *mini_object);
|
||||
GstMiniObject* gst_value_get_mini_object (const GValue *value);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -2204,6 +2204,8 @@ gst_buffer_join (GstBuffer * buf1, GstBuffer * buf2)
|
|||
*
|
||||
* Copies additional information (the timestamp, duration, and offset start
|
||||
* and end) from one buffer to the other.
|
||||
*
|
||||
* This function does not copy any buffer flags or caps.
|
||||
*/
|
||||
void
|
||||
gst_buffer_stamp (GstBuffer * dest, const GstBuffer * src)
|
||||
|
|
Loading…
Reference in a new issue