You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add methods to Buffer for setPresentationTimestamp() setDuration(), setOffset(), and setFlags()
* new MainLoop constructor that takes a GMainContext as an argument (needed for things like gst-rtsp-server framework)
* add more setters/getters for the GstBuffer representation; plus a unit test
* rewrite BufferFlag.java to match the GstBufferFlags enum from gstreamer 1.12.3
* rewrite MiniObjectFlags.java to match the GstMiniObjectFlags enum from gstreamer 1.12.3
* @param val a ClockTime representing the duration or {@link ClockTime#NONE} when the timestamp is not known or relevant.
211
+
*/
212
+
publicvoidsetDuration(ClockTimeval)
213
+
{
214
+
this.struct.writeField("duration", val);
215
+
}
216
+
217
+
/**
218
+
* Get the offset (media-specific) of this buffer
219
+
* @return a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte in this buffer.
220
+
*/
221
+
publiclonggetOffset()
222
+
{
223
+
return (Long)this.struct.readField("offset");
224
+
}
225
+
226
+
/**
227
+
* Set the offset (media-specific) of this buffer
228
+
* @param val a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte in this buffer.
229
+
*/
230
+
publicvoidsetOffset(longval)
231
+
{
232
+
this.struct.writeField("offset", val);
233
+
}
234
+
235
+
/**
236
+
* Get the offset (media-specific) of this buffer
237
+
* @return a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte in this buffer.
238
+
*/
239
+
publiclonggetOffsetEnd()
240
+
{
241
+
return (Long)this.struct.readField("offset_end");
242
+
}
243
+
244
+
/**
245
+
* Set the offset (media-specific) of this buffer
246
+
* @param val a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte in this buffer.
247
+
*/
248
+
publicvoidsetOffsetEnd(longval)
249
+
{
250
+
this.struct.writeField("offset_end", val);
251
+
}
252
+
253
+
/**
254
+
* get the GstBufferFlags describing this buffer
255
+
* @return a bit mask whose values can be interpreted by comparing them with {@link BufferFlag}
* The {@link Buffer} marks a discontinuity in the stream.
43
46
* This typically occurs after a seek or a dropped buffer from a live or
44
47
* network source.
45
48
*/
46
-
DISCONT(MiniObjectFlags.LAST.intValue() << 1),
47
-
48
-
/** The {@link Buffer} has been added as a field in a {@link Caps}. */
49
-
IN_CAPS(MiniObjectFlags.LAST.intValue() << 2),
50
-
49
+
DISCONT(MiniObjectFlags.LAST.intValue() << 2),
50
+
51
+
/**
52
+
* The {@link Buffer} timestamps might have a discontinuity and this buffer is a good point to resynchronize.
53
+
*/
54
+
RESYNC(MiniObjectFlags.LAST.intValue() << 3),
55
+
56
+
/**
57
+
* the {@link Buffer} data is corrupted.
58
+
*/
59
+
CORRUPTED(MiniObjectFlags.LAST.intValue() << 4),
60
+
61
+
/**
62
+
* the buffer contains a media specific marker. for video this is typically the end of a frame boundary, for audio this is usually the start of a talkspurt.
63
+
*/
64
+
MARKER(MiniObjectFlags.LAST.intValue() << 5),
65
+
66
+
/**
67
+
* he buffer contains header information that is needed to decode the following data.
68
+
*/
69
+
HEADER(MiniObjectFlags.LAST.intValue() << 6),
70
+
51
71
/**
52
72
* The {@link Buffer} has been created to fill a gap in the
53
73
* stream and contains media neutral data (elements can switch to optimized code
54
74
* path that ignores the buffer content).
55
75
*/
56
-
GAP(MiniObjectFlags.LAST.intValue() << 3),
76
+
GAP(MiniObjectFlags.LAST.intValue() << 7),
77
+
78
+
/**
79
+
* the {@link Buffer} can be dropped without breaking the stream, for example to reduce bandwidth.
80
+
*/
81
+
DROPPABLE(MiniObjectFlags.LAST.intValue() << 8),
57
82
58
83
/** This unit cannot be decoded independently. */
59
-
DELTA_UNIT(MiniObjectFlags.LAST.intValue() << 4),
84
+
DELTA_UNIT(MiniObjectFlags.LAST.intValue() << 9),
85
+
86
+
/**
87
+
* this flag is set when memory of the {@link Buffer} is added/removed
Copy file name to clipboardExpand all lines: src/org/freedesktop/gstreamer/MiniObject.java
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -55,10 +55,11 @@ public static GType getType(Pointer ptr) {
55
55
}
56
56
57
57
/**
58
-
* Checks if a mini-object is writable. A mini-object is writable
59
-
* if the reference count is one and the {@link MiniObjectFlags#READONLY}
60
-
* flag is not set. Modification of a mini-object should only be
61
-
* done after verifying that it is writable.
58
+
* If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object.
59
+
*
60
+
* <p></p>If the LOCKABLE flag is not set, check if the refcount of mini_object is exactly 1, meaning that no other reference exists to the object and that the object is therefore writable.
61
+
*
62
+
* <p></p>Modification of a mini-object should only be done after verifying that it is writable.
0 commit comments