Setting volume for playbin

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting volume for playbin

Akbar Basha-2
Hi,
 
Is it possible to set the volume for Playbin element?
When I try to set the volume , says GstPlayBin has no property named.
 
Regards,
Akbar

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

Danilo Freire
yes, it is possible,
could you paste the code in here?

On Mon, Jul 21, 2008 at 6:22 AM, Akbar Basha <[hidden email]> wrote:
Hi,
 
Is it possible to set the volume for Playbin element?
When I try to set the volume , says GstPlayBin has no property named.
 
Regards,
Akbar

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

Ganesh Kundapur
I used the below code to set the volume.
  
        play = gst_element_factory_make ( "playbin", "play" );
        g_object_set ( G_OBJECT(play), "uri", argv[1], NULL );
        g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );

I muted the volume by using the volume control and played the audio file with volume range 1.0 and 10.0. I'm able to hear the sound but couldnt
make out the difference between the range 1.0 and 10.0 as the sound emitted for the range 1.0 and 10.0 seems to be same.

I raised the volume to the full by using volume control, i got the same behavior as above. It seems for the volume range 1.0 and 10.0, sound
is same. I could make a slight difference for the range 0.1/0.2.

  Moreover if i give the volume as int/unsigned int rather than double as g_object_set ( G_OBJECT(play), "volume", 3, NULL ); it throws a runtime error
(a.out:13506): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstPlayBin' has no property named `\x81\xc3\xdb\xc4\u0003'.

Is there any way to get/set the balance level?

/Ganesh



On Mon, Jul 21, 2008 at 6:53 PM, Danilo Freire <[hidden email]> wrote:
yes, it is possible,
could you paste the code in here?

On Mon, Jul 21, 2008 at 6:22 AM, Akbar Basha <[hidden email]> wrote:
Hi,
 
Is it possible to set the volume for Playbin element?
When I try to set the volume , says GstPlayBin has no property named.
 
Regards,
Akbar

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

Danilo Freire
thats weird,

The runtime error is because G_Obejct just check the property set when it is set.

but the problem with the volume change, I have no glue. try to run using:

gst_launch -v playbin uri=file:///somewhere volume=10.0

and look for some problem in the verbose messages. If necessary use:

GST_DEBUG=3 gst_launch playbin uri=file:///somewhere volume=10.0

[]s

On Tue, Jul 22, 2008 at 6:03 AM, Ganesh Kundapur <[hidden email]> wrote:
I used the below code to set the volume.
  
        play = gst_element_factory_make ( "playbin", "play" );
        g_object_set ( G_OBJECT(play), "uri", argv[1], NULL );
        g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );

I muted the volume by using the volume control and played the audio file with volume range 1.0 and 10.0. I'm able to hear the sound but couldnt
make out the difference between the range 1.0 and 10.0 as the sound emitted for the range 1.0 and 10.0 seems to be same.

I raised the volume to the full by using volume control, i got the same behavior as above. It seems for the volume range 1.0 and 10.0, sound
is same. I could make a slight difference for the range 0.1/0.2.

  Moreover if i give the volume as int/unsigned int rather than double as g_object_set ( G_OBJECT(play), "volume", 3, NULL ); it throws a runtime error
(a.out:13506): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstPlayBin' has no property named `\x81\xc3\xdb\xc4\u0003'.

Is there any way to get/set the balance level?

/Ganesh




On Mon, Jul 21, 2008 at 6:53 PM, Danilo Freire <[hidden email]> wrote:
yes, it is possible,
could you paste the code in here?

On Mon, Jul 21, 2008 at 6:22 AM, Akbar Basha <[hidden email]> wrote:
Hi,
 
Is it possible to set the volume for Playbin element?
When I try to set the volume , says GstPlayBin has no property named.
 
Regards,
Akbar

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

Akbar Basha-2
Sorry for the late reply as I was on vacation.
 
When i execute the following the code with volume as integer values gives the warning message without the sound. When the volume is either floating point or casting to double it plays perfectly.
 
g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );

It gives runtime error when  the volume type is unsigned int . Like the following code

unsigned int val = 8;
g_object_set ( G_OBJECT(play), "volume", val, NULL );

Where as in command line it works without any of the above hassles.,

 

Thanks,
Akbar

 
On 7/22/08, Danilo Freire <[hidden email]> wrote:
thats weird,

The runtime error is because G_Obejct just check the property set when it is set.

but the problem with the volume change, I have no glue. try to run using:

gst_launch -v playbin uri=file:///somewhere volume=10.0

and look for some problem in the verbose messages. If necessary use:

GST_DEBUG=3 gst_launch playbin uri=file:///somewhere volume=10.0

[]s


On Tue, Jul 22, 2008 at 6:03 AM, Ganesh Kundapur <[hidden email]> wrote:
I used the below code to set the volume.
  
        play = gst_element_factory_make ( "playbin", "play" );
        g_object_set ( G_OBJECT(play), "uri", argv[1], NULL );
        g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );

I muted the volume by using the volume control and played the audio file with volume range 1.0 and 10.0. I'm able to hear the sound but couldnt
make out the difference between the range 1.0 and 10.0 as the sound emitted for the range 1.0 and 10.0 seems to be same.

I raised the volume to the full by using volume control, i got the same behavior as above. It seems for the volume range 1.0 and 10.0, sound
is same. I could make a slight difference for the range 0.1/0.2.

  Moreover if i give the volume as int/unsigned int rather than double as g_object_set ( G_OBJECT(play), "volume", 3, NULL ); it throws a runtime error
(a.out:13506): GLib-GObject-WARNING **: IA__g_object_set_valist: object class `GstPlayBin' has no property named `\x81\xc3\xdb\xc4\u0003'.

