[gst-devel] Re: v4lsrc input channels

amo99 at libero.it amo99 at libero.it
Tue Nov 29 03:46:02 CET 2005

Hi, i'm new to gstreamer.
I wish to use interfaces (mixer, tuner, ecc.) to change devices properties.  I can't access them. Could you tell me which is the wrong step?

int main (int argc, char *argv[])
  gst_init (&argc, &argv);
  const char * elementName = "alsamixer";
  GstElement *source = gst_element_factory_make (elementName, "test");
  if (source) {
    GstMixer *mixer = GST_MIXER (source); /* it returns NULL and prints assertion msg*/
    g_print("GstMixer instance: 0x%08X\n",source);
    GstMixerClass *klassMixer = GST_MIXER_GET_CLASS(source); /* should be mixer but mixer is NULL*/
    g_print("GstMixerClass: 0x%08X\n", klassMixer);

    if (klassMixer != NULL)	{
      const GList *channels = klassMixer->list_tracks(mixer);
      g_print("Channels 0x%08X\n",channels);
    gst_object_unref (GST_OBJECT (source));
Output on gststreamer v.0.9.6

(gstreamer:9666): GStreamer-CRITICAL **: gst_implements_interface_cast: assertion `gst_element_implements_interface (GST_ELEMENT (from), iface_type)' failed
GstMixer instance: 0x08CED0C8
GstMixerClass: 0x08D11FC0

** (gstreamer:9666): CRITICAL **: gst_alsa_mixer_element_list_tracks: assertion `this != NULL' failed
Channels 0x00000000


Thanks in advance

 On Fri, 2005-11-04 at 18:21 +0100, flowolf wrote:
 > How can I do the same thing with gstreamer?
 Using the GstTuner interface (gst/tuner/tuner.h).

More information about the gstreamer-devel mailing list