search for: swfdec_type_net_stream

Displaying 14 results from an estimated 14 matches for "swfdec_type_net_stream".

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
...-#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_stream_set_playing (stream, TRUE); - return JS_TRUE; -} - -static JSBool -swfdec_js_net_stream_pause (JSCont...
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
...text *cx, SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { SwfdecNetStream *stream = SWFDEC_NET_STREAM (obj); @@ -119,6 +128,8 @@ swfdec_net_stream_init_context (SwfdecPl swfdec_net_stream_pause, 0); swfdec_as_object_add_function (proto, SWFDEC_AS_STR_play, SWFDEC_TYPE_NET_STREAM, swfdec_net_stream_play, 1); + swfdec_as_object_add_function (proto, SWFDEC_AS_STR_close, SWFDEC_TYPE_NET_STREAM, + swfdec_net_stream_close, 0); swfdec_as_object_add_function (proto, SWFDEC_AS_STR_seek, SWFDEC_TYPE_NET_STREAM, swfdec_net_stream_do_seek, 1); swfdec_as_objec...
2007 Jun 27
0
Branch 'as' - libswfdec/swfdec_as_strings.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
..._stream_do_seek (SwfdecAsConte swfdec_net_stream_seek (stream, d); } -#if 0 -static void -swfdec_net_stream_time (SwfdecAsContext *cx, SwfdecAsObject *obj, SwfdecAsValue id, SwfdecAsValue *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_JSVAL (0); - return JS_TRUE; - } - if (msecs >= stream->current_time) - msecs = 0; - else -...
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
..._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], &b)) + return JS_FALSE; + playing = !b; + } + g_print ("%s\n", playing ? "PLAY&...
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
...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_JSVAL (0); + return JS_TRUE; + } + if (msecs >= stream->current_time) + msecs = 0; + else +...
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
...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 JSFunctionSpec net_stream_methods[] = { - { "play", swfdec_js_net_stream_play, 1, 0, 0 },...
2007 Mar 01
0
7 commits - libswfdec/swfdec_connection.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h
...js_net_stream.c @@ -27,6 +27,23 @@ #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_stream_set_playing (stream, TRUE); + return JS_TRUE; +} + +static JSBool swfdec_js_net_stream_to_string (JS...
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
..._net_stream_parent_class)->dispose (object); } @@ -236,16 +238,35 @@ swfdec_net_stream_init (SwfdecNetStream } SwfdecNetStream * -swfdec_net_stream_new (SwfdecPlayer *player) +swfdec_net_stream_new (SwfdecPlayer *player, SwfdecConnection *conn) { - SwfdecNetStream *stream = g_object_new (SWFDEC_TYPE_NET_STREAM, NULL); + SwfdecNetStream *stream; + + g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); + g_return_val_if_fail (SWFDEC_IS_CONNECTION (conn), NULL); + stream = g_object_new (SWFDEC_TYPE_NET_STREAM, NULL); stream->player = player; + stream->conn = conn; + g_object_ref (conn)...
2007 Aug 22
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_script_function.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h
...c/swfdec_net_stream_as.c b/libswfdec/swfdec_net_stream_as.c index 46d607e..5aff00b 100644 --- a/libswfdec/swfdec_net_stream_as.c +++ b/libswfdec/swfdec_net_stream_as.c @@ -132,8 +132,10 @@ swfdec_net_stream_init_context (SwfdecPl swfdec_as_object_add_function (proto, SWFDEC_AS_STR_setBufferTime, SWFDEC_TYPE_NET_STREAM, swfdec_net_stream_setBufferTime, 1); SWFDEC_AS_VALUE_SET_OBJECT (&val, stream); - swfdec_as_object_set_variable (proto, SWFDEC_AS_STR_constructor, &val); + swfdec_as_object_set_variable_and_flags (proto, SWFDEC_AS_STR_constructor, + &val, SWFDEC_AS_VARIABLE_HIDDEN | SW...
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
...ream.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 JSFunctionSpec net_stream_methods[] = { { "pause", swfdec_js_net_stream_pause, 0, 0, 0 }, { &q...
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
...ext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + SwfdecNetStream *stream; + SwfdecVideoMovie *video; + + video = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_VIDEO_MOVIE); + if (video == NULL) + return JS_TRUE; + + stream = swfdec_scriptable_from_jsval (cx, argv[0], SWFDEC_TYPE_NET_STREAM); + if (stream != NULL) { + swfdec_video_movie_set_input (video, &stream->input); + return JS_TRUE; + } + swfdec_video_movie_set_input (video, NULL); + return JS_TRUE; +} + +static JSBool +swfdec_js_video_clear (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...bswfdec/swfdec_net_stream_as.c @@ -112,18 +112,15 @@ swfdec_net_stream_init_context (SwfdecPl g_return_if_fail (SWFDEC_IS_PLAYER (player)); context = SWFDEC_AS_CONTEXT (player); - stream = SWFDEC_AS_OBJECT (swfdec_as_object_add_function (context->global, - SWFDEC_AS_STR_NetStream, SWFDEC_TYPE_NET_STREAM, swfdec_net_stream_construct, 1)); + proto = swfdec_as_object_new_empty (context); + if (proto == NULL) + return; + stream = SWFDEC_AS_OBJECT (swfdec_as_object_add_constructor (context->global, + SWFDEC_AS_STR_NetStream, SWFDEC_TYPE_NET_STREAM, SWFDEC_TYPE_NET_STREAM, + swfdec_n...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...*rval) { + SwfdecVideoMovie *video = SWFDEC_VIDEO_MOVIE (obj); SwfdecNetStream *stream; - SwfdecVideoMovie *video; - - video = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_VIDEO_MOVIE); - if (video == NULL) - return JS_TRUE; - stream = swfdec_scriptable_from_jsval (cx, argv[0], SWFDEC_TYPE_NET_STREAM); - if (stream != NULL) { - swfdec_video_movie_set_input (video, &stream->input); - return JS_TRUE; + if (!SWFDEC_AS_VALUE_IS_OBJECT (&argv[0]) || + !SWFDEC_IS_NET_STREAM (stream = (SwfdecNetStream *) SWFDEC_AS_VALUE_GET_OBJECT (&argv[0]))) { + SWFDEC_WARNING ("c...
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
...*stream; - g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL); g_return_val_if_fail (SWFDEC_IS_CONNECTION (conn), NULL); + context = SWFDEC_AS_OBJECT (conn)->context; + if (!swfdec_as_context_use_mem (context, sizeof (SwfdecNetStream))) + return NULL; stream = g_object_new (SWFDEC_TYPE_NET_STREAM, NULL); - stream->player = player; + swfdec_as_object_add (SWFDEC_AS_OBJECT (stream), context, sizeof (SwfdecNetStream)); stream->conn = conn; - SWFDEC_SCRIPTABLE (stream)->jscx = player->jscx; - g_object_ref (conn); return stream; } diff --git a/libswfdec/swfdec_net_stream...