mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/gstpad.c: Rearrange/rewrite much of the pad negotiation code, since it resembled pasta. This actually changes th...
Original commit message from CVS: * gst/gstpad.c: Rearrange/rewrite much of the pad negotiation code, since it resembled pasta. This actually changes the way some negotiation works, since the previous code was inconsistent depending on how it was invoked. Add (internal) structure GstPadLink, which is used to hold some information (more in the future) about the link between two pads. Fixes a number of bugs, including random lossage of filter caps when the initial negotiation is delayed. A few functions are still unimplemented. * gst/gstpad.h: Add GST_PAD_LINK_{SUCESSFUL|FAILED}() macros. Please use these when testing GstPadLinkReturn values instead of comparing directly.
This commit is contained in:
parent
b121bf3571
commit
91954ff66b
3 changed files with 393 additions and 572 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2003-12-23 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstpad.c:
|
||||
Rearrange/rewrite much of the pad negotiation code, since it
|
||||
resembled pasta. This actually changes the way some
|
||||
negotiation works, since the previous code was inconsistent
|
||||
depending on how it was invoked. Add (internal) structure
|
||||
GstPadLink, which is used to hold some information (more in
|
||||
the future) about the link between two pads. Fixes a number
|
||||
of bugs, including random lossage of filter caps when the
|
||||
initial negotiation is delayed. A few functions are still
|
||||
unimplemented.
|
||||
* gst/gstpad.h:
|
||||
Add GST_PAD_LINK_{SUCESSFUL|FAILED}() macros. Please use
|
||||
these when testing GstPadLinkReturn values instead of comparing
|
||||
directly.
|
||||
|
||||
2003-12-23 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstvalue.c:
|
||||
|
|
938
gst/gstpad.c
938
gst/gstpad.c
File diff suppressed because it is too large
Load diff
10
gst/gstpad.h
10
gst/gstpad.h
|
@ -81,7 +81,7 @@ typedef struct _GstGhostPadClass GstGhostPadClass;
|
|||
/*typedef struct _GstPadTemplate GstPadTemplate;*/
|
||||
/*typedef struct _GstPadTemplateClass GstPadTemplateClass;*/
|
||||
typedef struct _GstStaticPadTemplate GstStaticPadTemplate;
|
||||
|
||||
typedef struct _GstPadLink GstPadLink;
|
||||
|
||||
typedef enum {
|
||||
GST_PAD_LINK_REFUSED = -1,
|
||||
|
@ -90,6 +90,9 @@ typedef enum {
|
|||
GST_PAD_LINK_DONE = 2
|
||||
} GstPadLinkReturn;
|
||||
|
||||
#define GST_PAD_LINK_FAILED(ret) (ret < GST_PAD_LINK_OK)
|
||||
#define GST_PAD_LINK_SUCCESSFUL(ret) (ret >= GST_PAD_LINK_OK)
|
||||
|
||||
/* convenience functions */
|
||||
#ifdef G_HAVE_ISO_VARARGS
|
||||
#define GST_PAD_QUERY_TYPE_FUNCTION(functionname, ...) GST_QUERY_TYPE_FUNCTION (GstPad *, functionname, __VA_ARGS__);
|
||||
|
@ -195,7 +198,9 @@ struct _GstRealPad {
|
|||
|
||||
GstProbeDispatcher probedisp;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
GstPadLink *link;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING - 1];
|
||||
};
|
||||
|
||||
struct _GstRealPadClass {
|
||||
|
@ -255,6 +260,7 @@ struct _GstGhostPadClass {
|
|||
#define GST_RPAD_GETCAPSFUNC(pad) (((GstRealPad *)(pad))->getcapsfunc)
|
||||
#define GST_RPAD_FIXATEFUNC(pad) (((GstRealPad *)(pad))->fixatefunc)
|
||||
#define GST_RPAD_BUFFERALLOCFUNC(pad) (((GstRealPad *)(pad))->bufferallocfunc)
|
||||
#define GST_RPAD_LINK(pad) (((GstRealPad *)(pad))->link)
|
||||
|
||||
/* GstGhostPad */
|
||||
#define GST_GPAD_REALPAD(pad) (((GstGhostPad *)(pad))->realpad)
|
||||
|
|
Loading…
Reference in a new issue