Re: GtkMediaPlayer widget

Lee Braiden wrote:

Well, simply in terms of a PLAY command... how would you do that? To me, you either use an existing framework directly, including it's enumerations etc, or you wrap it, and create a level of abstraction.

You override the GtkMediaPlayer::Play function with your own implementation. Something like this:

static void
hx_player_class_init(GtkHXPlayerClass* klass)
   GtkMediaPlayerClass* media_player_class = GTK_MEDIA_PLAYER_CLASS(klass);

   media_player_class->play = hx_player_play;

I believe GtkMediaPlayer would have a gtk_media_player_play that emits a play signal, and a gtk_media_player_real_play that provides a default implementation.

For me, the best case scenario is a well-defined, clean API for a multimedia framework like gstreamer, and (perhaps) some system in GTK to integrate that framework.

s/gstreamer/helix/g for me.

Ideally, you would not be telling GTK to play it, but simply asking GTK to embed it, and give you a handle for the media framework's object. Then, you use the already well-defined gstreamer API to actually manipulate that object, knowing it will work 100% within GTK.

We do XEmbed with our mozilla plugin. Having a widget interface makes things a lot simpler. Consider the embedded developer working with gtk on the framebuffer, for instance. A complex embedding framework isn't going to work for him.

Whatever way I look at it, I can't imagine a way to provide a standardised GTKMediaWidget that can be implemented by two different frameworks without requiring abstraction of some (significant) level.

I can go into more details if you'd like. Helix would provide a library that contains an implementation of GtkMediaPlayer, and a set of supporting functions for advanced functionality.

All I can imagine is that this is some attempt to establish a Helix-based player as a de-facto standard by putting it into GTK first.

This is a sincere effort to make media widgets easier to use with gtk, and it would benefit both gstreamer and helix.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]