[gst-devel] gint64 for glib2 [RESEND]

vishnu at pobox.com vishnu at pobox.com
Mon Oct 22 10:49:06 CEST 2001


This patch adds int64 properties to filesrc.  i suppose the shim
can #define these back to the ulong varients.

Index: gstfilesrc.c
===================================================================
RCS file: /cvsroot/gstreamer/gstreamer/gst/elements/gstfilesrc.c,v
retrieving revision 1.3.4.6
diff -u -p -r1.3.4.6 gstfilesrc.c
--- gstfilesrc.c	2001/10/08 08:19:09	1.3.4.6
+++ gstfilesrc.c	2001/10/11 03:02:45
@@ -196,8 +196,8 @@ gst_filesrc_class_init (GstFileSrcClass 
     g_param_spec_string("location","File Location","Location of the file to read",
                         NULL,G_PARAM_READWRITE));
   g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FILESIZE,
-    g_param_spec_ulong("filesize","File Size","Size of the file being read",
-                       0,G_MAXULONG,0,G_PARAM_READABLE));
+    g_param_spec_int64("filesize","File Size","Size of the file being read",
+                       0,G_MAXINT64,0,G_PARAM_READABLE));
   g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_FD,
     g_param_spec_int("fd","File-descriptor","File-descriptor for the file being read",
                      0,G_MAXINT,0,G_PARAM_READABLE));
@@ -205,8 +205,8 @@ gst_filesrc_class_init (GstFileSrcClass 
     g_param_spec_ulong("blocksize","Block Size","Block size to read per buffer",
                        0,G_MAXULONG,4096,G_PARAM_READWRITE));
   g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_OFFSET,
-    g_param_spec_ulong("offset","File Offset","Byte offset of current read pointer",
-                       0,G_MAXULONG,0,G_PARAM_READWRITE));
+    g_param_spec_int64("offset","File Offset","Byte offset of current read pointer",
+                       0,G_MAXINT64,0,G_PARAM_READWRITE));
   g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_MAPSIZE,
     g_param_spec_ulong("mmapsize","mmap() Block Size","Size in bytes of mmap()d regions",
                        0,G_MAXULONG,4*1048576,G_PARAM_READWRITE));
@@ -290,7 +290,7 @@ gst_filesrc_set_property (GObject *objec
       src->block_size = g_value_get_ulong (value);
       break;
     case ARG_OFFSET:
-      src->curoffset = g_value_get_ulong (value);
+      src->curoffset = g_value_get_int64 (value);
       break;
     case ARG_MAPSIZE:
       if ((src->mapsize % src->pagesize) == 0)
@@ -321,7 +321,7 @@ gst_filesrc_get_property (GObject *objec
       g_value_set_string (value, src->filename);
       break;
     case ARG_FILESIZE:
-      g_value_set_ulong (value, src->filelen);
+      g_value_set_int64 (value, src->filelen);
       break;
     case ARG_FD:
       g_value_set_int (value, src->fd);
@@ -330,7 +330,7 @@ gst_filesrc_get_property (GObject *objec
       g_value_set_ulong (value, src->block_size);
       break;
     case ARG_OFFSET:
-      g_value_set_ulong (value, src->curoffset);
+      g_value_set_int64 (value, src->curoffset);
       break;
     case ARG_MAPSIZE:
       g_value_set_ulong (value, src->mapsize);


-- 
Victory to the Divine Mother!!   ... after all,
  http://sahajayoga.org                http://why-compete.org




More information about the gstreamer-devel mailing list