search for: swfdecaudioformat

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

2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...c b/libswfdec/swfdec_audio_flv.c index d611066..59de5c5 100644 --- a/libswfdec/swfdec_audio_flv.c +++ b/libswfdec/swfdec_audio_flv.c @@ -49,7 +49,7 @@ static SwfdecBuffer * swfdec_audio_flv_decode_one (SwfdecAudioFlv *flv) { SwfdecBuffer *buffer; - SwfdecAudioCodec format; + guint format; SwfdecAudioFormat in; guint now, soon; diff --git a/libswfdec/swfdec_audio_flv.h b/libswfdec/swfdec_audio_flv.h index e67294d..52ac2a5 100644 --- a/libswfdec/swfdec_audio_flv.h +++ b/libswfdec/swfdec_audio_flv.h @@ -40,7 +40,7 @@ struct _SwfdecAudioFlv SwfdecAudio audio; SwfdecFlvDecoder * flvdecoder;...
2007 Oct 28
0
9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
...+ SWFDEC_ERROR ("invalid caps"); + player->error = TRUE; + return FALSE; + } + + player->decoder.format = swfdec_audio_format_new (rate, channels, depth == 16 ? TRUE : FALSE); + return TRUE; +} + SwfdecAudioDecoder * swfdec_audio_decoder_gst_new (SwfdecAudioCodec type, SwfdecAudioFormat format) { @@ -389,7 +423,7 @@ swfdec_audio_decoder_gst_new (SwfdecAudioCodec type, SwfdecAudioFormat format) g_assert (srccaps); player = g_slice_new0 (SwfdecGstAudio); - player->decoder.format = swfdec_audio_format_new (44100, 2, TRUE); + player->decoder.format = SWFDEC_AUDIO_FORM...
2007 Oct 15
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_codec_audio.h test/swfdec-extract.c
...fdec/swfdec_codec_audio.h b/libswfdec/swfdec_codec_audio.h index 157eadf..8a0f4f1 100644 --- a/libswfdec/swfdec_codec_audio.h +++ b/libswfdec/swfdec_codec_audio.h @@ -49,7 +49,7 @@ struct _SwfdecAudioDecoder { SwfdecAudioDecoder * swfdec_audio_decoder_new (SwfdecAudioCodec codec, SwfdecAudioFormat format); void swfdec_audio_decoder_free (SwfdecAudioDecoder * decoder); -SwfdecAudioFormat swfdec_audio_decoder_get_format (SwfdecAudioDecoder * decoder); +SwfdecAudioFormat swfdec_audio_decoder_get_format (SwfdecAudioDecoder * decoder); void swfdec_audio_decoder_push (SwfdecAudioDecod...
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
...back_queue); } diff --git a/libswfdec/swfdec_audio_flv.h b/libswfdec/swfdec_audio_flv.h index 5a41edc..8e4c5a5 100644 --- a/libswfdec/swfdec_audio_flv.h +++ b/libswfdec/swfdec_audio_flv.h @@ -41,15 +41,13 @@ struct _SwfdecAudioFlv SwfdecFlvDecoder * flvdecoder; /* decoder we play back */ SwfdecAudioFormat format; /* codec format of audio */ - const SwfdecAudioCodec *codec; /* codec in use */ gboolean width; /* width of audio */ SwfdecAudioOut in; /* input format of data */ - SwfdecAudioOut out; /* output format of codec */ - gpointer decoder; /* decoder used for playback */ + S...
2007 Oct 14
0
4 commits - libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_sound.c
...Sun Oct 14 21:26:49 2007 +0200 free the reserved cache space on error diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c index e4e9086..f086849 100644 --- a/libswfdec/swfdec_sound.c +++ b/libswfdec/swfdec_sound.c @@ -203,6 +203,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) depth = swfdec_buffer_queue_get_depth (queue); if (depth == 0) { SWFDEC_ERROR ("decoding didn't produce any data, bailing"); + swfdec_cached_unload (SWFDEC_CACHED (sound)); return NULL; } tmp = swfdec_buffer_queue_pull (queue, depth); commit b083f36d6...
2007 Apr 05
0
4 commits - libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_stream.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_mad.c
...endif -extern const SwfdecVideoCodec swfdec_codec_gst_h263; +extern const SwfdecVideoCodec swfdec_codec_gst_video; /*** UNCOMPRESSED SOUND ***/ #define U8_FLAG (0x10000) static gpointer -swfdec_codec_uncompressed_init (gboolean width, SwfdecAudioOut format) +swfdec_codec_uncompressed_init (SwfdecAudioFormat type, gboolean width, SwfdecAudioOut format) { guint ret = format; if (!width) @@ -121,7 +119,7 @@ swfdec_codec_get_audio (SwfdecAudioForma case SWFDEC_AUDIO_FORMAT_ADPCM: return &swfdec_codec_adpcm; #ifdef HAVE_FFMPEG - return &swfdec_codec_ffmpeg_adpcm; + ret...
2008 Jan 09
0
libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c libswfdec/swfdec_swf_decoder.c
...G_GSIZE_FORMAT" bytes mp3 data", n_samples, skip, chunk->length); /* use this to write out the stream data to stdout - nice way to get an mp3 file :) */ //write (1, (void *) chunk->data, chunk->length); @@ -208,7 +208,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) sample_bytes = swfdec_audio_format_get_bytes_per_sample (sound->decoded_format); n_samples = sound->n_samples / swfdec_audio_format_get_granularity (sound->decoded_format); - SWFDEC_LOG ("after decoding, got %u samples, should get %u and skip %u", + SWFDEC_LOG...
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...e: Tue Oct 30 19:10:13 2007 +0200 Fix g_return_val_if_fail with a wrong return value diff --git a/libswfdec/swfdec_audio.c b/libswfdec/swfdec_audio.c index 79af900..f94ea53 100644 --- a/libswfdec/swfdec_audio.c +++ b/libswfdec/swfdec_audio.c @@ -290,7 +290,7 @@ swfdec_audio_format_get_rate (SwfdecAudioFormat format) guint swfdec_audio_format_get_granularity (SwfdecAudioFormat format) { - g_return_val_if_fail (SWFDEC_IS_AUDIO_FORMAT (format), 44100); + g_return_val_if_fail (SWFDEC_IS_AUDIO_FORMAT (format), 1); return 1 << (3 - (format >> 2)); } commit 56407f55976fc53dad38b4ec6191f...
2007 Oct 14
0
4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c test/trace
...don't crash when decoding didn't produce any output (fixes #12793) diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c index 7ee1660..e4e9086 100644 --- a/libswfdec/swfdec_sound.c +++ b/libswfdec/swfdec_sound.c @@ -171,6 +171,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) SwfdecBufferQueue *queue; guint sample_bytes; guint n_samples; + guint depth; g_return_val_if_fail (SWFDEC_IS_SOUND (sound), NULL); g_return_val_if_fail (format != NULL, NULL); @@ -199,7 +200,12 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format)...
2007 Oct 28
0
5 commits - autogen.sh configure.ac libswfdec-gtk/Makefile.am libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_player.c test/trace
...make GStreamer the default backend diff --git a/libswfdec/swfdec_codec_audio.c b/libswfdec/swfdec_codec_audio.c index 5e8b9aa..77ae76b 100644 --- a/libswfdec/swfdec_codec_audio.c +++ b/libswfdec/swfdec_codec_audio.c @@ -126,12 +126,12 @@ struct { SwfdecAudioDecoder * (* func) (SwfdecAudioCodec, SwfdecAudioFormat); } audio_codecs[] = { { "builtin", swfdec_audio_decoder_builtin_new }, -#ifdef HAVE_MAD - { "mad", swfdec_audio_decoder_mad_new }, -#endif #ifdef HAVE_GST { "gst", swfdec_audio_decoder_gst_new }, #endif +#ifdef HAVE_MAD + { "mad", swfdec_audio_dec...
2007 Oct 15
0
8 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c libswfdec/swfdec_sound.h test/trace
...to add to - * @offset: offset in samples into the data - * @n_samples: amount of samples to render - * - * Renders the given sound onto the existing data in @dest. - **/ -void -swfdec_sound_render (SwfdecSound *sound, gint16 *dest, - guint offset, guint n_samples) -{ - SwfdecBuffer *buffer; - SwfdecAudioFormat format; - g_return_if_fail (SWFDEC_IS_SOUND (sound)); - /* FIXME: I need a return_if_fail for !created_by_define_sound */ - - buffer = swfdec_sound_get_decoded (sound, &format); - if (buffer == NULL) - return; - swfdec_sound_buffer_render (dest, buffer, format, - NULL, offset, n_s...
2007 Oct 26
0
6 commits - configure.ac libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c player/swfplay.c
...dio *) dec; + GstBuffer *buf; + + if (player->error) + return NULL; + buf = swfdec_gst_decoder_pull (&player->resample); + if (buf == NULL) + return NULL; + return swfdec_buffer_new_from_gst (buf); } SwfdecAudioDecoder * swfdec_audio_decoder_gst_new (SwfdecAudioCodec type, SwfdecAudioFormat format) { SwfdecGstAudio *player; - GstElement *fakesrc, *fakesink, *decoder, *convert; - GstBus *bus; - GstCaps *caps; + GstCaps *srccaps, *sinkcaps; if (!gst_init_check (NULL, NULL, NULL)) return NULL; switch (type) { case SWFDEC_AUDIO_CODEC_MP3: - caps = gst_caps...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...@@ -25,7 +25,6 @@ #include <libswfdec/swfdec_buffer.h> typedef struct _SwfdecAudioCodec SwfdecAudioCodec; -typedef struct _SwfdecVideoCodec SwfdecVideoCodec; typedef enum { SWFDEC_AUDIO_FORMAT_UNDEFINED = 0, @@ -36,15 +35,6 @@ typedef enum { SWFDEC_AUDIO_FORMAT_NELLYMOSER = 6 } SwfdecAudioFormat; -typedef enum { - SWFDEC_VIDEO_FORMAT_UNDEFINED = 0, - SWFDEC_VIDEO_FORMAT_H263 = 2, - SWFDEC_VIDEO_FORMAT_SCREEN = 3, - SWFDEC_VIDEO_FORMAT_VP6 = 4, - SWFDEC_VIDEO_FORMAT_VP6_ALPHA = 5, - SWFDEC_VIDEO_FORMAT_SCREEN2 = 6 -} SwfdecVideoFormat; - struct _SwfdecAudioCodec { gpointer (* i...
2007 Jul 18
0
12 commits - configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_playback_alsa.c libswfdec/jpeg libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c
...+#ifndef _SWFDEC_INTERNAL_H_ +#define _SWFDEC_INTERNAL_H_ + +#include <libswfdec/swfdec_types.h> +#include <libswfdec/swfdec_codec_audio.h> +#include <libswfdec/swfdec_codec_video.h> + +G_BEGIN_DECLS + + +/* audio codecs */ + +SwfdecAudioDecoder * swfdec_audio_decoder_adpcm_new (SwfdecAudioFormat type, + gboolean width, + SwfdecAudioOut format); +#ifdef HAVE_MAD +SwfdecAudioDecoder * swfdec_audio_decoder_mad_new (SwfdecAudioFormat type, + gboolean width, + SwfdecAudioOut format); +#endif +#ifdef HAVE_FFMPEG +SwfdecAudioDecoder * swfdec_audio_decoder_ff...
2007 Apr 08
0
libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c
...ST_MESSAGE_ERROR: + g_mutex_lock (player->mutex); + g_cond_signal (player->cond); + player->done = TRUE; + g_mutex_unlock (player->mutex); + break; + default: + break; + } + return GST_BUS_PASS; +} + +SwfdecAudioDecoder * +swfdec_audio_decoder_gst_new (SwfdecAudioFormat type, gboolean width, SwfdecAudioOut format) +{ + SwfdecGstAudio *player; + GstElement *fakesrc, *fakesink, *decoder, *convert; + GstBus *bus; + GstCaps *caps; + + if (!gst_init_check (NULL, NULL, NULL)) + return NULL; + + switch (type) { + case SWFDEC_AUDIO_FORMAT_MP3: + caps = gs...
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
...a); - return NULL; -} - -SwfdecBuffer * -swfdec_sound_decode_buffer (SwfdecSound *sound, gpointer data, SwfdecBuffer *buffer) -{ - g_assert (sound->decoded == NULL); - - if (sound->codec) - return swfdec_audio_codec_decode (sound->codec, data, buffer); - else - return NULL; -} - -SwfdecAudioFormat -swfdec_sound_get_decoder_format (SwfdecSound *sound, gpointer data) -{ - g_assert (sound->decoded == NULL); - - if (sound->codec) - return swfdec_audio_codec_get_format (sound->codec, data); - else - return sound->original_format; -} - /** * swfdec_sound_buffer_get_n_sample...
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
...ndex (flv->video, SwfdecFlvVideoTag, 0).timestamp; + if (last_timestamp) + *last_timestamp = g_array_index (flv->video, SwfdecFlvVideoTag, flv->video->len - 1).timestamp; + return TRUE; +} + SwfdecBuffer * swfdec_flv_decoder_get_audio (SwfdecFlvDecoder *flv, guint timestamp, SwfdecAudioFormat *codec_format, gboolean *width, SwfdecAudioOut *format, @@ -489,6 +512,22 @@ notify_initialized (SwfdecPlayer *player swfdec_movie_invalidate (SWFDEC_MOVIE (movie)); } +gboolean +swfdec_flv_decoder_is_eof (SwfdecFlvDecoder *flv) +{ + g_return_val_if_fail (SWFDEC_IS_FLV_DECODER (flv), TRUE);...
2007 Oct 11
0
12 commits - configure.ac doc/Makefile.am libswfdec/swfdec_as_frame.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_shape_parser.c libswfdec/swfdec_sound.c test/sound
...oops; /* amount of times this sample still needs to be played back */ guint n_envelopes; /* amount of points in the envelope */ SwfdecSoundEnvelope * envelope; /* volume envelope or NULL if none */ /* dynamic data */ SwfdecBuffer * decoded; /* the decoded buffer we play back */ SwfdecAudioFormat decoded_format; /* format of the decoded buffer */ guint offset; /* current offset in 44.1kHz */ + guint loop; /* current loop we're in */ guint n_samples; /* length of decoded buffer in 44.1kHz samples - can be 0 */ }; diff-tree 63b3acbf8e21b00620db14fc3e8ce3e643875...
2007 Oct 12
0
Changes to 'refs/tags/0.5.3'
...gic disable WARNING messages by default add tests for setTarget action changes fix swfdec_as_context_startup() to work on non-SwfdecPlayer objects giving VP6 a one-byte clamp size is NetStream specific, treat it like that. SwfdecVideoFormat => SwfdecVideoCodec SwfdecAudioFormat => SwfdecAudioCodec SwfdcAudioOut => SwfdecAudioFormat memleak rework video handling make GStreamer backend actually work, not just compile implement colorspace conversion without ffmpeg get rid of ffmpeg colorspace conversion completely make it compi...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
..._video_decoder_new and swfdec_audio_decoder_new diff --git a/libswfdec/swfdec_codec_audio.c b/libswfdec/swfdec_codec_audio.c index bdf33f3..7c4ab8a 100644 --- a/libswfdec/swfdec_codec_audio.c +++ b/libswfdec/swfdec_codec_audio.c @@ -160,6 +160,7 @@ swfdec_audio_decoder_new (SwfdecAudioCodec codec, SwfdecAudioFormat format) list = g_getenv ("SWFDEC_CODEC"); if (list == NULL) { guint i; + ret = NULL; for (i = 0; audio_codecs[i].name != NULL; i++) { ret = audio_codecs[i].func (codec, format); if (ret) diff --git a/libswfdec/swfdec_codec_video.c b/libswfdec/swfdec_code...