Hi,<br><br>Try with the files in attachment.<br>I will investigate if you get the same error.<br><br>J.<br><br><div class="gmail_quote">Le 19 mars 2009 12:08, <span dir="ltr"><<a href="mailto:cammille@polytech.unice.fr">cammille@polytech.unice.fr</a>></span> a écrit :<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
Si je ne me trompe pas vous êtes français. Alors ça sera beaucoup plus<br>
simple pour moi de vousparler en français.<br>
<br>
Voilà je suis allé sur cette page :<br>
<a href="http://bugzilla.gnome.org/attachment.cgi?id=126508&action=diff" target="_blank">http://bugzilla.gnome.org/attachment.cgi?id=126508&action=diff</a><br>
<br>
<br>
Et j'ai fait les modifications des fichiers gstdshowaudio.c et .h.<br>
J'ai ensuite créé les fichiers :<br>
- gstdshowaudiomixertrack.h<br>
- gstdshowaudiomixertrack.c<br>
- gstdshowaudiomixer.h<br>
- gstdshowaudiomixer.c<br>
<br>
Si je ne me trompe pas on en a besoin...<br>
<br>
Le problème est que lorsque je compile j'ai des erreurs du type :<br>
Erreur 3 error C2014: une commande de préprocesseur doit commencer comme<br>
premier espace autre que<br>
blanc c:\gstreamer-winbuild\gstreamer\gst-plugins-bad\sys\dshowsrcwrapper\gstdshowaudiomixer.h 164 libdshowsrcwrapper<br>
<br>
L'erreur est à cette ligne : interface_as_function ## _supported (Type<br>
*this, GType iface_type)<br>
<br>
Et donc à partir de là j'ai plein d'autres erreurs.<br>
<br>
Je ne comprends pas ce que je fais de mal.<br>
J'aurais voulu télécharger directement tes correctifs mais je n'ai pas pu.<br>
<br>
J'attends votre réponse, merci de m'aider.<br>
<br>
<br>
Cordialement,<br>
Lorenzo Cammilleri<br>
<br>
</blockquote></div><br><br><div class="gmail_quote">2009/3/18 Julien Isorce <span dir="ltr"><<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
it's a bug in the original dshowaudiosrc, <br><br>as you can see in around line 360 of <a href="http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/dshowsrcwrapper/gstdshowaudiosrc.c" target="_blank">http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/dshowsrcwrapper/gstdshowaudiosrc.c</a><br>
there is no PROP_DEVICE_NAME case in the switch.<br><pre><code>static void<br>gst_dshowaudiosrc_set_property (GObject * object, guint prop_id,<br> const GValue * value, GParamSpec * pspec)<br>{<br> GstDshowAudioSrc *src = GST_DSHOWAUDIOSRC (object);<br>
<br> switch (prop_id) {<br> case PROP_DEVICE:<br> {<br> if (src->device) {<br> g_free (src->device);<br> src->device = NULL;<br> }<br> if (g_value_get_string (value)) {<br> src->device = g_strdup (g_value_get_string (value));<br>
}<br> break;<br> }<br> default:<br> G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);<br> break;<br> }<br>}<br></code></pre>The fix is in the patch.<div><div></div><div class="h5"><br>
<br><div class="gmail_quote">2009/3/18 <span dir="ltr"><<a href="mailto:cammille@polytech.unice.fr" target="_blank">cammille@polytech.unice.fr</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In the sound properties on WIndows, my device to capture the sound is<br>
named : "Realtek HD Audio Input"<br>
<br>
So I try :<br>
gst-launch-0.10.exe dshowaudiosrc device-name="Realtek HD Audio Input" !<br>
audioconvert ! vorbisenc ! oggmux ! filesink location=bar.ogg<br>
<br>
But I have an error which is :<br>
** (gst-launch-0.10:77172): WARNING **:<br>
..\..\sys\dshowsrcwrapper\gstdshowaudios<br>
rc.c:378: invalid property id 2 for "device-name" of type `GParamString'<br>
in `Gst<br>
DshowAudioSrc'<br>
<div><div></div><div><br>
<br>
<br>
> 2009/3/18 <<a href="mailto:cammille@polytech.unice.fr" target="_blank">cammille@polytech.unice.fr</a>><br>
><br>
>> I would prefer to not recompile dshowaudiosrc if it's possible.<br>
>> My microphone is not muted. So I don't understand why it didn't work.<br>
>> With<br>
>> the windows magnetophone I can register my voice. Very strange...<br>
><br>
><br>
> Maybe how are not using the device you are excepting to use. In panel<br>
> configuration, sound, you can see if you have several audio devices. If<br>
> yes,<br>
> you have to set device name on dshowaudiosrc. (check the volume too)<br>
><br>
><br>
>> I don't find any information about property probe.. so I don't know how<br>
>> to<br>
>> use it.<br>
><br>
><br>
> gst doc.<br>
><br>
><br>
>><br>
>> > Hi,<br>
>> ><br>
>> > 2 solutions.<br>
>> ><br>
>> > ****The first one (user) is to click on volume icone from task bar<br>
>> then<br>
>> > Options->properties then select "Enregistrement" ("Recording") then<br>
>> select<br>
>> > microphone then OK then unmute microphone.<br>
>> ><br>
>> > ****The second solution (using code), is to recompile dshowaudiosrc<br>
>> using<br>
>> > this patch:<br>
>> > <a href="http://bugzilla.gnome.org/show_bug.cgi?id=517203" target="_blank">http://bugzilla.gnome.org/show_bug.cgi?id=517203</a> (just see the last<br>
>> post)<br>
>> ><br>
>> > Then the following code could be used to list, select and configure<br>
>> the<br>
>> > input channel of your choise (S/PDIF, lineIn, Mic etc..)<br>
>> ><br>
>> > ----------------------------- list audio input<br>
>> ------------------------<br>
>> > vector<string> listAudioInputs(const string audioDeviceName)<br>
>> > GstElement* audiodevicesrc = create_element("dshowaudiosrc",<br>
>> > "audiodevicesrc");<br>
>> > g_object_set(G_OBJECT(audiodevicesrc), "device-name",<br>
>> > audioDeviceName.c_str(), NULL);<br>
>> ><br>
>> > GstPad* pad = gst_element_get_static_pad (audiodevicesrc, "src");<br>
>> > gst_pad_get_caps (pad);<br>
>> > if (pad)<br>
>> > gst_object_unref(pad);<br>
>> ><br>
>> > vector<string> l_inputs;<br>
>> > GstMixer *mixer = GST_MIXER (audiodevicesrc);<br>
>> > const GList* list = gst_mixer_list_tracks (mixer);<br>
>> ><br>
>> > for (const GList* item = list; item != NULL; item = item->next)<br>
>> > {<br>
>> > GstMixerTrack *track = (GstMixerTrack*)item->data;<br>
>> > l_inputs.push_back(string(track->label));<br>
>> > }<br>
>> ><br>
>> > if (audiodevicesrc)<br>
>> > {<br>
>> > gst_element_set_state (audiodevicesrc, GST_STATE_NULL);<br>
>> > gst_object_unref(GST_OBJECT (audiodevicesrc));<br>
>> > }<br>
>> ><br>
>> > return l_inputs;<br>
>> > }<br>
>> ><br>
>> ------------------------------------------------------------------------------------------------------<br>
>> ><br>
>> > ---------------------------- select record input and set volume<br>
>> > -------------------------------------<br>
>> > void setAudioInput(const string audioInput, int volumePercentOfMax)<br>
>> > {<br>
>> > GstMixer *mixer = GST_MIXER (audiodevicesrc);<br>
>> > GstMixerTrack *track = NULL;<br>
>> > const GList* list = gst_mixer_list_tracks (mixer);<br>
>> > for (const GList* item = list; item != NULL; item = item->next)<br>
>> > {<br>
>> > GstMixerTrack *track_next = (GstMixerTrack*)item->data;<br>
>> > if (audioInput == std::string(track_next->label))<br>
>> > track = track_next;<br>
>> > else<br>
>> > //mute other audio inputs<br>
>> > gst_mixer_set_mute(mixer, track_next, TRUE);<br>
>> > }<br>
>> > if (track)<br>
>> > {<br>
>> > vector<gint> volumes(m_audioNbChannels, (gint)(volumePercentOfMax<br>
>> *<br>
>> > track->max_volume / 100.0));<br>
>> > gst_mixer_set_record (mixer, track, TRUE);<br>
>> > gst_mixer_set_volume (mixer, track, &volumes[0]);<br>
>> ><br>
>> > }<br>
>> > }<br>
>> ><br>
>> ><br>
>> ------------------------------------------------------------------------------------------------------<br>
>> ><br>
>> > They are some bad things in this code but the idea is there.<br>
>> ><br>
>> > You can also use property probe on dshowaudiosrc to list all the audio<br>
>> > device names installed on your system.<br>
>> ><br>
>> > J.<br>
>> ><br>
>> ><br>
>> > 2009/3/18 <<a href="mailto:cammille@polytech.unice.fr" target="_blank">cammille@polytech.unice.fr</a>><br>
>> ><br>
>> >> Hello,<br>
>> >><br>
>> >> I'm trying to use dshowaudiosrc on Windows but I have some problems.<br>
>> >><br>
>> >> For example, I try :<br>
>> >><br>
>> >> gst-launch-0.10.exe dshowaudiosrc ! audioconvert ! vorbisenc ! oggmux<br>
>> !<br>
>> >> filesink location=foo.ogg<br>
>> >><br>
>> >> And hen I talk in my micro the file foo.ogg is empty.<br>
>> >> I already verified if my micro functions correctly. It does.<br>
>> >><br>
>> >> If I try :<br>
>> >> gst-launch-0.10.exe audiotestsrc ! audioconvert ! vorbisenc ! oggmux<br>
>> !<br>
>> >> filesink location=foo.ogg it works !<br>
>> >><br>
>> >><br>
>> >> Where is the problem ?<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> ------------------------------------------------------------------------------<br>
>> >> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM)<br>
>> are<br>
>> >> powering Web 2.0 with engaging, cross-platform capabilities. Quickly<br>
>> and<br>
>> >> easily build your RIAs with Flex Builder, the Eclipse(TM)based<br>
>> >> development<br>
>> >> software that enables intelligent coding and step-through debugging.<br>
>> >> Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
>> >> _______________________________________________<br>
>> >> gstreamer-devel mailing list<br>
>> >> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
>> >> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
>> >><br>
>> ><br>
>> ------------------------------------------------------------------------------<br>
>> > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM)<br>
>> are<br>
>> > powering Web 2.0 with engaging, cross-platform capabilities. Quickly<br>
>> and<br>
>> > easily build your RIAs with Flex Builder, the Eclipse(TM)based<br>
>> development<br>
>> > software that enables intelligent coding and step-through debugging.<br>
>> > Download the free 60 day trial.<br>
>> ><br>
>> <a href="http://p.sf.net/sfu/www-adobe-com_______________________________________________" target="_blank">http://p.sf.net/sfu/www-adobe-com_______________________________________________</a><br>
>> > gstreamer-devel mailing list<br>
>> > <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
>> > <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
>> ><br>
>><br>
>><br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
>> easily build your RIAs with Flex Builder, the Eclipse(TM)based<br>
>> development<br>
>> software that enables intelligent coding and step-through debugging.<br>
>> Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
>> _______________________________________________<br>
>> gstreamer-devel mailing list<br>
>> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
>><br>
> ------------------------------------------------------------------------------<br>
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
> software that enables intelligent coding and step-through debugging.<br>
> Download the free 60 day trial.<br>
> <a href="http://p.sf.net/sfu/www-adobe-com_______________________________________________" target="_blank">http://p.sf.net/sfu/www-adobe-com_______________________________________________</a><br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
><br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>
easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>
software that enables intelligent coding and step-through debugging.<br>
Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com" target="_blank">http://p.sf.net/sfu/www-adobe-com</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>