Created
July 1, 2020 12:38
-
-
Save albert-tomanek/f6dcf4af0aadbc4792b1af7e4e30531b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile: valac ex.vala --pkg gstreamer-1.0 | |
// | |
// From VAPI: | |
// | |
// [ SimpleType ] | |
// public struct ClockTime : uint64 | |
// { | |
// } | |
// | |
// From gstclock.h: | |
// | |
// /** | |
// * GstClockTime: | |
// * | |
// * A datatype to hold a time, measured in nanoseconds. | |
// */ | |
// typedef guint64 GstClockTime; | |
// | |
// /** | |
// * GST_TYPE_CLOCK_TIME: | |
// * | |
// * The #GType of a #GstClockTime. | |
// */ | |
// #define GST_TYPE_CLOCK_TIME G_TYPE_UINT64 | |
namespace _Gst | |
{ | |
[SimpleType] | |
[CCode(type_id = "G_TYPE_UINT64")] | |
public struct ClockTime : uint64 | |
{ | |
} | |
} | |
class Foo : Object | |
{ | |
public _Gst.ClockTime duration { get; set; default = 4 * Gst.SECOND; } | |
} | |
void main() | |
{ | |
var f = new Foo(); | |
f.duration = 5; | |
print(@"$(f.duration)\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment