diff -r c83c59b22fe1 -r dedcca2fe529 gst-plugins-nuvdemux/src/gstnuvdemux.c --- a/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 00:11:21 2006 +0100 +++ b/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 23:32:24 2006 +0100 @@ -52,9 +52,8 @@ #include #include -#define GETTEXT_PACKAGE "gst-plugins-nuvdemux-0.10.3" +#include -#include "gst/gst-i18n-plugin.h" #include "gstnuvdemux.h" GST_DEBUG_CATEGORY_STATIC (nuvdemux_debug); @@ -669,6 +668,8 @@ if (h->i_type == 'R') goto done; + + GST_DEBUG_OBJECT (nuv, "starting append index"); /* append the frame's header timecode field, and the actual offset */ gst_nuv_demux_index_append( nuv, h->i_timecode, nuv->offset ); @@ -684,7 +685,7 @@ /* find the nearest empty frame slot */ gint64 near_off = gst_nuv_demux_index_find_offset( nuv, pos ); - + near_off = 0; /* just get the timecode from the timecode's table */ GST_BUFFER_TIMESTAMP (buf) = nuv->index_entries->idx[near_off].i_time * GST_MSECOND; } else { @@ -692,6 +693,8 @@ } } + GST_DEBUG_OBJECT (nuv, "index appended"); + switch (h->i_type) { case 'V': { @@ -738,6 +741,8 @@ break; } + GST_DEBUG_OBJECT (nuv, "data sended"); + done: nuv->state = GST_NUV_DEMUX_FRAME_HEADER; g_free (nuv->fh); @@ -916,7 +921,7 @@ case GST_NUV_DEMUX_MOVI: res = gst_nuv_demux_stream_data (nuv); - if ((res != GST_FLOW_OK) && (res != GST_FLOW_CUSTOM_ERROR)) { + if ((res != GST_FLOW_OK) && (res != GST_FLOW_ERROR_NO_DATA)) { goto pause; } break; @@ -1006,10 +1011,12 @@ nuv->mode = 0; nuv->adapter = NULL; res = gst_pad_activate_pull (sinkpad, TRUE); + GST_DEBUG_OBJECT (nuv, "starting PULL mode"); } else { nuv->mode = 1; nuv->adapter = gst_adapter_new (); res = gst_pad_activate_push (sinkpad, TRUE); + GST_DEBUG_OBJECT (nuv, "starting PUSH mode"); } g_object_unref (nuv); @@ -1038,6 +1045,8 @@ gst_adapter_push (nuv->adapter, buf); + GST_DEBUG_OBJECT (nuv, "PUSH adapter %d", gst_adapter_available (nuv->adapter)); + return gst_nuv_demux_play (pad); } @@ -1122,7 +1131,6 @@ { #ifdef ENABLE_NLS setlocale (LC_ALL, ""); - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); #endif /* ENABLE_NLS */ if (!gst_element_register (plugin, "nuvdemux", GST_RANK_SECONDARY,