Added a plain X videosink, the videosink uses capsnego. adjusted the v4lsrc so that it uses capsnego on the src pad

Original commit message from CVS:
Added a plain X videosink, the videosink uses capsnego.
adjusted the v4lsrc so that it uses capsnego on the src pad
Small fixed to capsnego and the properties/caps.
This commit is contained in:
Wim Taymans 2001-03-29 22:32:00 +00:00
parent 0e93fd2747
commit 9f44f8ecc2
6 changed files with 27 additions and 9 deletions

View file

@ -785,6 +785,7 @@ plugins/visualization/synaesthesia/Makefile
plugins/visualization/smoothwave/Makefile plugins/visualization/smoothwave/Makefile
plugins/videosink/Makefile plugins/videosink/Makefile
plugins/videoscale/Makefile plugins/videoscale/Makefile
plugins/xvideosink/Makefile
plugins/wav/Makefile plugins/wav/Makefile
plugins/dvdsrc/Makefile plugins/dvdsrc/Makefile
plugins/vcdsrc/Makefile plugins/vcdsrc/Makefile

View file

@ -437,6 +437,8 @@ gst_caps_append (GstCaps *caps, GstCaps *capstoadd)
{ {
GstCaps *orig = caps; GstCaps *orig = caps;
g_return_val_if_fail (caps != capstoadd, caps);
if (caps == NULL) if (caps == NULL)
return capstoadd; return capstoadd;
@ -462,6 +464,8 @@ gst_caps_prepend (GstCaps *caps, GstCaps *capstoadd)
{ {
GstCaps *orig = capstoadd; GstCaps *orig = capstoadd;
g_return_val_if_fail (caps != capstoadd, caps);
if (capstoadd == NULL) if (capstoadd == NULL)
return caps; return caps;
@ -625,6 +629,7 @@ gst_caps_load_thyself (xmlNodePtr parent)
caps->refcount = 1; caps->refcount = 1;
caps->lock = g_mutex_new (); caps->lock = g_mutex_new ();
caps->next = NULL;
while (subfield) { while (subfield) {
if (!strcmp (subfield->name, "name")) { if (!strcmp (subfield->name, "name")) {

View file

@ -957,6 +957,18 @@ gst_pad_renegotiate_func (GstPad *pad, GstPad *peerpad, GstCaps **newcaps, gint
do { do {
gboolean matchtempl; gboolean matchtempl;
if (!*newcaps) {
if (otherpad->negotiatefunc) {
GstRealPad *temp;
otherpad->negotiatefunc (GST_PAD (otherpad), newcaps, *counter);
temp = otherpad;
otherpad = currentpad;
currentpad = temp;
}
}
matchtempl = gst_caps_check_compatibility (*newcaps, gst_pad_get_padtemplate_caps (GST_PAD (otherpad))); matchtempl = gst_caps_check_compatibility (*newcaps, gst_pad_get_padtemplate_caps (GST_PAD (otherpad)));
GST_DEBUG (GST_CAT_ELEMENT_PADS, "caps compatibility check %s\n", (matchtempl?"ok":"fail")); GST_DEBUG (GST_CAT_ELEMENT_PADS, "caps compatibility check %s\n", (matchtempl?"ok":"fail"));
@ -977,12 +989,12 @@ gst_pad_renegotiate_func (GstPad *pad, GstPad *peerpad, GstCaps **newcaps, gint
} }
else { else {
*newcaps = GST_PAD_CAPS (otherpad); *newcaps = GST_PAD_CAPS (otherpad);
gst_caps_ref(*newcaps); if (*newcaps) gst_caps_ref(*newcaps);
} }
} }
else { else {
*newcaps = GST_PAD_CAPS (otherpad); *newcaps = GST_PAD_CAPS (otherpad);
gst_caps_ref(*newcaps); if (*newcaps) gst_caps_ref(*newcaps);
} }
(*counter)++; (*counter)++;
@ -1053,9 +1065,8 @@ gst_pad_renegotiate (GstPad *pad)
GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad)); GST_DEBUG_PAD_NAME(pad), GST_DEBUG_PAD_NAME(peerpad));
newcaps = GST_PAD_CAPS (pad); newcaps = GST_PAD_CAPS (pad);
g_assert (newcaps != NULL);
result = gst_pad_renegotiate_func (pad, GST_PAD (peerpad), &newcaps, &counter); result = gst_pad_renegotiate_func (GST_PAD (currentpad), GST_PAD (otherpad), &newcaps, &counter);
if (result) { if (result) {
GST_DEBUG (GST_CAT_ELEMENT_PADS, "pads aggreed on caps :)\n"); GST_DEBUG (GST_CAT_ELEMENT_PADS, "pads aggreed on caps :)\n");

View file

@ -1043,6 +1043,7 @@ gst_props_load_thyself (xmlNodePtr parent)
entry = gst_props_load_thyself_func (field); entry = gst_props_load_thyself_func (field);
if (entry)
props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func); props->properties = g_list_insert_sorted (props->properties, entry, props_compare_func);
} }
field = field->next; field = field->next;

View file

@ -40,11 +40,11 @@ plugin_init (GModule *module)
while (_factories[i].mime) { while (_factories[i].mime) {
gst_type_register (&_factories[i]); gst_type_register (&_factories[i]);
gst_plugin_add_type (plugin, &_factories[i]); gst_plugin_add_type (plugin, &_factories[i]);
// DEBUG("added factory #%d '%s'\n",i,_factories[i].mime); GST_DEBUG(0, "added factory #%d '%s'\n",i,_factories[i].mime);
i++; i++;
} }
// gst_info ("gsttypes: loaded %d standard types\n",i); //gst_info ("gsttypes: loaded %d standard types\n",i);
return plugin; return plugin;
} }

View file

@ -3,7 +3,7 @@
noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \ noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \
mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \ mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \
aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \ aviparse vidcapture avi2mpg mp2tomp1 mp1tomp1 pipetest \
vidcapture2 mp2toavi mp3tovorbis mpeg2parse2 xmmstest vidcapture2 mp2toavi mp3tovorbis mpeg2parse2 xmmstest videotest2
SUBDIRS = xml bindings SUBDIRS = xml bindings