summaryrefslogtreecommitdiffstats
path: root/sys/oss/gstosssink.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-08-23 13:26:21 +0000
committerAndy Wingo <wingo@pobox.com>2005-08-23 13:26:21 +0000
commitd1d21600f86907f1dbd1fe4204be443eeda6cafc (patch)
tree52725fea0103ecd999811dd30868043a768640d8 /sys/oss/gstosssink.c
parentffaaa7528a2348853c1a89963646012f2edba310 (diff)
sys/oss/gstossmixer.*: Refactored to be more like alsamixer.
Original commit message from CVS: 2005-08-23 Andy Wingo <wingo@pobox.com> * sys/oss/gstossmixer.h: * sys/oss/gstossmixer.c: Refactored to be more like alsamixer. * sys/oss/gstossmixertrack.h: * sys/oss/gstossmixertrack.c: Split out from gstossmixer.[ch], like gstalsamixer. * sys/oss/gstosssrc.c: * sys/oss/gstosssink.c: Where before we used a gstosselement object as a helper library, now just call functions from gstosshelper. * sys/oss/gstosshelper.h: * sys/oss/gstosshelper.c: Made a real library. Removed propertyprobe for now, should add it back later. * sys/oss/gstosselement.h: * sys/oss/gstosselement.c: Removed, we don't have a shared base class. * sys/oss/gstosshelper.c (gst_oss_helper_probe_caps): Search higher-to-lower, makes 16 bit appear earlier in the caps, which makes it preferred.
Diffstat (limited to 'sys/oss/gstosssink.c')
-rw-r--r--sys/oss/gstosssink.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c
index efef1ba0..a98efab1 100644
--- a/sys/oss/gstosssink.c
+++ b/sys/oss/gstosssink.c
@@ -162,27 +162,22 @@ gst_oss_sink_init (GstOssSink * osssink)
{
GST_DEBUG ("initializing osssink");
- osssink->element = g_object_new (GST_TYPE_OSSELEMENT, NULL);
+ osssink->fd = -1;
}
static GstCaps *
gst_oss_sink_getcaps (GstBaseSink * bsink)
{
GstOssSink *osssink;
- GstOssElement *element;
GstCaps *caps;
osssink = GST_OSSSINK (bsink);
- element = osssink->element;
- gst_osselement_probe_caps (element);
-
- if (element->probed_caps == NULL) {
- caps =
- gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD
+ if (osssink->fd == -1) {
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD
(bsink)));
} else {
- caps = gst_caps_ref (element->probed_caps);
+ caps = gst_oss_helper_probe_caps (osssink->fd);
}
return caps;