search for: swfdecnetstream

Displaying 20 results from an estimated 41 matches for "swfdecnetstream".

2007 Jun 21
0
Branch 'as' - 5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_connection.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...ig.h" -#endif - -#include "swfdec_net_stream.h" -#include "swfdec_debug.h" -#include "swfdec_js.h" -#include "swfdec_player_internal.h" - -static JSBool -swfdec_js_net_stream_play (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - SwfdecNetStream *stream; - const char *url; - - stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); - if (stream == NULL) - return JS_TRUE; - url = swfdec_js_to_string (cx, argv[0]); - if (url == NULL) - return JS_FALSE; - swfdec_net_stream_set_url (stream, url); - swfdec_net_str...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...erval)->context; SwfdecPlayer *player = SWFDEC_PLAYER (context); diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c index b822991..35c8c8e 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -159,7 +159,7 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) static void swfdec_net_stream_timeout (SwfdecTimeout *timeout) { - SwfdecNetStream *stream = SWFDEC_NET_STREAM ((guchar *) timeout - G_STRUCT_OFFSET (SwfdecNetStream, timeout)); + SwfdecNetStream *stream = SWFDEC_NET_STREAM ((void *) ((guchar *) timeout - G_STRUCT_OFF...
2007 Mar 14
0
10 commits - libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_js_global.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loadertarget.c
...dc 100644 --- a/libswfdec/swfdec_js_net_stream.c +++ b/libswfdec/swfdec_js_net_stream.c @@ -43,8 +43,24 @@ swfdec_js_net_stream_play (JSContext *cx return JS_TRUE; } +static JSBool +swfdec_js_net_stream_set_buffer_time (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + SwfdecNetStream *stream; + double d; + + stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); + if (stream == NULL) + return JS_TRUE; + if (!JS_ValueToNumber (cx, argv[0], &d)) + return JS_FALSE; + swfdec_net_stream_set_buffer_time (stream, d); + return JS_TRUE; +} + static JS...
2007 Jun 27
0
Branch 'as' - libswfdec/swfdec_as_strings.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...wfdec_net_stream.c @@ -327,6 +327,49 @@ swfdec_net_stream_dispose (GObject *obje G_OBJECT_CLASS (swfdec_net_stream_parent_class)->dispose (object); } +static gboolean +swfdec_net_stream_get_variable (SwfdecAsObject *object, const char *variable, + SwfdecAsValue *val, guint *flags) +{ + SwfdecNetStream *stream; + + if (SWFDEC_AS_OBJECT_CLASS (swfdec_net_stream_parent_class)->get (object, variable, val, flags)) + return TRUE; + + stream = SWFDEC_NET_STREAM (object); + /* FIXME: need case insensitive comparisons? */ + if (variable == SWFDEC_AS_STR_time) { + guint msecs; + if (stream...
2007 Mar 01
0
11 commits - libswfdec/Makefile.am libswfdec/swfdec_connection.c libswfdec/swfdec_connection.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js.h libswfdec/swfdec_js_net_stream.c
...eturn JS_FALSE; + + *rval = STRING_TO_JSVAL (string); + return JS_TRUE; +} + +static JSFunctionSpec net_stream_methods[] = { + { "toString", swfdec_js_net_stream_to_string, 0, 0, 0 }, + {0,0,0,0,0} +}; + +static void +swfdec_js_net_stream_finalize (JSContext *cx, JSObject *obj) +{ + SwfdecNetStream *stream; + + stream = JS_GetPrivate (cx, obj); + if (stream) { + SWFDEC_SCRIPTABLE (stream)->jsobj = NULL; + g_object_unref (stream); + } +} + +static JSClass net_stream_class = { + "NetStream", JSCLASS_HAS_PRIVATE, + JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,...
2007 Jun 27
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_video.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_video_movie_as.c libswfdec/swfdec_video_movie.c
...ug.h" -#include "swfdec_net_stream.h" -#include "swfdec_player_internal.h" - -static void -swfdec_video_attach_video (SwfdecAsContext *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) -{ - SwfdecVideoMovie *video = SWFDEC_VIDEO_MOVIE (obj); - SwfdecNetStream *stream; - - if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) || - !SWFDEC_IS_NET_STREAM (stream = (SwfdecNetStream *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) { - SWFDEC_WARNING ("calling attachVideo without a NetStraem object"); - swfdec_video_movie_set_input (video, NULL);...
2007 Mar 02
0
12 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_js_video.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h
...;stopping playback\n"); if (stream->audio) { SWFDEC_LOG ("stopping audio"); swfdec_audio_remove (stream->audio); @@ -147,11 +145,14 @@ static gboolean swfdec_net_stream_loader_target_set_decoder (SwfdecLoaderTarget *target, SwfdecDecoder *decoder) { + SwfdecNetStream *stream = SWFDEC_NET_STREAM (target); + if (!SWFDEC_IS_FLV_DECODER (decoder)) { g_object_unref (decoder); return FALSE; } - SWFDEC_NET_STREAM (target)->flvdecoder = SWFDEC_FLV_DECODER (decoder); + stream->flvdecoder = SWFDEC_FLV_DECODER (decoder); + swfdec_net_stream_update...
2007 Mar 22
0
11 commits - libswfdec/swfdec_color.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_net_stream.h libswfdec/swfdec_pattern.c libswfdec/swfdec_script.c NEWS test/trace
...7ea8..873f673 100644 --- a/libswfdec/swfdec_js_net_stream.c +++ b/libswfdec/swfdec_js_net_stream.c @@ -80,9 +80,25 @@ swfdec_js_net_stream_set_buffer_time (JS return JS_TRUE; } +static JSBool +swfdec_js_net_stream_seek (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + SwfdecNetStream *stream; + double d; + + stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); + if (stream == NULL) + return JS_TRUE; + if (!JS_ValueToNumber (cx, argv[0], &d)) + return JS_FALSE; + swfdec_net_stream_seek (stream, d); + return JS_TRUE; +} + static JSFunctionSpe...
2007 Aug 08
0
6 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...16876 100644 --- a/libswfdec/swfdec_net_stream_as.c +++ b/libswfdec/swfdec_net_stream_as.c @@ -30,6 +30,15 @@ #include "swfdec_player_internal.h" static void +swfdec_net_stream_close (SwfdecAsContext *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) +{ + SwfdecNetStream *stream = SWFDEC_NET_STREAM (obj); + + swfdec_net_stream_set_loader (stream, NULL); + swfdec_net_stream_set_playing (stream, TRUE); +} + +static void swfdec_net_stream_play (SwfdecAsContext *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecNetStream *str...
2007 Mar 19
0
7 commits - libswfdec/jpeg libswfdec/swfdec_button_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_video.c player/swfdec_debug_movies.c
...stream.c index 46cb1dc..8348279 100644 --- a/libswfdec/swfdec_js_net_stream.c +++ b/libswfdec/swfdec_js_net_stream.c @@ -44,6 +44,28 @@ swfdec_js_net_stream_play (JSContext *cx } static JSBool +swfdec_js_net_stream_pause (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + SwfdecNetStream *stream; + gboolean playing; + + stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); + if (stream == NULL) + return JS_TRUE; + if (argc == 0) { + playing = !swfdec_net_stream_get_playing (stream); + } else { + JSBool b; + if (!JS_ValueToBoolean (cx, argv[0], &...
2008 Jun 15
1
14 commits - configure.ac swfdec/.gitignore swfdec-gtk/swfdec_gtk_loader.c swfdec-gtk/swfdec_playback_alsa.c swfdec/Makefile.am swfdec/swfdec_asnative.h swfdec/swfdec_as_string.c swfdec/swfdec_audio.c swfdec/swfdec_audio_load.c swfdec/swfdec_audio_load.h
...git a/swfdec/swfdec_net_stream.c b/swfdec/swfdec_net_stream.c index 6d6896f..70fdbb3 100644 --- a/swfdec/swfdec_net_stream.c +++ b/swfdec/swfdec_net_stream.c @@ -570,14 +570,13 @@ swfdec_net_stream_load (SwfdecPlayer *player, gboolean allowed, gpointer streamp } void -swfdec_net_stream_set_url (SwfdecNetStream *stream, SwfdecSandbox *sandbox, const char *url_string) +swfdec_net_stream_set_url (SwfdecNetStream *stream, const char *url_string) { SwfdecPlayer *player; SwfdecAsContext *cx; - SwfdecURL *url; g_return_if_fail (SWFDEC_IS_NET_STREAM (stream)); - g_return_if_fail (SWFDEC_IS_SANDBOX...
2007 Dec 29
3
[Bug 13855] New: Assertion failure at the end of a movie
http://bugs.freedesktop.org/show_bug.cgi?id=13855 Summary: Assertion failure at the end of a movie Product: swfdec Version: 0.5.5 Platform: x86-64 (AMD64) URL: http://www.csfd.cz/film/224182-ja-legenda-i-am- legend/trailer/ OS/Version: Linux (All) Status: NEW Severity: major
2007 Nov 08
0
11 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c libswfdec/swfdec_resource_request.c
...bb34..d4ac232 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -469,22 +469,11 @@ swfdec_net_stream_new (SwfdecNetConnection *conn) return stream; } -static void -swfdec_net_stream_got_loader (SwfdecPlayer *player, SwfdecLoader *loader, gpointer streamp) -{ - SwfdecNetStream *stream = SWFDEC_NET_STREAM (streamp); - - if (loader == NULL || SWFDEC_AS_OBJECT (stream)->context == NULL) - return; - - swfdec_net_stream_set_loader (stream, loader); - g_object_unref (loader); -} - void swfdec_net_stream_set_url (SwfdecNetStream *stream, const char *url) { Swfdec...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...ec/swfdec_net_stream.c @@ -28,36 +28,25 @@ #include "swfdec_debug.h" #include "swfdec_loader_internal.h" #include "swfdec_loadertarget.h" -#include "js/jsapi.h" +/* NB: code and level must be rooted gc-strings */ static void swfdec_net_stream_onstatus (SwfdecNetStream *stream, const char *code, const char *level) { - jsval val; - JSString *string; - JSObject *object; - JSContext *cx; + SwfdecAsValue val; + SwfdecAsObject *object; - SWFDEC_INFO ("emitting onStatus for %s %s", level, code); - cx = stream->player->jscx; - object = JS_New...
2007 Aug 01
0
9 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_frame.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_loadertarget.c libswfdec/swfdec_loadertarget.h libswfdec/swfdec_movie.c
...ec_net_stream.c index 2734ec6..6f266b7 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -193,6 +193,37 @@ swfdec_net_stream_loader_target_get_play } static void +swfdec_net_stream_loader_target_error (SwfdecLoaderTarget *target, + SwfdecLoader *loader) +{ + SwfdecNetStream *stream = SWFDEC_NET_STREAM (target); + + if (stream->flvdecoder == NULL) + swfdec_net_stream_onstatus (stream, SWFDEC_AS_STR_NetStream_Play_StreamNotFound, + SWFDEC_AS_STR_error); +} + +static void +swfdec_net_stream_loader_target_recheck (SwfdecNetStream *stream) +{ + if (stream->buffe...
2007 Dec 13
0
2 commits - libswfdec/swfdec_flash_security.c libswfdec/swfdec_flash_security.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_resource_request.c libswfdec/swfdec_resource_request.h libswfdec/swfdec_security.h
...c_flash_security_free_pending (SwfdecFlashSecurity * sec); G_END_DECLS diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c index 35c8c8e..775974a 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -494,7 +494,7 @@ swfdec_net_stream_set_url (SwfdecNetStream *stream, const char *url) g_assert (cx->frame); swfdec_player_request_resource_now (SWFDEC_PLAYER (cx), cx->frame->security, url, SWFDEC_LOADER_REQUEST_DEFAULT, NULL, - swfdec_net_stream_request_callback, stream); + swfdec_net_stream_request_callback, NULL, stream);...
2007 Nov 12
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_decoder.c libswfdec/swfdec_decoder.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_image.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_image_decoder.h
...) diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c index ebd19ba..bb8e8b9 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -260,7 +260,6 @@ swfdec_net_stream_loader_target_parse (SwfdecLoaderTarget *target, SwfdecLoader *loader) { SwfdecNetStream *stream = SWFDEC_NET_STREAM (target); - SwfdecDecoderClass *klass; SwfdecStatus status; if (loader->state != SWFDEC_LOADER_STATE_EOF && swfdec_buffer_queue_get_depth (loader->queue) == 0) { @@ -275,8 +274,6 @@ swfdec_net_stream_loader_target_parse (SwfdecLoaderTarget *targe...
2007 Mar 20
0
5 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_net_stream.c
...m_pause, 0, 0, 0 }, { "play", swfdec_js_net_stream_play, 1, 0, 0 }, { "setBufferTime", swfdec_js_net_stream_set_buffer_time, 1, 0, 0 }, - {0,0,0,0,0} + { NULL } +}; + +static JSBool +swfdec_js_net_stream_time (JSContext *cx, JSObject *obj, jsval id, jsval *vp) +{ + SwfdecNetStream *stream; + guint msecs; + + stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); + if (stream == NULL) + return JS_TRUE; + + if (stream->flvdecoder == NULL || + !swfdec_flv_decoder_get_video_info (stream->flvdecoder, &msecs, NULL)) { + *vp = INT_TO_JSVA...
2007 Nov 01
0
3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
..._resource_request.h" /* NB: code and level must be rooted gc-strings */ static void @@ -482,21 +484,33 @@ swfdec_net_stream_new (SwfdecNetConnection *conn) return stream; } +static void +swfdec_net_stream_got_loader (SwfdecPlayer *player, SwfdecLoader *loader, gpointer streamp) +{ + SwfdecNetStream *stream = SWFDEC_NET_STREAM (streamp); + + if (loader == NULL || SWFDEC_AS_OBJECT (stream)->context == NULL) + return; + + swfdec_net_stream_set_loader (stream, loader); + g_object_unref (loader); +} + void swfdec_net_stream_set_url (SwfdecNetStream *stream, const char *url) { - Swfdec...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...problems: - must decode whole movie when going one frame backwards diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c index 135bae8..c401125 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -115,7 +115,7 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp) if (stream->surface) { GList *walk; for (walk = stream->movies; walk; walk = walk->next) { - swfdec_video_movie_new_image (walk->data, stream->surface); + swfdec_video_movie_new_image (walk->data); } } } @@ -350,6 +350,14...