[Swfdec] can not find examples online
otte at gnome.org
Wed Sep 23 01:45:41 PDT 2009
You are right, the example does not work with HTTP urls. I didn't look
closely enough the first time.
I've fixed the example at
http://swfdec.freedesktop.org/wiki/SwfdecExamples now and attached the
fixed file here.
On Wed, Sep 23, 2009 at 10:16 AM, Ivaylo Strandjev <istrandjev at gmail.com> wrote:
> I just copy pasted the example source code and it does not open any
> online urls. I have tried the following:
> http://www.shockwave.com/content/blocky/sis/blocky.swf (that is found
> in the screenshots section and so I guessed is for sure able to open
> with swfdec),
> http://i.dir.bg/r2009/dsk/mobiDSK_DirBG_300_250_02.swf which is opened
> without any problem if I download the file to the computer and then
> pass it with file:// + location
> I just edited the source code of the example so that it prints "This
> is not a flash file!" if the if -clause on line 69 is true and it is
> printed after execution so I guess something is wrong. I am attaching
> the source code I use(although it is pretty much the one given here
> I would like to remind you that I am using Kubuntu 9.0.2. The compile
> command I use is
> g++ example.cpp
> -o run -I/home/astea/workspace/swfdec-0.9.2/ `pkg-config --cflags
> --libs --static cairo gdk-2.0 pango atk liboil-0.3 gdk-x11-2.0
> pangoft2` -lsoup-2.4 -lasound -lgtk-x11-2.0 -lgstbase-0.10
> Currently this uses swfdec-0.9.2 but I have tried the same example
> with the swfdec-devel package and there was no change again the
> program entered the same if clause.
> After I compile the command I type in for instance:
> ./run http://www.shockwave.com/content/blocky/sis/blocky.swf
> and get
> This is not a flash file!
> I tried the same if I save the .swf file on my computer and type:
> ./run file:///home/astea/download/blocky.swf
> and everything is fine the flash is opened.
> Am I doing something wrong? Or there is some other problem?
> 2009/9/21 Benjamin Otte <otte at gnome.org>:
>> the example definitely works with online URLs. Note that it uses
>> SwfdecGtkPlayer to do this, and not the default SwfdecPlayer.
>> The code that implements a custom loader using libsoup is in
>> swfdec-gtk/swfdec_gtk_loader.c. There are other examples on how to
>> write a custom loader (i.e. in the Mozilla plugin).
>> Hope that helps,
>> On Tue, Sep 15, 2009 at 3:35 PM, Ivaylo Strandjev <istrandjev at gmail.com> wrote:
>>> I have been struggling to get swfdec player work for some weeks but I
>>> couldn't find any examples online to help me. I already wrote I flash
>>> player that plays swf file from the local file system but I still can
>>> not open flash movies online. I read through the posts in this mailing
>>> list for some years ago and found a post where it is said that I need
>>> to create my own loader that swfdec_stream_push -es its data but I
>>> find the documentation on those classes rather vague and there are no
>>> examples available.
>>> Also i tried the example that is on swfdec wiki but it still does not
>>> open online url-s. After some debugging I found out that it enters the
>>> if (next < 0)
>>> /* not a flash file */
>>> fprintf(stderr,"this is not a flash file!\n");
>>> return 0;
>>> part. So even this example can not open online .swf files even though
>>> it says to be capable of. I am trying to build my application on linux
>>> 32/64 mac 32/64 and win 32/64 but the main platform i try it on is
>>> kubuntu 9.0.4 @ 64bit
>>> I would appreciate any help and some examples. Thank you for your time.
>>> Best regards,
>>> Swfdec mailing list
>>> Swfdec at lists.freedesktop.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2166 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/swfdec/attachments/20090923/9d871adc/attachment.c
More information about the Swfdec