1.1 --- a/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 00:11:21 2006 +0100
1.2 +++ b/gst-plugins-nuvdemux/src/gstnuvdemux.c Fri Oct 27 23:32:24 2006 +0100
1.3 @@ -52,9 +52,8 @@
1.4 #include <gst/gstplugin.h>
1.5 #include <string.h>
1.6
1.7 -#define GETTEXT_PACKAGE "gst-plugins-nuvdemux-0.10.3"
1.8 +#include <glib/gi18n.h>
1.9
1.10 -#include "gst/gst-i18n-plugin.h"
1.11 #include "gstnuvdemux.h"
1.12
1.13 GST_DEBUG_CATEGORY_STATIC (nuvdemux_debug);
1.14 @@ -669,6 +668,8 @@
1.15 if (h->i_type == 'R')
1.16 goto done;
1.17
1.18 +
1.19 + GST_DEBUG_OBJECT (nuv, "starting append index");
1.20 /* append the frame's header timecode field, and the actual offset */
1.21 gst_nuv_demux_index_append( nuv, h->i_timecode, nuv->offset );
1.22
1.23 @@ -684,7 +685,7 @@
1.24
1.25 /* find the nearest empty frame slot */
1.26 gint64 near_off = gst_nuv_demux_index_find_offset( nuv, pos );
1.27 -
1.28 + near_off = 0;
1.29 /* just get the timecode from the timecode's table */
1.30 GST_BUFFER_TIMESTAMP (buf) = nuv->index_entries->idx[near_off].i_time * GST_MSECOND;
1.31 } else {
1.32 @@ -692,6 +693,8 @@
1.33 }
1.34 }
1.35
1.36 + GST_DEBUG_OBJECT (nuv, "index appended");
1.37 +
1.38 switch (h->i_type) {
1.39 case 'V':
1.40 {
1.41 @@ -738,6 +741,8 @@
1.42 break;
1.43 }
1.44
1.45 + GST_DEBUG_OBJECT (nuv, "data sended");
1.46 +
1.47 done:
1.48 nuv->state = GST_NUV_DEMUX_FRAME_HEADER;
1.49 g_free (nuv->fh);
1.50 @@ -916,7 +921,7 @@
1.51
1.52 case GST_NUV_DEMUX_MOVI:
1.53 res = gst_nuv_demux_stream_data (nuv);
1.54 - if ((res != GST_FLOW_OK) && (res != GST_FLOW_CUSTOM_ERROR)) {
1.55 + if ((res != GST_FLOW_OK) && (res != GST_FLOW_ERROR_NO_DATA)) {
1.56 goto pause;
1.57 }
1.58 break;
1.59 @@ -1006,10 +1011,12 @@
1.60 nuv->mode = 0;
1.61 nuv->adapter = NULL;
1.62 res = gst_pad_activate_pull (sinkpad, TRUE);
1.63 + GST_DEBUG_OBJECT (nuv, "starting PULL mode");
1.64 } else {
1.65 nuv->mode = 1;
1.66 nuv->adapter = gst_adapter_new ();
1.67 res = gst_pad_activate_push (sinkpad, TRUE);
1.68 + GST_DEBUG_OBJECT (nuv, "starting PUSH mode");
1.69 }
1.70
1.71 g_object_unref (nuv);
1.72 @@ -1038,6 +1045,8 @@
1.73
1.74 gst_adapter_push (nuv->adapter, buf);
1.75
1.76 + GST_DEBUG_OBJECT (nuv, "PUSH adapter %d", gst_adapter_available (nuv->adapter));
1.77 +
1.78 return gst_nuv_demux_play (pad);
1.79 }
1.80
1.81 @@ -1122,7 +1131,6 @@
1.82 {
1.83 #ifdef ENABLE_NLS
1.84 setlocale (LC_ALL, "");
1.85 - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
1.86 #endif /* ENABLE_NLS */
1.87
1.88 if (!gst_element_register (plugin, "nuvdemux", GST_RANK_SECONDARY,