mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
Fix GstByteReader bindings
This commit is contained in:
parent
225d25aee5
commit
202b88f438
3 changed files with 70 additions and 1 deletions
35
gstreamer-sharp/ByteReader.custom
Normal file
35
gstreamer-sharp/ByteReader.custom
Normal file
|
@ -0,0 +1,35 @@
|
|||
[DllImport ("libgstbase-0.10.dll", CallingConvention = CallingConvention.Cdecl) ]
|
||||
static extern bool gst_byte_reader_peek_data (IntPtr raw, uint size, out IntPtr val);
|
||||
|
||||
public bool PeekData (uint size, out byte[] val) {
|
||||
IntPtr raw_ret;
|
||||
|
||||
bool ret = gst_byte_reader_peek_data (Handle, size, out raw_ret);
|
||||
|
||||
if (!ret || raw_ret == IntPtr.Zero) {
|
||||
val = null;
|
||||
} else {
|
||||
val = new byte[size];
|
||||
Marshal.Copy (raw_ret, val, 0, (int) size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
[DllImport ("libgstbase-0.10.dll", CallingConvention = CallingConvention.Cdecl) ]
|
||||
static extern bool gst_byte_reader_get_data (IntPtr raw, uint size, out IntPtr val);
|
||||
|
||||
public bool GetData (uint size, out byte[] val) {
|
||||
IntPtr raw_ret;
|
||||
|
||||
bool ret = gst_byte_reader_get_data (Handle, size, out raw_ret);
|
||||
|
||||
if (!ret || raw_ret == IntPtr.Zero) {
|
||||
val = null;
|
||||
} else {
|
||||
val = new byte[size];
|
||||
Marshal.Copy (raw_ret, val, 0, (int) size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1080,6 +1080,39 @@
|
|||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_init']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_init_from_buffer']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/constructor[@cname='gst_byte_reader_new']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint8']" name="name">PeekUInt8</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint16_le']" name="name">PeekUInt16Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint16_be']" name="name">PeekUInt16Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint24_le']" name="name">PeekUInt24Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint24_be']" name="name">PeekUInt24Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint32_le']" name="name">PeekUInt32Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint32_be']" name="name">PeekUInt32Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint64_le']" name="name">PeekUint64Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_uint64_be']" name="name">PeekUInt64Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint8']" name="name">GetUInt8</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint16_le']" name="name">GetUInt16Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint16_be']" name="name">GetUInt16Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint24_le']" name="name">GetUInt24Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint24_be']" name="name">GetUInt24Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint32_le']" name="name">GetUInt32Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint32_be']" name="name">GetUInt32Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint64_le']" name="name">GetUint64Le</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_uint64_be']" name="name">GetUInt64Be</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_data']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_dup_data']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_data']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_dup_string_utf8']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_dup_string_utf16']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_skip_string_utf16']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_dup_string_utf32']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_skip_string_utf32']" name="hidden">1</attr>
|
||||
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_skip_string_utf8']" name="name">SkipString</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_string_utf8']" name="name">GetString</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_get_string_utf8']/parameters/parameter[@name='str']" name="pass_as">out</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_string_utf8']" name="name">PeekString</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GstByteReader']/method[@cname='gst_byte_reader_peek_string_utf8']/parameters/parameter[@name='str']" name="pass_as">out</attr>
|
||||
|
||||
|
||||
<!-- FIXME: Why can't this be parsed?! -->
|
||||
<add-node path="/api/namespace[@name='Gst.Base']">
|
||||
|
|
|
@ -114,7 +114,8 @@ customs = \
|
|||
Adapter.custom \
|
||||
Controller.custom \
|
||||
ControlSource.custom \
|
||||
VideoUtil.custom
|
||||
VideoUtil.custom \
|
||||
ByteReader.custom
|
||||
|
||||
plugin_csfiles = $(builddir)/coreplugins/generated/*.cs \
|
||||
$(builddir)/baseplugins/generated/*.cs
|
||||
|
|
Loading…
Reference in a new issue