Media Player development Questions

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

Media Player development Questions

Raj Swaminathan
Hi,

I am new to Glib programming and gstreamer. I am trying to build a basic media player application. So far i have gstreamer pipelines up and rendering various media formats.

My questions are:

1) Im trying to reference the gstalsamixer plugin for volume control and muting. I understand its an interface and im trying to find out whats the best way to access the interface methods like  gst_alsa_alsa_mixer_get_volume etc ...
    Could somebody please provide a code snippet that can show this ?

2) When designing the media player, whats the best way to accept user input. Do i spool a separate thread for rendering media while the main thread waits for user input or is there a better way within gstreamer to do this?


Thanks for your time.

regards,
raj

-------------------------------------------------------------------------
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: Media Player development Questions

Eric Zhang-6
Hi, Raj:

    To your second question, my way is: I encapsulated the gstreamer stuffs into a class(derived from GObject) and the GTK+ main program will construct this object and also the interface and accept user input. The gstreamer object will emit signals whenever there is something need to be shown in the interface.

Eric Zhang

2008/8/29 Raj Swaminathan <[hidden email]>
Hi,

I am new to Glib programming and gstreamer. I am trying to build a basic media player application. So far i have gstreamer pipelines up and rendering various media formats.

My questions are:

1) Im trying to reference the gstalsamixer plugin for volume control and muting. I understand its an interface and im trying to find out whats the best way to access the interface methods like  gst_alsa_alsa_mixer_get_volume etc ...
    Could somebody please provide a code snippet that can show this ?

2) When designing the media player, whats the best way to accept user input. Do i spool a separate thread for rendering media while the main thread waits for user input or is there a better way within gstreamer to do this?


Thanks for your time.

regards,
raj

-------------------------------------------------------------------------
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: Media Player development Questions

AJAY GAUTAM
In reply to this post by Raj Swaminathan
Hi Raj,
For first question i think this link will help you:
http://cmus.sourcearchive.com/documentation/2.0.4-1/mixer__alsa_8c-source.html


On Thu, Aug 28, 2008 at 11:38 PM, Raj Swaminathan <[hidden email]> wrote:
Hi,

I am new to Glib programming and gstreamer. I am trying to build a basic media player application. So far i have gstreamer pipelines up and rendering various media formats.

My questions are:

1) Im trying to reference the gstalsamixer plugin for volume control and muting. I understand its an interface and im trying to find out whats the best way to access the interface methods like  gst_alsa_alsa_mixer_get_volume etc ...
    Could somebody please provide a code snippet that can show this ?

2) When designing the media player, whats the best way to accept user input. Do i spool a separate thread for rendering media while the main thread waits for user input or is there a better way within gstreamer to do this?


Thanks for your time.

regards,
raj

-------------------------------------------------------------------------
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




--
Thanx & Regards
Ajay Gautam
+91-9741083000

-------------------------------------------------------------------------
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: Media Player development Questions

Tim-Philipp Müller-2
In reply to this post by Raj Swaminathan
On Thu, 2008-08-28 at 13:08 -0500, Raj Swaminathan wrote:

Hi,

> I am new to Glib programming and gstreamer. I am trying to build a
> basic media player application. So far i have gstreamer pipelines up
> and rendering various media formats.

For a media player you'll probably want to use playbin (or even
playbin2) from gst-plugins-base. There's no need to create your own
pipelines.


> 1) Im trying to reference the gstalsamixer plugin for volume control
> and muting. I understand its an interface and im trying to find out
> whats the best way to access the interface methods like
> gst_alsa_alsa_mixer_get_volume etc ...
>     Could somebody please provide a code snippet that can show this ?

For stream volume control you should use playbin's "volume" property.
The GStreamer mixer interface (GstMixer) is to control hardware mixer
levels, you usually don't want that in a playback application. It's also
not very nice to use. If you don't use playbin, add a volume element to
your pipeline (alternatively: audiosinks which support stream volumes
will also have a "volume" property).


> 2) When designing the media player, whats the best way to accept user
> input. Do i spool a separate thread for rendering media while the main
> thread waits for user input or is there a better way within gstreamer
> to do this?

GStreamer does all its playback in threads of its own anyway, so the
main thread is yours. All you need to do is check the
pipeline's/playbin's GstBus for messages (errors, tags, state changes)
from time to time.

Cheers
 -Tim




-------------------------------------------------------------------------
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
|

connect to certain channels on alsa or jack

Martin.Lehmann-2
Hey,

i want to connect to certain channels in a 56channels setup (using
either alsasink or jackaudiosink) in this case, when I have a
2channels-source.
e.g. connect to the 42nd and 43rd channel.

How does that work?!
I read something about pad_connect, but didn't find some useful
code-example.
Does anybody use such a great setup and could help me please?

Regards,
Martin

-------------------------------------------------------------------------
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: Media Player development Questions

Raj Swaminathan
In reply to this post by Tim-Philipp Müller-2
Tim,
I followed your suggestions ... got playbin and used its volume property. I also created a separate thread for running the gst loop and checking bus messages and so far things are good.
Thanks for your help.

Thanks Ajay, Eric for your suggestions too.

regards,
raj

Thanks for your responses. Sorry for getting back so late ...  just in from vacation...

>For stream volume control you should use playbin's "volume" property.
>The GStreamer mixer interface (GstMixer) is to control hardware mixer
>levels, you usually don't want that in a playback application. It's also
>not very nice to use. If you don't use playbin, add a volume element to
>your pipeline (alternatively: audiosinks which support stream volumes
>will also have a "volume" property).

Does this allow volume changing when the pipeline is playing .. if so how would you do that ?




On Mon, Sep 1, 2008 at 3:05 AM, Tim-Philipp Müller <[hidden email]> wrote:
On Thu, 2008-08-28 at 13:08 -0500, Raj Swaminathan wrote:

Hi,

> I am new to Glib programming and gstreamer. I am trying to build a
> basic media player application. So far i have gstreamer pipelines up
> and rendering various media formats.

For a media player you'll probably want to use playbin (or even
playbin2) from gst-plugins-base. There's no need to create your own
pipelines.



> 1) Im trying to reference the gstalsamixer plugin for volume control
> and muting. I understand its an interface and im trying to find out
> whats the best way to access the interface methods like
> gst_alsa_alsa_mixer_get_volume etc ...
>     Could somebody please provide a code snippet that can show this ?

For stream volume control you should use playbin's "volume" property.
The GStreamer mixer interface (GstMixer) is to control hardware mixer
levels, you usually don't want that in a playback application. It's also
not very nice to use. If you don't use playbin, add a volume element to
your pipeline (alternatively: audiosinks which support stream volumes
will also have a "volume" property).


> 2) When designing the media player, whats the best way to accept user
> input. Do i spool a separate thread for rendering media while the main
> thread waits for user input or is there a better way within gstreamer
> to do this?

GStreamer does all its playback in threads of its own anyway, so the
main thread is yours. All you need to do is check the
pipeline's/playbin's GstBus for messages (errors, tags, state changes)
from time to time.

Cheers
 -Tim




-------------------------------------------------------------------------
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