diff --git a/gst/elements/gstaggregator.c b/gst/elements/gstaggregator.c index 10045670af..4a6baf54ae 100644 --- a/gst/elements/gstaggregator.c +++ b/gst/elements/gstaggregator.c @@ -88,7 +88,7 @@ static void gst_aggregator_chain (GstPad *pad, GstBuffer *buf); static void gst_aggregator_loop (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_aggregator_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_aggregator_signals[LAST_SIGNAL] = { 0 };*/ GType gst_aggregator_get_type (void) @@ -331,7 +331,7 @@ gst_aggregator_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (buf != NULL); aggregator = GST_AGGREGATOR (gst_pad_get_parent (pad)); -// gst_trace_add_entry (NULL, 0, buf, "aggregator buffer"); +/* gst_trace_add_entry (NULL, 0, buf, "aggregator buffer");*/ gst_aggregator_push (aggregator, pad, buf, "chain"); } diff --git a/gst/elements/gstelements.c b/gst/elements/gstelements.c index 476afa979d..45a6bbbeab 100644 --- a/gst/elements/gstelements.c +++ b/gst/elements/gstelements.c @@ -96,12 +96,12 @@ plugin_init (GModule *module, GstPlugin *plugin) if (_elements[i].factoryinit) { _elements[i].factoryinit (factory); } -// g_print("added factory '%s'\n",_elements[i].name); +/* g_print("added factory '%s'\n",_elements[i].name); */ i++; } -// INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i); +/* INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i);*/ return TRUE; } diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 897b297cd3..5cc436850f 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -200,10 +200,10 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) 1, G_MAXINT, 1, G_PARAM_READABLE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, g_param_spec_boolean("loop_based","loop_based","loop_based", - FALSE, G_PARAM_READWRITE)); // CHECKME + FALSE, G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_OUTPUT, g_param_spec_enum("output","output","output", - GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); // CHECKME! + GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); /* CHECKME! */ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DATA, g_param_spec_enum ("data", "data", "data", GST_TYPE_FAKESRC_DATA, FAKESRC_DATA_ALLOCATE, G_PARAM_READWRITE)); @@ -224,13 +224,13 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) GST_TYPE_FAKESRC_FILLTYPE, FAKESRC_FILLTYPE_NULL, G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PATTERN, g_param_spec_string("pattern","pattern","pattern", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_NUM_BUFFERS, g_param_spec_int("num_buffers","num_buffers","num_buffers", - G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_EOS, g_param_spec_boolean("eos","eos","eos", - TRUE,G_PARAM_READWRITE)); // CHECKME + TRUE,G_PARAM_READWRITE)); /* CHECKME */ gst_element_install_std_props ( GST_ELEMENT_CLASS (klass), @@ -256,7 +256,7 @@ gst_fakesrc_init (GstFakeSrc *fakesrc) { GstPad *pad; - // create our first output pad + /* create our first output pad */ pad = gst_pad_new ("src", GST_PAD_SRC); gst_element_add_pad (GST_ELEMENT (fakesrc), pad); @@ -318,7 +318,7 @@ gst_fakesrc_event_handler (GstPad *pad, GstEvent *event) gst_event_free (event); break; } - // else we do a flush too + /* else we do a flush too */ case GST_EVENT_FLUSH: g_print("fakesrc: have flush event\n"); src->need_flush = TRUE; @@ -601,21 +601,21 @@ gst_fakesrc_create_buffer (GstFakeSrc *src) buf = gst_fakesrc_alloc_buffer (src, size); break; case FAKESRC_DATA_SUBBUFFER: - // see if we have a parent to subbuffer + /* see if we have a parent to subbuffer */ if (!src->parent) { gst_fakesrc_alloc_parent (src); g_assert (src->parent); } - // see if it's large enough + /* see if it's large enough */ if ((GST_BUFFER_SIZE (src->parent) - src->parentoffset) >= size) { buf = gst_buffer_create_sub (src->parent, src->parentoffset, size); src->parentoffset += size; } else { - // the parent is useless now + /* the parent is useless now */ gst_buffer_unref (src->parent); src->parent = NULL; - // try again (this will allocate a new parent) + /* try again (this will allocate a new parent) */ return gst_fakesrc_create_buffer (src); } gst_fakesrc_prepare_buffer (src, buf); diff --git a/gst/elements/gstfdsink.c b/gst/elements/gstfdsink.c index 88e7c99454..8df24dbae3 100644 --- a/gst/elements/gstfdsink.c +++ b/gst/elements/gstfdsink.c @@ -57,7 +57,7 @@ static void gst_fdsink_get_property (GObject *object, guint prop_id, static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf); static GstElementClass *parent_class = NULL; -//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };*/ GType gst_fdsink_get_type (void) diff --git a/gst/elements/gstfdsrc.c b/gst/elements/gstfdsrc.c index 2a1c895541..eea8df430d 100644 --- a/gst/elements/gstfdsrc.c +++ b/gst/elements/gstfdsrc.c @@ -66,7 +66,7 @@ static GstBuffer * gst_fdsrc_get (GstPad *pad); static GstElementClass *parent_class = NULL; -//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_fdsrc_get_type (void) @@ -189,7 +189,7 @@ gst_fdsrc_get(GstPad *pad) src = GST_FDSRC(gst_pad_get_parent (pad)); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this*/ buf = gst_buffer_new (); g_return_val_if_fail (buf, NULL); @@ -205,7 +205,7 @@ gst_fdsrc_get(GstPad *pad) /* if we didn't get as many bytes as we asked for, we're at EOF */ if (readbytes < src->bytes_per_read) { - // set the buffer's EOF bit here + /* set the buffer's EOF bit here */ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_EOS); } GST_BUFFER_OFFSET(buf) = src->curoffset; diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index ea2c12e9c4..f9eafa1ef3 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -77,7 +77,7 @@ GstElementDetails gst_filesrc_details = { "(C) 1999", }; -//#define fs_print(format,args...) g_print(format, ## args) +/*#define fs_print(format,args...) g_print(format, ## args)*/ #define fs_print(format,args...) /* FileSrc signals and args */ @@ -113,7 +113,7 @@ static GstElementStateReturn gst_filesrc_change_state (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_filesrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_filesrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_filesrc_get_type(void) @@ -167,9 +167,9 @@ gst_filesrc_class_init (GstFileSrcClass *klass) static gint gst_filesrc_bufcmp (gconstpointer a, gconstpointer b) { -// GstBuffer *bufa = (GstBuffer *)a, *bufb = (GstBuffer *)b; +/* GstBuffer *bufa = (GstBuffer *)a, *bufb = (GstBuffer *)b;*/ - // sort first by offset, then in reverse by size + /* sort first by offset, then in reverse by size */ if (GST_BUFFER_OFFSET(a) < GST_BUFFER_OFFSET(b)) return -1; else if (GST_BUFFER_OFFSET(a) > GST_BUFFER_OFFSET(b)) return 1; else if (GST_BUFFER_SIZE(a) > GST_BUFFER_SIZE(b)) return -1; @@ -196,7 +196,7 @@ gst_filesrc_init (GstFileSrc *src) src->touch = TRUE; src->mapbuf = NULL; - src->mapsize = 4 * 1024 * 1024; // default is 4MB + src->mapsize = 4 * 1024 * 1024; /* default is 4MB */ src->map_regions = g_tree_new(gst_filesrc_bufcmp); src->map_regions_lock = g_mutex_new(); @@ -295,20 +295,20 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf) fs_print ("freeing mmap()d buffer at %d+%d\n",GST_BUFFER_OFFSET(buf),GST_BUFFER_SIZE(buf)); - // remove the buffer from the list of available mmap'd regions + /* remove the buffer from the list of available mmap'd regions */ g_mutex_lock(src->map_regions_lock); g_tree_remove(src->map_regions,buf); - // check to see if the tree is empty + /* check to see if the tree is empty */ if (g_tree_nnodes(src->map_regions) == 0) { - // we have to free the bufferpool we don't have yet + /* we have to free the bufferpool we don't have yet */ } g_mutex_unlock(src->map_regions_lock); #ifdef MADV_DONTNEED - // madvise to tell the kernel what to do with it + /* madvise to tell the kernel what to do with it */ madvise(GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf),MADV_DONTNEED); #endif - // now unmap the memory + /* now unmap the memory */ munmap(GST_BUFFER_DATA(buf),GST_BUFFER_MAXSIZE(buf)); } @@ -322,9 +322,9 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) fs_print ("mapping region %08lx+%08lx from file into memory\n",offset,size); - // time to allocate a new mapbuf + /* time to allocate a new mapbuf */ buf = gst_buffer_new(); - // mmap() the data into this new buffer + /* mmap() the data into this new buffer */ GST_BUFFER_DATA(buf) = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset); if (GST_BUFFER_DATA(buf) == NULL) { fprintf (stderr, "ERROR: gstfilesrc couldn't map file!\n"); @@ -333,10 +333,10 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) size, src->fd, offset, sys_errlist[errno]); } #ifdef MADV_SEQUENTIAL - // madvise to tell the kernel what to do with it + /* madvise to tell the kernel what to do with it */ retval = madvise(GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf),MADV_SEQUENTIAL); #endif - // fill in the rest of the fields + /* fill in the rest of the fields */ GST_BUFFER_FLAGS(buf) = GST_BUFFER_READONLY | GST_BUFFER_ORIGINAL; GST_BUFFER_SIZE(buf) = size; GST_BUFFER_MAXSIZE(buf) = size; @@ -359,15 +359,15 @@ gst_filesrc_map_small_region (GstFileSrc *src, off_t offset, size_t size) off_t mod, mapbase; GstBuffer *map; -// printf("attempting to map a small buffer at %d+%d\n",offset,size); +/* printf("attempting to map a small buffer at %d+%d\n",offset,size); */ - // if the offset starts at a non-page boundary, we have to special case + /* if the offset starts at a non-page boundary, we have to special case */ if ((mod = offset % src->pagesize)) { GstBuffer *ret; mapbase = offset - mod; mapsize = ((size + mod + src->pagesize - 1) / src->pagesize) * src->pagesize; -// printf("not on page boundaries, resizing map to %d+%d\n",mapbase,mapsize); +/* printf("not on page boundaries, resizing map to %d+%d\n",mapbase,mapsize);*/ map = gst_filesrc_map_region(src, mapbase, mapsize); ret = gst_buffer_create_sub (map, offset - mapbase, size); @@ -384,13 +384,13 @@ typedef struct { off_t size; } GstFileSrcRegion; -// This allows us to search for a potential mmap region. +/* This allows us to search for a potential mmap region. */ static gint gst_filesrc_search_region_match (gpointer a, gpointer b) { GstFileSrcRegion *r = (GstFileSrcRegion *)b; - // trying to walk b down the tree, current node is a + /* trying to walk b down the tree, current node is a */ if (r->offset < GST_BUFFER_OFFSET(a)) return -1; else if (r->offset >= (GST_BUFFER_OFFSET(a) + GST_BUFFER_SIZE(a))) return 1; else if ((r->offset + r->size) <= (GST_BUFFER_OFFSET(a) + GST_BUFFER_SIZE(a))) return 0; @@ -418,63 +418,63 @@ gst_filesrc_get (GstPad *pad) src = GST_FILESRC (gst_pad_get_parent (pad)); g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL); - // check for seek + /* check for seek */ if (src->seek_happened) { src->seek_happened = FALSE; return GST_BUFFER (gst_event_new(GST_EVENT_DISCONTINUOUS)); } - // check for EOF + /* check for EOF */ if (src->curoffset == src->filelen) { gst_element_set_state (GST_ELEMENT (src), GST_STATE_PAUSED); return GST_BUFFER (gst_event_new(GST_EVENT_EOS)); } - // calculate end pointers so we don't have to do so repeatedly later + /* calculate end pointers so we don't have to do so repeatedly later */ readsize = src->block_size; - readend = src->curoffset + src->block_size; // note this is the byte *after* the read + readend = src->curoffset + src->block_size; /* note this is the byte *after* the read */ mapstart = GST_BUFFER_OFFSET(src->mapbuf); - mapend = mapstart + GST_BUFFER_SIZE(src->mapbuf); // note this is the byte *after* the map + mapend = mapstart + GST_BUFFER_SIZE(src->mapbuf); /* note this is the byte *after* the map */ - // check to see if we're going to overflow the end of the file + /* check to see if we're going to overflow the end of the file */ if (readend > src->filelen) { readsize = src->filelen - src->curoffset; readend = src->curoffset; } - // if the start is past the mapstart + /* if the start is past the mapstart */ if (src->curoffset >= mapstart) { - // if the end is before the mapend, the buffer is in current mmap region... - // ('cause by definition if readend is in the buffer, so's readstart) + /* if the end is before the mapend, the buffer is in current mmap region... */ + /* ('cause by definition if readend is in the buffer, so's readstart) */ if (readend <= mapend) { fs_print ("read buf %d+%d lives in current mapbuf %d+%d, creating subbuffer of mapbuf\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - GST_BUFFER_OFFSET(src->mapbuf), readsize); - // if the start actually is within the current mmap region, map an overlap buffer + /* if the start actually is within the current mmap region, map an overlap buffer */ } else if (src->curoffset < mapend) { fs_print ("read buf %d+%d starts in mapbuf %d+%d but ends outside, creating new mmap\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); } - // the only other option is that buffer is totally outside, which means we search for it + /* the only other option is that buffer is totally outside, which means we search for it */ - // now we can assume that the start is *before* the current mmap region - // if the readend is past mapstart, we have two options + /* now we can assume that the start is *before* the current mmap region */ + /* if the readend is past mapstart, we have two options */ } else if (readend >= mapstart) { - // either the read buffer overlaps the start of the mmap region - // or the read buffer fully contains the current mmap region - // either way, it's really not relevant, we just create a new region anyway + /* either the read buffer overlaps the start of the mmap region */ + /* or the read buffer fully contains the current mmap region */ + /* either way, it's really not relevant, we just create a new region anyway*/ fs_print ("read buf %d+%d starts before mapbuf %d+%d, but overlaps it\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); } - // then deal with the case where the read buffer is totally outside + /* then deal with the case where the read buffer is totally outside */ if (buf == NULL) { - // first check to see if there's a map that covers the right region already + /* first check to see if there's a map that covers the right region already */ fs_print ("searching for mapbuf to cover %d+%d\n",src->curoffset,readsize); region.offset = src->curoffset; region.size = readsize; @@ -482,29 +482,29 @@ gst_filesrc_get (GstPad *pad) (GCompareFunc) gst_filesrc_search_region_match, ®ion); - // if we found an exact match, subbuffer it + /* if we found an exact match, subbuffer it */ if (map != NULL) { fs_print ("found mapbuf at %d+%d, creating subbuffer\n",GST_BUFFER_OFFSET(map),GST_BUFFER_SIZE(map)); buf = gst_buffer_create_sub (map, src->curoffset - GST_BUFFER_OFFSET(map), readsize); - // otherwise we need to create something out of thin air + /* otherwise we need to create something out of thin air */ } else { - // if the read buffer crosses a mmap region boundary, create a one-off region + /* if the read buffer crosses a mmap region boundary, create a one-off region */ if ((src->curoffset / src->mapsize) != (readend / src->mapsize)) { fs_print ("read buf %d+%d crosses a %d-byte boundary, creating a one-off\n", src->curoffset,readsize,src->mapsize); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); - // otherwise we will create a new mmap region and set it to the default + /* otherwise we will create a new mmap region and set it to the default */ } else { off_t nextmap = src->curoffset - (src->curoffset % src->mapsize); fs_print ("read buf %d+%d in new mapbuf at %d+%d, mapping and subbuffering\n", src->curoffset,readsize,nextmap,src->mapsize); - // first, we're done with the old mapbuf + /* first, we're done with the old mapbuf */ gst_buffer_unref(src->mapbuf); - // create a new one + /* create a new one */ src->mapbuf = gst_filesrc_map_region (src, nextmap, src->mapsize); - // subbuffer it + /* subbuffer it */ buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - GST_BUFFER_OFFSET(src->mapbuf), readsize); } } @@ -541,7 +541,7 @@ gst_filesrc_open_file (GstFileSrc *src) src->filelen = lseek (src->fd, 0, SEEK_END); lseek (src->fd, 0, SEEK_SET); - // allocate the first mmap'd region + /* allocate the first mmap'd region */ src->mapbuf = gst_filesrc_map_region (src, 0, src->mapsize); src->curoffset = 0; @@ -601,7 +601,7 @@ gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event) src->curoffset = (guint64) GST_EVENT_SEEK_OFFSET (event); src->seek_happened = TRUE; gst_event_free (event); - // push a discontinuous event? + /* push a discontinuous event? */ default: break; } diff --git a/gst/elements/gstfilesrc.h b/gst/elements/gstfilesrc.h index 983edb1389..b5081ea15e 100644 --- a/gst/elements/gstfilesrc.h +++ b/gst/elements/gstfilesrc.h @@ -57,15 +57,15 @@ struct _GstFileSrc { GstElement element; GstPad *srcpad; - guint pagesize; // system page size + guint pagesize; /* system page size*/ - gchar *filename; // filename - gint fd; // open file descriptor - off_t filelen; // what's the file length? + gchar *filename; /* filename */ + gint fd; /* open file descriptor*/ + off_t filelen; /* what's the file length?*/ - off_t curoffset; // current offset in file - off_t block_size; // bytes per read - gboolean touch; // whether to touch every page + off_t curoffset; /* current offset in file*/ + off_t block_size; /* bytes per read */ + gboolean touch; /* whether to touch every page */ GstBuffer *mapbuf; size_t mapsize; diff --git a/gst/elements/gsthttpsrc.c b/gst/elements/gsthttpsrc.c index 5064a03936..fb30905680 100644 --- a/gst/elements/gsthttpsrc.c +++ b/gst/elements/gsthttpsrc.c @@ -67,7 +67,7 @@ static void gst_httpsrc_close_url (GstHttpSrc *src); static GstElementClass *parent_class = NULL; -//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_httpsrc_get_type (void) @@ -145,9 +145,9 @@ gst_httpsrc_get(GstPad *pad) return NULL; } - //g_print ("%ld\n", readbytes); + /*g_print ("%ld\n", readbytes);*/ if (readbytes < src->bytes_per_read) { - // FIXME: set the buffer's EOF bit here + /* FIXME: set the buffer's EOF bit here */ } GST_BUFFER_OFFSET(buf) = src->curoffset; GST_BUFFER_SIZE(buf) = readbytes; diff --git a/gst/elements/gstmultidisksrc.c b/gst/elements/gstmultidisksrc.c index a09adcf64e..15892cccea 100644 --- a/gst/elements/gstmultidisksrc.c +++ b/gst/elements/gstmultidisksrc.c @@ -27,7 +27,7 @@ #include #include -//#define GST_DEBUG_ENABLED +/*#define GST_DEBUG_ENABLED*/ #include "gstmultidisksrc.h" @@ -58,7 +58,7 @@ static void gst_multidisksrc_set_property (GObject *object, guint prop_id, cons static void gst_multidisksrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GstBuffer * gst_multidisksrc_get (GstPad *pad); -//static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len); +/*static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ static GstElementStateReturn gst_multidisksrc_change_state (GstElement *element); @@ -108,7 +108,7 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOCATIONS, g_param_spec_string("locations","locations","locations", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_multidisksrc_set_property; gobject_class->get_property = gst_multidisksrc_get_property; @@ -119,11 +119,11 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) static void gst_multidisksrc_init (GstMultiDiskSrc *multidisksrc) { -// GST_FLAG_SET (disksrc, GST_SRC_); +/* GST_FLAG_SET (disksrc, GST_SRC_); */ multidisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (multidisksrc->srcpad,gst_multidisksrc_get); -// gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); +/* gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); */ gst_element_add_pad (GST_ELEMENT (multidisksrc), multidisksrc->srcpad); multidisksrc->listptr = NULL; @@ -213,11 +213,11 @@ gst_multidisksrc_get (GstPad *pad) if (!gst_multidisksrc_open_file(src, pad)) return NULL; - // emitted after the open, as the user may free the list and string from here + /* emitted after the open, as the user may free the list and string from here*/ g_signal_emit(G_OBJECT(src), gst_multidisksrc_signals[NEW_FILE], 0, list); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ buf = gst_buffer_new (); g_return_val_if_fail (buf != NULL, NULL); diff --git a/gst/elements/gstmultifilesrc.c b/gst/elements/gstmultifilesrc.c index a09adcf64e..15892cccea 100644 --- a/gst/elements/gstmultifilesrc.c +++ b/gst/elements/gstmultifilesrc.c @@ -27,7 +27,7 @@ #include #include -//#define GST_DEBUG_ENABLED +/*#define GST_DEBUG_ENABLED*/ #include "gstmultidisksrc.h" @@ -58,7 +58,7 @@ static void gst_multidisksrc_set_property (GObject *object, guint prop_id, cons static void gst_multidisksrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GstBuffer * gst_multidisksrc_get (GstPad *pad); -//static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len); +/*static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ static GstElementStateReturn gst_multidisksrc_change_state (GstElement *element); @@ -108,7 +108,7 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOCATIONS, g_param_spec_string("locations","locations","locations", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_multidisksrc_set_property; gobject_class->get_property = gst_multidisksrc_get_property; @@ -119,11 +119,11 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) static void gst_multidisksrc_init (GstMultiDiskSrc *multidisksrc) { -// GST_FLAG_SET (disksrc, GST_SRC_); +/* GST_FLAG_SET (disksrc, GST_SRC_); */ multidisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (multidisksrc->srcpad,gst_multidisksrc_get); -// gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); +/* gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); */ gst_element_add_pad (GST_ELEMENT (multidisksrc), multidisksrc->srcpad); multidisksrc->listptr = NULL; @@ -213,11 +213,11 @@ gst_multidisksrc_get (GstPad *pad) if (!gst_multidisksrc_open_file(src, pad)) return NULL; - // emitted after the open, as the user may free the list and string from here + /* emitted after the open, as the user may free the list and string from here*/ g_signal_emit(G_OBJECT(src), gst_multidisksrc_signals[NEW_FILE], 0, list); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ buf = gst_buffer_new (); g_return_val_if_fail (buf != NULL, NULL); diff --git a/gst/elements/gstpipefilter.c b/gst/elements/gstpipefilter.c index 74ec480714..89e3bba4c1 100644 --- a/gst/elements/gstpipefilter.c +++ b/gst/elements/gstpipefilter.c @@ -29,7 +29,7 @@ #include #include -//#define DEBUG_ENABLED +/*#define DEBUG_ENABLED*/ #include "gstpipefilter.h" @@ -69,7 +69,7 @@ static gboolean gst_pipefilter_handle_event (GstPad *pad, GstEvent *event); static GstElementStateReturn gst_pipefilter_change_state (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };*/ GType gst_pipefilter_get_type (void) @@ -107,7 +107,7 @@ gst_pipefilter_class_init (GstPipefilterClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_COMMAND, g_param_spec_string("command","command","command", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_pipefilter_set_property; gobject_class->get_property = gst_pipefilter_get_property; @@ -161,7 +161,7 @@ gst_pipefilter_get (GstPad *pad) pipefilter = GST_PIPEFILTER (gst_pad_get_parent (pad)); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ newbuf = gst_buffer_new(); g_return_val_if_fail(newbuf, NULL); @@ -277,11 +277,11 @@ gst_pipefilter_open_file (GstPipefilter *src) { close(src->fdin[1]); close(src->fdout[0]); - // child + /* child */ dup2(src->fdin[0], STDIN_FILENO); /* set the childs input stream */ dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */ execvp(src->command[0], &src->command[0]); - // will only reach if error + /* will only reach if error */ perror("exec"); gst_element_error(GST_ELEMENT(src),"starting child process"); return FALSE; diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index d7e0544bb0..cc271b96f9 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -66,7 +66,7 @@ static void gst_tee_get_property (GObject *object, guint prop_id, static void gst_tee_chain (GstPad *pad, GstBuffer *buf); static GstElementClass *parent_class = NULL; -//static guint gst_tee_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_tee_signals[LAST_SIGNAL] = { 0 };*/ GType gst_tee_get_type(void) { @@ -213,7 +213,7 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (buf != NULL); tee = GST_TEE (gst_pad_get_parent (pad)); -// gst_trace_add_entry (NULL, 0, buf, "tee buffer"); +/* gst_trace_add_entry (NULL, 0, buf, "tee buffer");*/ for (i=0; inumsrcpads-1; i++) gst_buffer_ref (buf); diff --git a/plugins/elements/gstaggregator.c b/plugins/elements/gstaggregator.c index 10045670af..4a6baf54ae 100644 --- a/plugins/elements/gstaggregator.c +++ b/plugins/elements/gstaggregator.c @@ -88,7 +88,7 @@ static void gst_aggregator_chain (GstPad *pad, GstBuffer *buf); static void gst_aggregator_loop (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_aggregator_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_aggregator_signals[LAST_SIGNAL] = { 0 };*/ GType gst_aggregator_get_type (void) @@ -331,7 +331,7 @@ gst_aggregator_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (buf != NULL); aggregator = GST_AGGREGATOR (gst_pad_get_parent (pad)); -// gst_trace_add_entry (NULL, 0, buf, "aggregator buffer"); +/* gst_trace_add_entry (NULL, 0, buf, "aggregator buffer");*/ gst_aggregator_push (aggregator, pad, buf, "chain"); } diff --git a/plugins/elements/gstelements.c b/plugins/elements/gstelements.c index 476afa979d..45a6bbbeab 100644 --- a/plugins/elements/gstelements.c +++ b/plugins/elements/gstelements.c @@ -96,12 +96,12 @@ plugin_init (GModule *module, GstPlugin *plugin) if (_elements[i].factoryinit) { _elements[i].factoryinit (factory); } -// g_print("added factory '%s'\n",_elements[i].name); +/* g_print("added factory '%s'\n",_elements[i].name); */ i++; } -// INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i); +/* INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i);*/ return TRUE; } diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 897b297cd3..5cc436850f 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -200,10 +200,10 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) 1, G_MAXINT, 1, G_PARAM_READABLE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOOP_BASED, g_param_spec_boolean("loop_based","loop_based","loop_based", - FALSE, G_PARAM_READWRITE)); // CHECKME + FALSE, G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_OUTPUT, g_param_spec_enum("output","output","output", - GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); // CHECKME! + GST_TYPE_FAKESRC_OUTPUT,FAKESRC_FIRST_LAST_LOOP,G_PARAM_READWRITE)); /* CHECKME! */ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DATA, g_param_spec_enum ("data", "data", "data", GST_TYPE_FAKESRC_DATA, FAKESRC_DATA_ALLOCATE, G_PARAM_READWRITE)); @@ -224,13 +224,13 @@ gst_fakesrc_class_init (GstFakeSrcClass *klass) GST_TYPE_FAKESRC_FILLTYPE, FAKESRC_FILLTYPE_NULL, G_PARAM_READWRITE)); g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_PATTERN, g_param_spec_string("pattern","pattern","pattern", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_NUM_BUFFERS, g_param_spec_int("num_buffers","num_buffers","num_buffers", - G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); // CHECKME + G_MININT,G_MAXINT,0,G_PARAM_READWRITE)); /* CHECKME */ g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_EOS, g_param_spec_boolean("eos","eos","eos", - TRUE,G_PARAM_READWRITE)); // CHECKME + TRUE,G_PARAM_READWRITE)); /* CHECKME */ gst_element_install_std_props ( GST_ELEMENT_CLASS (klass), @@ -256,7 +256,7 @@ gst_fakesrc_init (GstFakeSrc *fakesrc) { GstPad *pad; - // create our first output pad + /* create our first output pad */ pad = gst_pad_new ("src", GST_PAD_SRC); gst_element_add_pad (GST_ELEMENT (fakesrc), pad); @@ -318,7 +318,7 @@ gst_fakesrc_event_handler (GstPad *pad, GstEvent *event) gst_event_free (event); break; } - // else we do a flush too + /* else we do a flush too */ case GST_EVENT_FLUSH: g_print("fakesrc: have flush event\n"); src->need_flush = TRUE; @@ -601,21 +601,21 @@ gst_fakesrc_create_buffer (GstFakeSrc *src) buf = gst_fakesrc_alloc_buffer (src, size); break; case FAKESRC_DATA_SUBBUFFER: - // see if we have a parent to subbuffer + /* see if we have a parent to subbuffer */ if (!src->parent) { gst_fakesrc_alloc_parent (src); g_assert (src->parent); } - // see if it's large enough + /* see if it's large enough */ if ((GST_BUFFER_SIZE (src->parent) - src->parentoffset) >= size) { buf = gst_buffer_create_sub (src->parent, src->parentoffset, size); src->parentoffset += size; } else { - // the parent is useless now + /* the parent is useless now */ gst_buffer_unref (src->parent); src->parent = NULL; - // try again (this will allocate a new parent) + /* try again (this will allocate a new parent) */ return gst_fakesrc_create_buffer (src); } gst_fakesrc_prepare_buffer (src, buf); diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index 88e7c99454..8df24dbae3 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -57,7 +57,7 @@ static void gst_fdsink_get_property (GObject *object, guint prop_id, static void gst_fdsink_chain (GstPad *pad,GstBuffer *buf); static GstElementClass *parent_class = NULL; -//static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 };*/ GType gst_fdsink_get_type (void) diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 2a1c895541..eea8df430d 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -66,7 +66,7 @@ static GstBuffer * gst_fdsrc_get (GstPad *pad); static GstElementClass *parent_class = NULL; -//static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_fdsrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_fdsrc_get_type (void) @@ -189,7 +189,7 @@ gst_fdsrc_get(GstPad *pad) src = GST_FDSRC(gst_pad_get_parent (pad)); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this*/ buf = gst_buffer_new (); g_return_val_if_fail (buf, NULL); @@ -205,7 +205,7 @@ gst_fdsrc_get(GstPad *pad) /* if we didn't get as many bytes as we asked for, we're at EOF */ if (readbytes < src->bytes_per_read) { - // set the buffer's EOF bit here + /* set the buffer's EOF bit here */ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_EOS); } GST_BUFFER_OFFSET(buf) = src->curoffset; diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index ea2c12e9c4..f9eafa1ef3 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -77,7 +77,7 @@ GstElementDetails gst_filesrc_details = { "(C) 1999", }; -//#define fs_print(format,args...) g_print(format, ## args) +/*#define fs_print(format,args...) g_print(format, ## args)*/ #define fs_print(format,args...) /* FileSrc signals and args */ @@ -113,7 +113,7 @@ static GstElementStateReturn gst_filesrc_change_state (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_filesrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_filesrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_filesrc_get_type(void) @@ -167,9 +167,9 @@ gst_filesrc_class_init (GstFileSrcClass *klass) static gint gst_filesrc_bufcmp (gconstpointer a, gconstpointer b) { -// GstBuffer *bufa = (GstBuffer *)a, *bufb = (GstBuffer *)b; +/* GstBuffer *bufa = (GstBuffer *)a, *bufb = (GstBuffer *)b;*/ - // sort first by offset, then in reverse by size + /* sort first by offset, then in reverse by size */ if (GST_BUFFER_OFFSET(a) < GST_BUFFER_OFFSET(b)) return -1; else if (GST_BUFFER_OFFSET(a) > GST_BUFFER_OFFSET(b)) return 1; else if (GST_BUFFER_SIZE(a) > GST_BUFFER_SIZE(b)) return -1; @@ -196,7 +196,7 @@ gst_filesrc_init (GstFileSrc *src) src->touch = TRUE; src->mapbuf = NULL; - src->mapsize = 4 * 1024 * 1024; // default is 4MB + src->mapsize = 4 * 1024 * 1024; /* default is 4MB */ src->map_regions = g_tree_new(gst_filesrc_bufcmp); src->map_regions_lock = g_mutex_new(); @@ -295,20 +295,20 @@ gst_filesrc_free_parent_mmap (GstBuffer *buf) fs_print ("freeing mmap()d buffer at %d+%d\n",GST_BUFFER_OFFSET(buf),GST_BUFFER_SIZE(buf)); - // remove the buffer from the list of available mmap'd regions + /* remove the buffer from the list of available mmap'd regions */ g_mutex_lock(src->map_regions_lock); g_tree_remove(src->map_regions,buf); - // check to see if the tree is empty + /* check to see if the tree is empty */ if (g_tree_nnodes(src->map_regions) == 0) { - // we have to free the bufferpool we don't have yet + /* we have to free the bufferpool we don't have yet */ } g_mutex_unlock(src->map_regions_lock); #ifdef MADV_DONTNEED - // madvise to tell the kernel what to do with it + /* madvise to tell the kernel what to do with it */ madvise(GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf),MADV_DONTNEED); #endif - // now unmap the memory + /* now unmap the memory */ munmap(GST_BUFFER_DATA(buf),GST_BUFFER_MAXSIZE(buf)); } @@ -322,9 +322,9 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) fs_print ("mapping region %08lx+%08lx from file into memory\n",offset,size); - // time to allocate a new mapbuf + /* time to allocate a new mapbuf */ buf = gst_buffer_new(); - // mmap() the data into this new buffer + /* mmap() the data into this new buffer */ GST_BUFFER_DATA(buf) = mmap (NULL, size, PROT_READ, MAP_SHARED, src->fd, offset); if (GST_BUFFER_DATA(buf) == NULL) { fprintf (stderr, "ERROR: gstfilesrc couldn't map file!\n"); @@ -333,10 +333,10 @@ gst_filesrc_map_region (GstFileSrc *src, off_t offset, size_t size) size, src->fd, offset, sys_errlist[errno]); } #ifdef MADV_SEQUENTIAL - // madvise to tell the kernel what to do with it + /* madvise to tell the kernel what to do with it */ retval = madvise(GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf),MADV_SEQUENTIAL); #endif - // fill in the rest of the fields + /* fill in the rest of the fields */ GST_BUFFER_FLAGS(buf) = GST_BUFFER_READONLY | GST_BUFFER_ORIGINAL; GST_BUFFER_SIZE(buf) = size; GST_BUFFER_MAXSIZE(buf) = size; @@ -359,15 +359,15 @@ gst_filesrc_map_small_region (GstFileSrc *src, off_t offset, size_t size) off_t mod, mapbase; GstBuffer *map; -// printf("attempting to map a small buffer at %d+%d\n",offset,size); +/* printf("attempting to map a small buffer at %d+%d\n",offset,size); */ - // if the offset starts at a non-page boundary, we have to special case + /* if the offset starts at a non-page boundary, we have to special case */ if ((mod = offset % src->pagesize)) { GstBuffer *ret; mapbase = offset - mod; mapsize = ((size + mod + src->pagesize - 1) / src->pagesize) * src->pagesize; -// printf("not on page boundaries, resizing map to %d+%d\n",mapbase,mapsize); +/* printf("not on page boundaries, resizing map to %d+%d\n",mapbase,mapsize);*/ map = gst_filesrc_map_region(src, mapbase, mapsize); ret = gst_buffer_create_sub (map, offset - mapbase, size); @@ -384,13 +384,13 @@ typedef struct { off_t size; } GstFileSrcRegion; -// This allows us to search for a potential mmap region. +/* This allows us to search for a potential mmap region. */ static gint gst_filesrc_search_region_match (gpointer a, gpointer b) { GstFileSrcRegion *r = (GstFileSrcRegion *)b; - // trying to walk b down the tree, current node is a + /* trying to walk b down the tree, current node is a */ if (r->offset < GST_BUFFER_OFFSET(a)) return -1; else if (r->offset >= (GST_BUFFER_OFFSET(a) + GST_BUFFER_SIZE(a))) return 1; else if ((r->offset + r->size) <= (GST_BUFFER_OFFSET(a) + GST_BUFFER_SIZE(a))) return 0; @@ -418,63 +418,63 @@ gst_filesrc_get (GstPad *pad) src = GST_FILESRC (gst_pad_get_parent (pad)); g_return_val_if_fail (GST_FLAG_IS_SET (src, GST_FILESRC_OPEN), NULL); - // check for seek + /* check for seek */ if (src->seek_happened) { src->seek_happened = FALSE; return GST_BUFFER (gst_event_new(GST_EVENT_DISCONTINUOUS)); } - // check for EOF + /* check for EOF */ if (src->curoffset == src->filelen) { gst_element_set_state (GST_ELEMENT (src), GST_STATE_PAUSED); return GST_BUFFER (gst_event_new(GST_EVENT_EOS)); } - // calculate end pointers so we don't have to do so repeatedly later + /* calculate end pointers so we don't have to do so repeatedly later */ readsize = src->block_size; - readend = src->curoffset + src->block_size; // note this is the byte *after* the read + readend = src->curoffset + src->block_size; /* note this is the byte *after* the read */ mapstart = GST_BUFFER_OFFSET(src->mapbuf); - mapend = mapstart + GST_BUFFER_SIZE(src->mapbuf); // note this is the byte *after* the map + mapend = mapstart + GST_BUFFER_SIZE(src->mapbuf); /* note this is the byte *after* the map */ - // check to see if we're going to overflow the end of the file + /* check to see if we're going to overflow the end of the file */ if (readend > src->filelen) { readsize = src->filelen - src->curoffset; readend = src->curoffset; } - // if the start is past the mapstart + /* if the start is past the mapstart */ if (src->curoffset >= mapstart) { - // if the end is before the mapend, the buffer is in current mmap region... - // ('cause by definition if readend is in the buffer, so's readstart) + /* if the end is before the mapend, the buffer is in current mmap region... */ + /* ('cause by definition if readend is in the buffer, so's readstart) */ if (readend <= mapend) { fs_print ("read buf %d+%d lives in current mapbuf %d+%d, creating subbuffer of mapbuf\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - GST_BUFFER_OFFSET(src->mapbuf), readsize); - // if the start actually is within the current mmap region, map an overlap buffer + /* if the start actually is within the current mmap region, map an overlap buffer */ } else if (src->curoffset < mapend) { fs_print ("read buf %d+%d starts in mapbuf %d+%d but ends outside, creating new mmap\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); } - // the only other option is that buffer is totally outside, which means we search for it + /* the only other option is that buffer is totally outside, which means we search for it */ - // now we can assume that the start is *before* the current mmap region - // if the readend is past mapstart, we have two options + /* now we can assume that the start is *before* the current mmap region */ + /* if the readend is past mapstart, we have two options */ } else if (readend >= mapstart) { - // either the read buffer overlaps the start of the mmap region - // or the read buffer fully contains the current mmap region - // either way, it's really not relevant, we just create a new region anyway + /* either the read buffer overlaps the start of the mmap region */ + /* or the read buffer fully contains the current mmap region */ + /* either way, it's really not relevant, we just create a new region anyway*/ fs_print ("read buf %d+%d starts before mapbuf %d+%d, but overlaps it\n", src->curoffset,readsize,GST_BUFFER_OFFSET(src->mapbuf),GST_BUFFER_SIZE(src->mapbuf)); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); } - // then deal with the case where the read buffer is totally outside + /* then deal with the case where the read buffer is totally outside */ if (buf == NULL) { - // first check to see if there's a map that covers the right region already + /* first check to see if there's a map that covers the right region already */ fs_print ("searching for mapbuf to cover %d+%d\n",src->curoffset,readsize); region.offset = src->curoffset; region.size = readsize; @@ -482,29 +482,29 @@ gst_filesrc_get (GstPad *pad) (GCompareFunc) gst_filesrc_search_region_match, ®ion); - // if we found an exact match, subbuffer it + /* if we found an exact match, subbuffer it */ if (map != NULL) { fs_print ("found mapbuf at %d+%d, creating subbuffer\n",GST_BUFFER_OFFSET(map),GST_BUFFER_SIZE(map)); buf = gst_buffer_create_sub (map, src->curoffset - GST_BUFFER_OFFSET(map), readsize); - // otherwise we need to create something out of thin air + /* otherwise we need to create something out of thin air */ } else { - // if the read buffer crosses a mmap region boundary, create a one-off region + /* if the read buffer crosses a mmap region boundary, create a one-off region */ if ((src->curoffset / src->mapsize) != (readend / src->mapsize)) { fs_print ("read buf %d+%d crosses a %d-byte boundary, creating a one-off\n", src->curoffset,readsize,src->mapsize); buf = gst_filesrc_map_small_region (src, src->curoffset, readsize); - // otherwise we will create a new mmap region and set it to the default + /* otherwise we will create a new mmap region and set it to the default */ } else { off_t nextmap = src->curoffset - (src->curoffset % src->mapsize); fs_print ("read buf %d+%d in new mapbuf at %d+%d, mapping and subbuffering\n", src->curoffset,readsize,nextmap,src->mapsize); - // first, we're done with the old mapbuf + /* first, we're done with the old mapbuf */ gst_buffer_unref(src->mapbuf); - // create a new one + /* create a new one */ src->mapbuf = gst_filesrc_map_region (src, nextmap, src->mapsize); - // subbuffer it + /* subbuffer it */ buf = gst_buffer_create_sub (src->mapbuf, src->curoffset - GST_BUFFER_OFFSET(src->mapbuf), readsize); } } @@ -541,7 +541,7 @@ gst_filesrc_open_file (GstFileSrc *src) src->filelen = lseek (src->fd, 0, SEEK_END); lseek (src->fd, 0, SEEK_SET); - // allocate the first mmap'd region + /* allocate the first mmap'd region */ src->mapbuf = gst_filesrc_map_region (src, 0, src->mapsize); src->curoffset = 0; @@ -601,7 +601,7 @@ gst_filesrc_srcpad_event (GstPad *pad, GstEvent *event) src->curoffset = (guint64) GST_EVENT_SEEK_OFFSET (event); src->seek_happened = TRUE; gst_event_free (event); - // push a discontinuous event? + /* push a discontinuous event? */ default: break; } diff --git a/plugins/elements/gstfilesrc.h b/plugins/elements/gstfilesrc.h index 983edb1389..b5081ea15e 100644 --- a/plugins/elements/gstfilesrc.h +++ b/plugins/elements/gstfilesrc.h @@ -57,15 +57,15 @@ struct _GstFileSrc { GstElement element; GstPad *srcpad; - guint pagesize; // system page size + guint pagesize; /* system page size*/ - gchar *filename; // filename - gint fd; // open file descriptor - off_t filelen; // what's the file length? + gchar *filename; /* filename */ + gint fd; /* open file descriptor*/ + off_t filelen; /* what's the file length?*/ - off_t curoffset; // current offset in file - off_t block_size; // bytes per read - gboolean touch; // whether to touch every page + off_t curoffset; /* current offset in file*/ + off_t block_size; /* bytes per read */ + gboolean touch; /* whether to touch every page */ GstBuffer *mapbuf; size_t mapsize; diff --git a/plugins/elements/gsthttpsrc.c b/plugins/elements/gsthttpsrc.c index 5064a03936..fb30905680 100644 --- a/plugins/elements/gsthttpsrc.c +++ b/plugins/elements/gsthttpsrc.c @@ -67,7 +67,7 @@ static void gst_httpsrc_close_url (GstHttpSrc *src); static GstElementClass *parent_class = NULL; -//static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_httpsrc_signals[LAST_SIGNAL] = { 0 };*/ GType gst_httpsrc_get_type (void) @@ -145,9 +145,9 @@ gst_httpsrc_get(GstPad *pad) return NULL; } - //g_print ("%ld\n", readbytes); + /*g_print ("%ld\n", readbytes);*/ if (readbytes < src->bytes_per_read) { - // FIXME: set the buffer's EOF bit here + /* FIXME: set the buffer's EOF bit here */ } GST_BUFFER_OFFSET(buf) = src->curoffset; GST_BUFFER_SIZE(buf) = readbytes; diff --git a/plugins/elements/gstmultidisksrc.c b/plugins/elements/gstmultidisksrc.c index a09adcf64e..15892cccea 100644 --- a/plugins/elements/gstmultidisksrc.c +++ b/plugins/elements/gstmultidisksrc.c @@ -27,7 +27,7 @@ #include #include -//#define GST_DEBUG_ENABLED +/*#define GST_DEBUG_ENABLED*/ #include "gstmultidisksrc.h" @@ -58,7 +58,7 @@ static void gst_multidisksrc_set_property (GObject *object, guint prop_id, cons static void gst_multidisksrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GstBuffer * gst_multidisksrc_get (GstPad *pad); -//static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len); +/*static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ static GstElementStateReturn gst_multidisksrc_change_state (GstElement *element); @@ -108,7 +108,7 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOCATIONS, g_param_spec_string("locations","locations","locations", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_multidisksrc_set_property; gobject_class->get_property = gst_multidisksrc_get_property; @@ -119,11 +119,11 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) static void gst_multidisksrc_init (GstMultiDiskSrc *multidisksrc) { -// GST_FLAG_SET (disksrc, GST_SRC_); +/* GST_FLAG_SET (disksrc, GST_SRC_); */ multidisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (multidisksrc->srcpad,gst_multidisksrc_get); -// gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); +/* gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); */ gst_element_add_pad (GST_ELEMENT (multidisksrc), multidisksrc->srcpad); multidisksrc->listptr = NULL; @@ -213,11 +213,11 @@ gst_multidisksrc_get (GstPad *pad) if (!gst_multidisksrc_open_file(src, pad)) return NULL; - // emitted after the open, as the user may free the list and string from here + /* emitted after the open, as the user may free the list and string from here*/ g_signal_emit(G_OBJECT(src), gst_multidisksrc_signals[NEW_FILE], 0, list); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ buf = gst_buffer_new (); g_return_val_if_fail (buf != NULL, NULL); diff --git a/plugins/elements/gstmultifilesrc.c b/plugins/elements/gstmultifilesrc.c index a09adcf64e..15892cccea 100644 --- a/plugins/elements/gstmultifilesrc.c +++ b/plugins/elements/gstmultifilesrc.c @@ -27,7 +27,7 @@ #include #include -//#define GST_DEBUG_ENABLED +/*#define GST_DEBUG_ENABLED*/ #include "gstmultidisksrc.h" @@ -58,7 +58,7 @@ static void gst_multidisksrc_set_property (GObject *object, guint prop_id, cons static void gst_multidisksrc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static GstBuffer * gst_multidisksrc_get (GstPad *pad); -//static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len); +/*static GstBuffer * gst_multidisksrc_get_region (GstPad *pad,GstRegionType type,guint64 offset,guint64 len);*/ static GstElementStateReturn gst_multidisksrc_change_state (GstElement *element); @@ -108,7 +108,7 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_LOCATIONS, g_param_spec_string("locations","locations","locations", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_multidisksrc_set_property; gobject_class->get_property = gst_multidisksrc_get_property; @@ -119,11 +119,11 @@ gst_multidisksrc_class_init (GstMultiDiskSrcClass *klass) static void gst_multidisksrc_init (GstMultiDiskSrc *multidisksrc) { -// GST_FLAG_SET (disksrc, GST_SRC_); +/* GST_FLAG_SET (disksrc, GST_SRC_); */ multidisksrc->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_pad_set_get_function (multidisksrc->srcpad,gst_multidisksrc_get); -// gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); +/* gst_pad_set_getregion_function (multidisksrc->srcpad,gst_multidisksrc_get_region); */ gst_element_add_pad (GST_ELEMENT (multidisksrc), multidisksrc->srcpad); multidisksrc->listptr = NULL; @@ -213,11 +213,11 @@ gst_multidisksrc_get (GstPad *pad) if (!gst_multidisksrc_open_file(src, pad)) return NULL; - // emitted after the open, as the user may free the list and string from here + /* emitted after the open, as the user may free the list and string from here*/ g_signal_emit(G_OBJECT(src), gst_multidisksrc_signals[NEW_FILE], 0, list); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ buf = gst_buffer_new (); g_return_val_if_fail (buf != NULL, NULL); diff --git a/plugins/elements/gstpipefilter.c b/plugins/elements/gstpipefilter.c index 74ec480714..89e3bba4c1 100644 --- a/plugins/elements/gstpipefilter.c +++ b/plugins/elements/gstpipefilter.c @@ -29,7 +29,7 @@ #include #include -//#define DEBUG_ENABLED +/*#define DEBUG_ENABLED*/ #include "gstpipefilter.h" @@ -69,7 +69,7 @@ static gboolean gst_pipefilter_handle_event (GstPad *pad, GstEvent *event); static GstElementStateReturn gst_pipefilter_change_state (GstElement *element); static GstElementClass *parent_class = NULL; -//static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_pipefilter_signals[LAST_SIGNAL] = { 0 };*/ GType gst_pipefilter_get_type (void) @@ -107,7 +107,7 @@ gst_pipefilter_class_init (GstPipefilterClass *klass) g_object_class_install_property(G_OBJECT_CLASS(klass), ARG_COMMAND, g_param_spec_string("command","command","command", - NULL, G_PARAM_READWRITE)); // CHECKME + NULL, G_PARAM_READWRITE)); /* CHECKME */ gobject_class->set_property = gst_pipefilter_set_property; gobject_class->get_property = gst_pipefilter_get_property; @@ -161,7 +161,7 @@ gst_pipefilter_get (GstPad *pad) pipefilter = GST_PIPEFILTER (gst_pad_get_parent (pad)); /* create the buffer */ - // FIXME: should eventually use a bufferpool for this + /* FIXME: should eventually use a bufferpool for this */ newbuf = gst_buffer_new(); g_return_val_if_fail(newbuf, NULL); @@ -277,11 +277,11 @@ gst_pipefilter_open_file (GstPipefilter *src) { close(src->fdin[1]); close(src->fdout[0]); - // child + /* child */ dup2(src->fdin[0], STDIN_FILENO); /* set the childs input stream */ dup2(src->fdout[1], STDOUT_FILENO); /* set the childs output stream */ execvp(src->command[0], &src->command[0]); - // will only reach if error + /* will only reach if error */ perror("exec"); gst_element_error(GST_ELEMENT(src),"starting child process"); return FALSE; diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index d7e0544bb0..cc271b96f9 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -66,7 +66,7 @@ static void gst_tee_get_property (GObject *object, guint prop_id, static void gst_tee_chain (GstPad *pad, GstBuffer *buf); static GstElementClass *parent_class = NULL; -//static guint gst_tee_signals[LAST_SIGNAL] = { 0 }; +/*static guint gst_tee_signals[LAST_SIGNAL] = { 0 };*/ GType gst_tee_get_type(void) { @@ -213,7 +213,7 @@ gst_tee_chain (GstPad *pad, GstBuffer *buf) g_return_if_fail (buf != NULL); tee = GST_TEE (gst_pad_get_parent (pad)); -// gst_trace_add_entry (NULL, 0, buf, "tee buffer"); +/* gst_trace_add_entry (NULL, 0, buf, "tee buffer");*/ for (i=0; inumsrcpads-1; i++) gst_buffer_ref (buf);