32 * Factory methods |
32 * Factory methods |
33 */ |
33 */ |
34 static gint Create(guint size, TMSBuffer*& tmsbuffer); |
34 static gint Create(guint size, TMSBuffer*& tmsbuffer); |
35 static gint Create(guint size, guint8* dataptr, TMSBuffer*& tmsbuffer); |
35 static gint Create(guint size, guint8* dataptr, TMSBuffer*& tmsbuffer); |
36 |
36 |
37 // Implementation of TMSBuffer interface begins |
37 /* |
|
38 * Returns buffer type. |
|
39 * |
|
40 * @param buftype buffer type |
|
41 * |
|
42 */ |
38 virtual gint GetType(TMSBufferType& buftype); |
43 virtual gint GetType(TMSBufferType& buftype); |
|
44 |
39 /** |
45 /** |
40 Gets the timestamp on the Buffer so that the framework can |
46 * Gets the timestamp on the Buffer so that the framework can |
41 determine the time at which this buffer has to be rendered |
47 * determine the time at which this buffer has to be rendered |
42 by the output device sink. |
48 * by the output device sink. |
43 |
49 * |
44 @param ts |
50 * @param ts buffer timestamp in microseconds |
45 timestamp in microseconds |
51 * |
46 |
|
47 */ |
52 */ |
48 virtual gint GetTimeStamp(guint64& ts); |
53 virtual gint GetTimeStamp(guint64& ts); |
49 |
54 |
50 /** |
55 /** |
51 Sets the timestamp on the Buffer so that the framework can |
56 * Sets the timestamp on the Buffer so that the framework can |
52 determine the time at which this buffer has to be rendered |
57 * determine the time at which this buffer has to be rendered |
53 by the output device sink. |
58 * by the output device sink. |
54 |
59 * |
55 @param ts |
60 * @param ts timestamp in milliseconds |
56 timestamp in milliseconds |
61 * |
57 |
|
58 */ |
62 */ |
59 virtual gint SetTimeStamp(const guint64 ts); |
63 virtual gint SetTimeStamp(const guint64 ts); |
60 |
64 |
61 /** |
65 /** |
62 Gets the size of data in the buffer specified by the client. |
66 * Gets the size of data in the buffer specified by the client. |
63 |
67 * |
64 @param size |
68 * @param size size of data in bytes |
65 size of data in bytes |
69 * |
66 |
|
67 */ |
70 */ |
68 virtual gint GetDataSize(guint& size); |
71 virtual gint GetDataSize(guint& size); |
69 |
72 |
70 /** |
73 /** |
71 Sets the size of data in the buffer after the client |
74 * Sets the size of data in the buffer after the client fill it. |
72 fill it. |
75 * |
73 |
76 * @param size size of data in bytes |
74 @param size |
77 * |
75 size of data in bytes |
|
76 |
|
77 */ |
78 */ |
78 virtual gint SetDataSize(const guint size); |
79 virtual gint SetDataSize(const guint size); |
79 |
80 |
80 /** |
81 /** |
81 Gets the pointer to the memory location associated with this |
82 * Gets the pointer to the memory location associated with this |
82 buffer where the data is stored. |
83 * buffer where the data is stored. |
83 |
84 * |
84 @param bufptr |
85 * @param bufptr ptr to the data stored in the buffer. |
85 ptr to the data stored in the buffer. |
86 * |
86 |
|
87 */ |
87 */ |
88 virtual gint GetDataPtr(guint8*& bufptr); |
88 virtual gint GetDataPtr(guint8*& bufptr); |
89 |
89 |
90 private: |
90 private: |
91 TMSMemBuffer(); |
91 TMSMemBuffer(); |