search for: flvdecod

Displaying 20 results from an estimated 26 matches for "flvdecod".

Did you mean: flvdecoder
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
...dec_flv_decoder.c b/libswfdec/swfdec_flv_decoder.c index da311d4..530915d 100644 --- a/libswfdec/swfdec_flv_decoder.c +++ b/libswfdec/swfdec_flv_decoder.c @@ -424,6 +424,29 @@ swfdec_flv_decoder_get_video (SwfdecFlvD return tag->buffer; } +gboolean +swfdec_flv_decoder_get_video_info (SwfdecFlvDecoder *flv, + guint *first_timestamp, guint *last_timestamp) +{ + g_return_val_if_fail (SWFDEC_IS_FLV_DECODER (flv), FALSE); + + if (flv->video == NULL) + return FALSE; + + if (flv->video->len == 0) { + if (first_timestamp) + *first_timestamp = 0; + if (last_timestamp) +...
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
...{ 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 - msecs = stream->current_time - msecs; - - return JS_NewNumberValue...
2007 Jun 27
0
Branch 'as' - libswfdec/swfdec_as_strings.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...eam; + + 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->flvdecoder == NULL || + !swfdec_flv_decoder_get_video_info (stream->flvdecoder, &msecs, NULL)) { + SWFDEC_AS_VALUE_SET_INT (val, 0); + } else { + if (msecs >= stream->current_time) + msecs = 0; + else + msecs = stream->current_time - msecs; + } + SWFDEC_AS_VALUE_SET_...
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
...tream.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->buffering) { + guint first, last; + if (swfdec_flv_decoder_get_vid...
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
....c b/libswfdec/swfdec_net_stream.c index 09239e2..2bc6b23 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -254,11 +254,16 @@ swfdec_net_stream_loader_target_parse (S } out: if (loader->eof) { + guint first, last; swfdec_flv_decoder_eof (stream->flvdecoder); recheck = TRUE; swfdec_net_stream_onstatus (stream, "NetStream.Buffer.Flush", "status"); swfdec_net_stream_video_goto (stream, stream->current_time); stream->buffering = FALSE; + if (swfdec_flv_decoder_get_video_info (stream->flvdecoder, &...
2007 Mar 16
0
libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h libswfdec/swfdec_loader_internal.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_xml.c
...const char * error); diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c index 8840d78..1e69ac3 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -200,6 +200,7 @@ swfdec_net_stream_loader_target_parse (S SWFDEC_DECODER (stream->flvdecoder)->player = stream->player; SWFDEC_DECODER (stream->flvdecoder)->queue = loader->queue; swfdec_net_stream_onstatus (stream, "NetStream.Play.Start", "status"); + swfdec_loader_set_data_type (loader, SWFDEC_LOADER_DATA_FLV); } klass = SWFDEC_DECO...
2007 Mar 20
0
2 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_net_stream.c
....09239e2 100644 --- a/libswfdec/swfdec_net_stream.c +++ b/libswfdec/swfdec_net_stream.c @@ -164,10 +164,10 @@ swfdec_net_stream_update_playing (Swfdec { gboolean should_play; - should_play = stream->playing; - should_play &= !stream->buffering; - should_play &= stream->flvdecoder != NULL; - //should_play &= stream->next_time > stream->current_time; + should_play = stream->playing; /* checks user-set play/pause */ + should_play &= !stream->buffering; /* checks enough data is available */ + should_play &= stream->flvdecoder != NULL; /* chec...
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
...uot; @@ -174,6 +175,7 @@ swfdec_net_stream_update_playing (Swfdec stream->timeout.timestamp = stream->player->time + SWFDEC_MSECS_TO_TICKS (stream->next_time - stream->current_time); swfdec_player_add_timeout (stream->player, &stream->timeout); if (stream->flvdecoder->audio) { + g_assert (stream->audio == NULL); SWFDEC_LOG ("starting audio"); stream->audio = swfdec_audio_flv_new (stream->player, stream->flvdecoder, stream->current_time); @@ -447,3 +449,40 @@ swfdec_net_stream_get_buffer_time (Swfde return...
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
...always be 0 in both audio and video streams diff --git a/libswfdec/swfdec_flv_decoder.c b/libswfdec/swfdec_flv_decoder.c index 31834a2..831641f 100644 --- a/libswfdec/swfdec_flv_decoder.c +++ b/libswfdec/swfdec_flv_decoder.c @@ -392,22 +392,33 @@ SwfdecBuffer * swfdec_flv_decoder_get_video (SwfdecFlvDecoder *flv, guint timestamp, gboolean keyframe, SwfdecVideoFormat *format, guint *real_timestamp, guint *next_timestamp) { - guint id; + guint id, offset; SwfdecFlvVideoTag *tag; g_return_val_if_fail (SWFDEC_IS_FLV_DECODER (flv), NULL); g_return_val_if_fail (flv->video != NULL, NU...
2007 Nov 07
0
7 commits - doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_decoder.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
...V_DECODER, NULL); +#endif } else { retval = NULL; } diff --git a/libswfdec/swfdec_flv_decoder.c b/libswfdec/swfdec_flv_decoder.c index 4ba427e..81e7e36 100644 --- a/libswfdec/swfdec_flv_decoder.c +++ b/libswfdec/swfdec_flv_decoder.c @@ -594,27 +594,6 @@ swfdec_flv_decoder_get_data (SwfdecFlvDecoder *flv, guint timestamp, guint *real return tag->buffer; } -/*** HACK ***/ - -/* This is a hack to allow native FLV playback IN SwfdecPlayer */ - -#include "swfdec_loadertarget.h" -#include "swfdec_net_stream.h" -#include "swfdec_sprite.h" -#include "swfd...
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
...&& swfdec_buffer_queue_get_depth (loader->queue) == 0) { @@ -275,8 +274,6 @@ swfdec_net_stream_loader_target_parse (SwfdecLoaderTarget *target, SWFDEC_AS_STR_status); swfdec_loader_set_data_type (loader, SWFDEC_LOADER_DATA_FLV); } - klass = SWFDEC_DECODER_GET_CLASS (stream->flvdecoder); - g_return_if_fail (klass->parse); status = SWFDEC_STATUS_OK; do { @@ -284,7 +281,7 @@ swfdec_net_stream_loader_target_parse (SwfdecLoaderTarget *target, if (buffer == NULL) break; status &= ~SWFDEC_STATUS_NEEDBITS; - status |= klass->parse (SWFDEC_DECODER...
2007 Mar 20
0
4 commits - libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_movie.c test/trace
...fdec/swfdec_flv_decoder.c @@ -656,8 +656,8 @@ swfdec_flv_decoder_add_movie (SwfdecFlvD /* set up the playback stream */ conn = swfdec_connection_new (SWFDEC_ROOT_MOVIE (parent)->player->jscx); stream = swfdec_net_stream_new (SWFDEC_ROOT_MOVIE (parent)->player, conn); - stream->flvdecoder = flv; swfdec_net_stream_set_loader (stream, SWFDEC_ROOT_MOVIE (parent)->loader); + stream->flvdecoder = flv; swfdec_video_movie_set_input (SWFDEC_VIDEO_MOVIE (movie), &stream->input); swfdec_net_stream_set_playing (stream, TRUE); g_object_unref (conn); diff-tree f0b43bf...
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
..., GParamSpec *pspec, SwfdecVideoMovie *movie) { @@ -623,6 +624,7 @@ notify_initialized (SwfdecPlayer *player swfdec_movie_queue_update (SWFDEC_MOVIE (movie), SWFDEC_MOVIE_INVALID_MATRIX); swfdec_movie_invalidate (SWFDEC_MOVIE (movie)); } +#endif gboolean swfdec_flv_decoder_is_eof (SwfdecFlvDecoder *flv) @@ -643,6 +645,8 @@ swfdec_flv_decoder_eof (SwfdecFlvDecoder SwfdecMovie * swfdec_flv_decoder_add_movie (SwfdecFlvDecoder *flv, SwfdecMovie *parent) { + g_assert_not_reached (); +#if 0 SwfdecContent *content = swfdec_content_new (0); SwfdecMovie *movie; SwfdecVideo *video; @@ -...
2007 Nov 07
0
36 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h
...>data = NULL; } - + swfdec_buffer_queue_unref (flv->queue); + flv->queue = NULL; G_OBJECT_CLASS (swfdec_flv_decoder_parent_class)->dispose (object); } @@ -96,14 +97,12 @@ swfdec_flv_decoder_dispose (GObject *object) static SwfdecStatus swfdec_flv_decoder_parse_header (SwfdecFlvDecoder *flv) { - SwfdecDecoder *dec = SWFDEC_DECODER (flv); SwfdecBuffer *buffer; SwfdecBits bits; guint version, header_length; gboolean has_audio, has_video; - /* NB: we're still reading from the original queue, since deflating is not initialized yet */ - buffer = swfdec_buffer_q...
2007 Jul 27
0
11 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie_as.c test/trace
...@ -63,15 +63,19 @@ swfdec_net_stream_video_goto (SwfdecNetS SWFDEC_LOG ("goto %ums", timestamp); process_events = timestamp == stream->next_time; process_events_from = MIN (stream->next_time, stream->current_time + 1); - buffer = swfdec_flv_decoder_get_video (stream->flvdecoder, timestamp, - FALSE, &format, &stream->current_time, &stream->next_time); old = stream->surface; if (stream->surface) { cairo_surface_destroy (stream->surface); stream->surface = NULL; } + if (stream->flvdecoder->video) { + buffer =...
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
...eam.c +++ b/libswfdec/swfdec_net_stream.c @@ -468,6 +468,7 @@ swfdec_net_stream_set_loader (SwfdecNetS if (stream->loader) { swfdec_loader_set_target (stream->loader, NULL); + swfdec_loader_close (stream->loader); g_object_unref (stream->loader); } if (stream->flvdecoder) { diff-tree c10ef4a4721e1aa5f07aebb6320226dbb93bc974 (from 58b73bfa1e54bd95744e89e7f9fc6902ab1a48d3) Author: Benjamin Otte <otte at gnome.org> Date: Wed Aug 8 11:04:19 2007 +0200 implement close() diff --git a/libswfdec-gtk/swfdec_gtk_loader.c b/libswfdec-gtk/swfdec_gtk_loader.c in...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...libswfdec/swfdec_net_stream.c @@ -223,7 +223,7 @@ swfdec_net_stream_loader_target_parse (S break; case SWFDEC_STATUS_INIT: /* HACK for native flv playback */ - swfdec_player_initialize (stream->player, + swfdec_player_initialize (stream->player, 7, SWFDEC_DECODER (stream->flvdecoder)->rate, SWFDEC_DECODER (stream->flvdecoder)->width, SWFDEC_DECODER (stream->flvdecoder)->height); diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index 3d2ca6c..7103780 100644 --- a/libswfdec/swfdec_player.c +++ b/libswfdec/swfdec_player.c @@ -1002,...
2007 Nov 08
0
5 commits - libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_resource.c libswfdec/swfdec_resource.h player/swfdec_slow_loader.c test/trace
...rget_parse (SwfdecLoaderTarget *target, status = SWFDEC_STATUS_OK; do { SwfdecBuffer *buffer = swfdec_buffer_queue_pull_buffer (loader->queue); + if (buffer == NULL) + break; + status &= ~SWFDEC_STATUS_NEEDBITS; status |= klass->parse (SWFDEC_DECODER (stream->flvdecoder), buffer); - } while ((status & (SWFDEC_STATUS_ERROR | SWFDEC_STATUS_NEEDBITS | SWFDEC_STATUS_EOF)) == 0); + } while ((status & (SWFDEC_STATUS_ERROR | SWFDEC_STATUS_EOF)) == 0); if (status & SWFDEC_STATUS_IMAGE) swfdec_net_stream_loader_target_recheck (stream); commit 5495...
2007 Apr 03
0
11 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec-gtk/swfdec_source.c libswfdec/swfdec_cached.c libswfdec/swfdec_font.c libswfdec/swfdec_morphshape.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c
...5,7 +225,7 @@ swfdec_net_stream_loader_target_parse (S return; } if (!loader->eof && swfdec_buffer_queue_get_depth (loader->queue) == 0) { - SWFDEC_WARNING ("nothing to parse?!"); + SWFDEC_INFO ("nothing to do"); return; } if (stream->flvdecoder == NULL) {
2007 Apr 08
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_buffer.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c
...{ + if (flv->decoder && flv->next_timestamp == 0) return NULL; - buffer = swfdec_audio_codec_finish (flv->codec, flv->decoder); - flv->decoder = NULL; - if (buffer == NULL) - return NULL; - } else { buffer = swfdec_flv_decoder_get_audio (flv->flvdecoder, flv->next_timestamp, &format, &width, &in, &now, &soon); @@ -92,31 +88,27 @@ next: if (flv->in == 0) { /* init */ if (flv->decoder) { - swfdec_audio_codec_finish (flv->codec, flv->decoder); + swfdec_audio_decoder_free (flv->decode...