mmserv/tms/tmsimpl/src/tmsmembuffer.cpp
branchRCL_3
changeset 18 2eb3b066cc7d
parent 13 f5c5c82a163e
child 28 ebf79c79991a
--- a/mmserv/tms/tmsimpl/src/tmsmembuffer.cpp	Tue May 11 16:42:02 2010 +0300
+++ b/mmserv/tms/tmsimpl/src/tmsmembuffer.cpp	Tue May 25 13:16:00 2010 +0300
@@ -38,7 +38,7 @@
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TRACE_PRN_FN_ENT;
-    TMSMemBuffer* self = new TMSMemBuffer;
+    TMSMemBuffer* self = new TMSMemBuffer();
     if (self)
         {
         ret = self->PostConstruct(size);
@@ -57,7 +57,7 @@
     {
     gint ret(TMS_RESULT_INSUFFICIENT_MEMORY);
     TRACE_PRN_FN_ENT;
-    TMSMemBuffer* self = new TMSMemBuffer;
+    TMSMemBuffer* self = new TMSMemBuffer();
     if (self)
         {
         self->iDataPtr = dataptr;
@@ -92,15 +92,13 @@
     return ret;
     }
 
-// Implementation of TMSBuffer interface begins
 /**
- Gets the timestamp on the Buffer so that the framework can
- determine the time at which this buffer has to be rendered
- by the output device sink.
-
- @param ts
- timestamp in microseconds
-
+ * Gets the timestamp on the Buffer so that the framework can
+ * determine the time at which this buffer has to be rendered
+ * by the output device sink.
+ *
+ * @param ts timestamp in microseconds
+ *
  */
 gint TMSMemBuffer::GetTimeStamp(guint64& ts)
     {
@@ -110,13 +108,12 @@
     }
 
 /**
- Sets the timestamp on the Buffer so that the framework can
- determine the time at which this buffer has to be rendered
- by the output device sink.
-
- @param ts
- timestamp in milliseconds
-
+ * Sets the timestamp on the Buffer so that the framework can
+ * determine the time at which this buffer has to be rendered
+ * by the output device sink.
+ *
+ * @param ts timestamp in milliseconds
+ *
  */
 gint TMSMemBuffer::SetTimeStamp(const guint64 ts)
     {
@@ -126,11 +123,10 @@
     }
 
 /**
- Gets the size of data in the buffer specified by the client.
-
- @param size
- size of data in bytes
-
+ * Gets the size of data in the buffer specified by the client.
+ *
+ * @param size size of data in bytes
+ *
  */
 gint TMSMemBuffer::GetDataSize(guint& size)
     {
@@ -140,27 +136,24 @@
     }
 
 /**
- Sets the size of data in the buffer after the client
- fill it.
-
- @param size
- size of data in bytes
-
+ * Sets the size of data in the buffer after the client fill it.
+ *
+ * @param size size of data in bytes
+ *
  */
 gint TMSMemBuffer::SetDataSize(const guint size)
     {
     gint ret(TMS_RESULT_SUCCESS);
-    iBufferSize = size;
+    iBufferSize = size; //TODO: should realloc when new size > old size (?)
     return ret;
     }
 
 /**
- Gets the pointer to the memory location associated with this
- buffer where the data is stored.
-
- @param bufptr
- ptr to the data stored in the buffer.
-
+ * Gets the pointer to the memory location associated with this
+ * buffer where the data is stored.
+ *
+ * @param bufptr ptr to the data stored in the buffer.
+ *
  */
 gint TMSMemBuffer::GetDataPtr(guint8*& bufptr)
     {