[gst-devel] Re: v4lsrc input channels
Stefan Kost
ensonic at hora-obscura.de
Tue Nov 29 04:29:10 CET 2005
hi,
you need to bring the element to paused state first that get the ifaces. Reason
behind is, that only then the elments know, wheter they can provide the iface of
not. Then access it via GST_IMPLEMENTS_INTERFACE:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstImplementsInterface.html
Stefan
amo99 at libero.it wrote:
> 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).
>
> Cheers,
> Ronald
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list