thanks for your quick response ! I am using curl as my net lib and will try it . <br><br><div class="gmail_quote">On Mon, Apr 26, 2010 at 4:44 AM, Benjamin Otte <span dir="ltr">&lt;<a href="mailto:otte@gnome.org">otte@gnome.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Your SwfdecPlayer subclass needs to use a SwfdecLoader that can parse<br>
HTTP urls. The default implementation can only open file:// urls.<br>
But the code in swfdec-gtk/swfdec_gtk_loader.c contains an<br>
implementation that uses GNOME&#39;s libsoup for this purpose. You can<br>
cut&#39;n&#39;paste this code if you want. It doesn&#39;t use gtk, but it does use<br>
libsoup. Or you can write your own using any HTTP library that you<br>
want.<br>
<br>
Benjamin<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Apr 26, 2010 at 10:04 AM, myopc myopc &lt;<a href="mailto:myopc.hi@gmail.com">myopc.hi@gmail.com</a>&gt; wrote:<br>
&gt; hi,all<br>
&gt;     anyone know how to make a swf player without gtk ? I have written one<br>
&gt; but it can parse only simple files, url like &#39;http://...&quot; fails (but the gtk<br>
&gt; sample can do) ?<br>
&gt;     My code is like this:<br>
&gt;<br>
&gt;     swfdec_player_set_url(player, url);<br>
&gt;     swfdec_url_free(url);<br>
&gt;     while (!swfdec_player_is_initialized(player)) {<br>
&gt;         glong next;<br>
&gt;         next = swfdec_player_get_next_event(player);<br>
&gt;         LOGD(&quot;parser header ... %d&quot;, next);<br>
&gt;         if (next &lt; 0) {  //????<br>
&gt;             //LOGE(&quot;swfdec_player_get_next_event: no evt&quot;);<br>
&gt;             return 1;<br>
&gt;         }<br>
&gt;         swfdec_player_advance(player, next);<br>
&gt;     }<br>
&gt;     swfdec_player_get_default_size(player, &amp;width, &amp;height);<br>
&gt;     LOGI(&quot;w/h: %u/%u, backgroud color: %u, rate: %f&quot;,<br>
&gt;             width,height,<br>
&gt;             swfdec_player_get_background_color(player),<br>
&gt;             swfdec_player_get_rate(player));<br>
&gt;<br>
&gt;     bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0);<br>
&gt;     mysurface = cairo_image_surface_create_for_data(<br>
&gt;             (unsigned char*) bitmap.getPixels(), CAIRO_FORMAT_ARGB32, width,<br>
&gt;             height, bitmap.rowBytes());<br>
&gt;     cr = cairo_create(mysurface);<br>
&gt;     ren = swfdec_renderer_new_for_player(mysurface, player);<br>
&gt;     swfdec_player_set_renderer(player, ren);<br>
&gt;     cairo_surface_destroy(mysurface);<br>
&gt;     cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);<br>
&gt;     cairo_set_tolerance(cr, 0.50);<br>
&gt;     time_t now = time(0);<br>
&gt;     while (1) {<br>
&gt;         if (time(0) - now &gt;= 10)<br>
&gt;             break;<br>
&gt;         //sleep(1); // dummy loop<br>
&gt;         //LOGD(&quot;do frame&quot;);<br>
&gt;         swfdec_player_advance(player, 100);<br>
&gt;         swfdec_player_render(player, cr);<br>
&gt;     }<br>
&gt;<br>
&gt; swfdec_player_get_next_event will return 0/-1 when urls like &#39;http://...&#39;,<br>
&gt; I dont know what to do with this.<br>
&gt; any comment will be appreciated, thanks !<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Best Regards.<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Swfdec mailing list<br>
&gt; <a href="mailto:Swfdec@lists.freedesktop.org">Swfdec@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/swfdec" target="_blank">http://lists.freedesktop.org/mailman/listinfo/swfdec</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br><br>--<br>Best Regards.<br><br>