Is there any way to get/set the balance level?

/Ganesh




On Mon, Jul 21, 2008 at 6:53 PM, Danilo Freire <[hidden email]> wrote:
yes, it is possible,
could you paste the code in here?

On Mon, Jul 21, 2008 at 6:22 AM, Akbar Basha <[hidden email]> wrote:
 
Hi,
 
Is it possible to set the volume for Playbin element?
When I try to set the volume , says GstPlayBin has no property named.
 
Regards,
Akbar

 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


 



--
Danilo Freire
Laboratório de Sistemas Embarcados e Computação Pervasiva
Centro de Engenharia Elétrica e Informática - CEEI
Universidade Federal de Campina Grande - UFCG


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

Stefan Sauer
Akbar Basha schrieb:

> Sorry for the late reply as I was on vacation.
>  
> When i execute the following the code with volume as integer
> values gives the warning message without the sound. When the volume is
> either floating point or casting to double it plays perfectly.
>  
> g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );
>
> It gives runtime error when  the volume type is unsigned int . Like
> the following code
>
> unsigned int val = 8;
> g_object_set ( G_OBJECT(play), "volume", val, NULL );
>
> Where as in command line it works without any of the above hassles.,
>
What is the problem here. This is to be expected. If you run "gst-inpect
playbin" and look for volume - it's double. g_object_set() is a varargs
function and parameters have to be in the right format (and terminated
with NULL). gst-launch is an entirely different thing. its a tool and it
tries to be helpful.

Stefan



>  
>
> Thanks,
> Akbar
>
>  
> On 7/22/08, *Danilo Freire* <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     thats weird,
>
>     The runtime error is because G_Obejct just check the property set
>     when it is set.
>
>     but the problem with the volume change, I have no glue. try to run
>     using:
>
>     gst_launch -v playbin uri=file:///somewhere volume=10.0
>
>     and look for some problem in the verbose messages. If necessary use:
>
>     GST_DEBUG=3 gst_launch playbin uri=file:///somewhere volume=10.0
>
>     []s
>
>
>     On Tue, Jul 22, 2008 at 6:03 AM, Ganesh Kundapur
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         I used the below code to set the volume.
>          
>                 play = gst_element_factory_make ( "playbin", "play" );
>                 g_object_set ( G_OBJECT(play), "uri", argv[1], NULL );
>                 g_object_set ( G_OBJECT(play), "volume", 10.0, NULL );
>
>         I muted the volume by using the volume control and played the
>         audio file with volume range 1.0 and 10.0. I'm able to hear
>         the sound but couldnt
>         make out the difference between the range 1.0 and 10.0 as the
>         sound emitted for the range 1.0 and 10.0 seems to be same.
>
>         I raised the volume to the full by using volume control, i got
>         the same behavior as above. It seems for the volume range 1.0
>         and 10.0, sound
>         is same. I could make a slight difference for the range 0.1/0.2.
>
>           Moreover if i give the volume as int/unsigned int rather
>         than double as g_object_set ( G_OBJECT(play), "volume", 3,
>         NULL ); it throws a runtime error
>         (a.out:13506): GLib-GObject-WARNING **:
>         IA__g_object_set_valist: object class `GstPlayBin' has no
>         property named `\x81\xc3\xdb\xc4\u0003'.
>
>         Is there any way to get/set the balance level?
>
>         /Ganesh
>
>
>
>
>         On Mon, Jul 21, 2008 at 6:53 PM, Danilo Freire
>         <[hidden email] <mailto:[hidden email]>> wrote:
>
>             yes, it is possible,
>             could you paste the code in here?
>
>             On Mon, Jul 21, 2008 at 6:22 AM, Akbar Basha
>             <[hidden email] <mailto:[hidden email]>> wrote:
>              
>
>                 Hi,
>                  
>                 Is it possible to set the volume for Playbin element?
>                 When I try to set the volume , says GstPlayBin has no
>                 property named.
>                  
>                 Regards,
>                 Akbar
>
>                  
>                 -------------------------------------------------------------------------
>                 This SF.Net email is sponsored by the Moblin Your Move
>                 Developer's challenge
>                 Build the coolest Linux based applications with Moblin
>                 SDK & win great prizes
>                 Grand prize is a trip for two to an Open Source event
>                 anywhere in the world
>                 http://moblin-contest.org/redirect.php?banner_id=100&url=/
>                 <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>                 _______________________________________________
>                 gstreamer-devel mailing list
>                 [hidden email]
>                 <mailto:[hidden email]>
>                 https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
>
>             --
>             Danilo Freire
>             Laboratório de Sistemas Embarcados e Computação Pervasiva
>             Centro de Engenharia Elétrica e Informática - CEEI
>             Universidade Federal de Campina Grande - UFCG
>
>             -------------------------------------------------------------------------
>             This SF.Net email is sponsored by the Moblin Your Move
>             Developer's challenge
>             Build the coolest Linux based applications with Moblin SDK
>             & win great prizes
>             Grand prize is a trip for two to an Open Source event
>             anywhere in the world
>             http://moblin-contest.org/redirect.php?banner_id=100&url=/
>             <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>             _______________________________________________
>             gstreamer-devel mailing list
>             [hidden email]
>             <mailto:[hidden email]>
>             https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>          
>
>
>
>
>     --
>     Danilo Freire
>     Laboratório de Sistemas Embarcados e Computação Pervasiva
>     Centro de Engenharia Elétrica e Informática - CEEI
>     Universidade Federal de Campina Grande - UFCG
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Setting volume for playbin

cristian
In reply to this post by Ganesh Kundapur
You must pus the object set in while(1) loop