# HG changeset patch # User renatofilho # Date 1161972656 -3600 # Node ID 98fa2109e716d494fe8ec2b5328aeeb1a3a18768 # Parent b2b0169716dcf453ac316eb848fc1de8a929117d [svn r61] - bug fixes; diff -r b2b0169716dc -r 98fa2109e716 gst-plugins-nuvdemux/src/gstnuvdemux.c --- a/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 00:22:59 2006 +0100 +++ b/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 19:10:56 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, diff -r b2b0169716dc -r 98fa2109e716 gst-plugins-nuvdemux/src/gstnuvdemux.h --- a/gst-plugins-nuvdemux/src/gstnuvdemux.h Fri Oct 27 00:22:59 2006 +0100 +++ b/gst-plugins-nuvdemux/src/gstnuvdemux.h Fri Oct 27 19:10:56 2006 +0100 @@ -109,7 +109,7 @@ 0x02: gauss 5 pixel (8,1,1,1,1)/12 0x04: cartoon filter */ - gint32 i_timecode; /* ms */ + gint i_timecode; /* ms */ gint i_length; /* V,A,T: length of following data S: length of packet correl */