[Swfdec] Can the Swfdec without the gtk?

Benjamin Otte otte at gnome.org
Wed Nov 5 13:45:25 PST 2008


Hey!

Yes, Swfdec does work without Gtk. For examples, you can look at the
thumbnailer in swfdec-gnome, our test framework or swfdec-directfb.
However, you'll have to do quite a bit more work to get a smooth
animation displayed, as Gtk is taking care of that: It calls
swfdec_player_advance() at the right speed, invalidates the screen
when things change and all these things.
But Swfdec was designed explicitly to work without Gtk, so it's easy
to integrate into applications that run without an X server
(thumbnailer, GStreamer, DirectFB).

Cheers,
Benjamin

On Wed, Nov 5, 2008 at 10:55 AM, Steven Liu <lingjiujianke at gmail.com> wrote:
> Hi,all!
>
>        I'm a new user of swfdec,I'm learning the swfdec,I'v saw the
> configure can disable the gtk! but how to develop the flashplayer? I'v
> saw the "SWFDEC Examples",but it was written by gtk.it used
> swfdec-gtk.Is there have some example without swfdec-gtk?
> for example:
>     SwfdecPlayer* player;
>     player = swfdec_player_new (NULL);
>     SwfdecURL* url = swfdec_url_new(argv[1]);
>     swfdec_player_set_url(player,url);
>       while (!swfdec_player_is_initialized (player))
>  {
>      long next = swfdec_player_get_next_event (player);
>      if (next < 0)
>      {
>          /* not a flash file */
>          return 0;
>      }
>      swfdec_player_advance (player, next);
>  }
>   swfdec_player_get_maximum_runtime (player);
>       guint h,w;
>    swfdec_player_get_default_size(player,&h,&w);
> swfdec_player_get_background_color(player);
> swfdec_player_get_rate(player);
>
>
>
> but how to play the flash use only the libswfdec?
> _______________________________________________
> Swfdec mailing list
> Swfdec at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/swfdec
>


More information about the Swfdec mailing list