1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
#![allow(dead_code)]
#![allow(non_camel_case_types)]
// automatically generated by rust-bindgen
// rust-bindgen -l mpv -o src/mpv_gen.rs /usr/include/mpv/opengl_cb.h

pub type ptrdiff_t = ::std::os::raw::c_long;
pub type size_t = ::std::os::raw::c_ulong;
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_Unnamed1 {
    pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
    pub __clang_max_align_nonce2: ::std::os::raw::c_double,
}
impl ::std::clone::Clone for Struct_Unnamed1 {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_Unnamed1 {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type max_align_t = Struct_Unnamed1;
pub type int8_t = ::std::os::raw::c_char;
pub type int16_t = ::std::os::raw::c_short;
pub type int32_t = ::std::os::raw::c_int;
pub type int64_t = ::std::os::raw::c_long;
pub type uint8_t = ::std::os::raw::c_uchar;
pub type uint16_t = ::std::os::raw::c_ushort;
pub type uint32_t = ::std::os::raw::c_uint;
pub type uint64_t = ::std::os::raw::c_ulong;
pub type int_least8_t = ::std::os::raw::c_char;
pub type int_least16_t = ::std::os::raw::c_short;
pub type int_least32_t = ::std::os::raw::c_int;
pub type int_least64_t = ::std::os::raw::c_long;
pub type uint_least8_t = ::std::os::raw::c_uchar;
pub type uint_least16_t = ::std::os::raw::c_ushort;
pub type uint_least32_t = ::std::os::raw::c_uint;
pub type uint_least64_t = ::std::os::raw::c_ulong;
pub type int_fast8_t = ::std::os::raw::c_char;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intptr_t = ::std::os::raw::c_long;
pub type uintptr_t = ::std::os::raw::c_ulong;
pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
pub enum Struct_mpv_handle { }
pub type mpv_handle = Struct_mpv_handle;
enum_from_primitive! {
#[derive(Clone, Copy, Debug)]
#[repr(i32)]
/// # MPV_ERROR_SUCCESS
/// No error happened (used to signal successful operation)
/// # MPV_ERROR_EVENT_QUEUE_FULL
/// The event ringbuffer is full. This means the client is choked, and can't
/// receive any events. This can happen when too many asynchronous requests
/// have been made, but not answered. Probably never happens in practice,
/// unless the mpv core is frozen for some reason, and the client keeps
/// making asynchronous requests. (Bugs in the client API implementation
/// could also trigger this, e.g. if events become "lost".)
/// # MPV_ERROR_NOMEM
/// 'Memory allocation failed' error
/// # MPV_ERROR_UNINITIALIZED
/// The mpv core wasn't configured and initialized yet. See mpv.init()
/// for additional details
/// # MPV_ERROR_INVALID_PARAMETER
/// Generic catch-all error if a parameter is set to an invalid or
/// unsupported value. This is used if there is no better error code.
///
/// ## Example
///
/// Typically this is sent when you are trying to set properties or options
/// where the value is not supported, but the format itself is
///
/// ```
/// assert!(mpv.set_option("speed",-1.0).err() == Error::MPV_ERROR_UNINITIALIZED);
/// // setting option "speed" with a negative value makes no sense
/// // however sending floats for speed make sense, hence it did not send MPV_ERROR_OPTION_FORMAT
/// ```
///
/// # MPV_ERROR_OPTION_NOT_FOUND
/// Trying to set an option that doesn't exist.
///
/// ## Example
///
/// ```
/// assert!(mpv.set_option("option_that_does_not_exist",0.5).err() == Error::MPV_ERROR_OPTION_NOT_FOUND);
/// ```
///
/// # MPV_ERROR_OPTION_FORMAT
///
/// Trying to set an option using an unsupported format.
///
/// ## Example
///
/// Sending a 'sid' value as a float.
///
/// Note that in most of the cases, when the libmpv option/property expect an integer
/// and gets a &str, it will try to convert the said str and a integer.
///
/// ```
/// assert!(mpv.set_option("loop","2").is_ok());
/// assert!(mpv.set_option("sid",4.5).err() == Error::MPV_ERROR_OPTION_FORMAT);
/// ```
///
/// # MPV_ERROR_OPTION_ERROR
/// Setting the option failed. Typically this happens if the provided option
/// value could not be parsed
/// # MPV_ERROR_PROPERTY_NOT_FOUND
/// The accessed property doesn't exist
/// # MPV_ERROR_PROPERTY_FORMAT
/// Trying to set or get a property using an unsupported MPV_FORMAT.
/// See MPV_ERROR_OPTION_FORMAT for more details.
/// # MPV_ERROR_PROPERTY_UNAVAILABLE
/// The property exists, but is not available.
///
/// ## Example
///
/// This usually happens when the
/// associated subsystem is not active, e.g. querying audio parameters while
/// audio is disabled.
/// # MPV_ERROR_PROPERTY_ERROR
/// Error setting or getting a property
/// # MPV_ERROR_COMMAND
/// General error when running a command with mpv_command and similar
/// # MPV_ERROR_LOADING_FAILED
/// Generic error on loading (used with MpvEventEndFile.error).
/// # MPV_ERROR_AO_INIT_FAILED
/// Initializing the audio output failed.
/// # MPV_ERROR_VO_INIT_FAILED
/// Initializing the video output failed.
///
/// # MPV_ERROR_NOTHING_TO_PLAY
/// There was no audio or video data to play. This also happens if the
/// file was recognized, but did not contain any audio or video streams,
/// or no streams were selected.
///
/// # MPV_ERROR_UNKNOWN_FORMAT
///
/// When trying to load the file, the file format could not be determined,
/// or the file was too broken to open it.
/// # MPV_ERROR_UNSUPPORTED
/// Generic error for signaling that certain system requirements are not
/// fulfilled.
/// # MPV_ERROR_NOT_IMPLEMENTED
/// The libmpv API function which was called is a stub only
/// Note that unimplemented mpv-rs functions will simply panic with unimplemented!()
pub enum Error {
    MPV_ERROR_SUCCESS = 0,
    MPV_ERROR_EVENT_QUEUE_FULL = -1,
    MPV_ERROR_NOMEM = -2,
    MPV_ERROR_UNINITIALIZED = -3,
    MPV_ERROR_INVALID_PARAMETER = -4,
    MPV_ERROR_OPTION_NOT_FOUND = -5,
    MPV_ERROR_OPTION_FORMAT = -6,
    MPV_ERROR_OPTION_ERROR = -7,
    MPV_ERROR_PROPERTY_NOT_FOUND = -8,
    MPV_ERROR_PROPERTY_FORMAT = -9,
    MPV_ERROR_PROPERTY_UNAVAILABLE = -10,
    MPV_ERROR_PROPERTY_ERROR = -11,
    MPV_ERROR_COMMAND = -12,
    MPV_ERROR_LOADING_FAILED = -13,
    MPV_ERROR_AO_INIT_FAILED = -14,
    MPV_ERROR_VO_INIT_FAILED = -15,
    MPV_ERROR_NOTHING_TO_PLAY = -16,
    MPV_ERROR_UNKNOWN_FORMAT = -17,
    MPV_ERROR_UNSUPPORTED = -18,
    MPV_ERROR_NOT_IMPLEMENTED = -19,
}
}
enum_from_primitive! {
#[derive(Clone, Copy, Debug)]
#[repr(u32)]
pub enum MpvFormat {
    MPV_FORMAT_NONE = 0,
    MPV_FORMAT_STRING = 1,
    MPV_FORMAT_OSD_STRING = 2,
    MPV_FORMAT_FLAG = 3,
    MPV_FORMAT_INT64 = 4,
    MPV_FORMAT_DOUBLE = 5,
    MPV_FORMAT_NODE = 6,
    MPV_FORMAT_NODE_ARRAY = 7,
    MPV_FORMAT_NODE_MAP = 8,
    MPV_FORMAT_BYTE_ARRAY = 9,
}
}
pub type mpv_format = MpvFormat;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_node {
    pub u: Union_Unnamed2,
    pub format: mpv_format,
}
impl ::std::clone::Clone for Struct_mpv_node {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_node {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
#[repr(C)]
#[derive(Copy)]
pub struct Union_Unnamed2 {
    pub _bindgen_data_: [u64; 1usize],
}
impl Union_Unnamed2 {
    pub unsafe fn string(&mut self) -> *mut *mut ::std::os::raw::c_char {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
    pub unsafe fn flag(&mut self) -> *mut ::std::os::raw::c_int {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
    pub unsafe fn int64(&mut self) -> *mut int64_t {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
    pub unsafe fn double_(&mut self) -> *mut ::std::os::raw::c_double {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
    pub unsafe fn list(&mut self) -> *mut *mut Struct_mpv_node_list {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
    pub unsafe fn ba(&mut self) -> *mut *mut Struct_mpv_byte_array {
        let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
        ::std::mem::transmute(raw.offset(0))
    }
}
impl ::std::clone::Clone for Union_Unnamed2 {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Union_Unnamed2 {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_node = Struct_mpv_node;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_node_list {
    pub num: ::std::os::raw::c_int,
    pub values: *mut mpv_node,
    pub keys: *mut *mut ::std::os::raw::c_char,
}
impl ::std::clone::Clone for Struct_mpv_node_list {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_node_list {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_node_list = Struct_mpv_node_list;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_byte_array {
    pub data: *mut ::std::os::raw::c_void,
    pub size: size_t,
}
impl ::std::clone::Clone for Struct_mpv_byte_array {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_byte_array {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_byte_array = Struct_mpv_byte_array;
enum_from_primitive! {
#[derive(Clone, Copy, Debug)]
#[repr(u32)]
pub enum MpvEventId {
    MPV_EVENT_NONE = 0,
    MPV_EVENT_SHUTDOWN = 1,
    MPV_EVENT_LOG_MESSAGE = 2,
    MPV_EVENT_GET_PROPERTY_REPLY = 3,
    MPV_EVENT_SET_PROPERTY_REPLY = 4,
    MPV_EVENT_COMMAND_REPLY = 5,
    MPV_EVENT_START_FILE = 6,
    MPV_EVENT_END_FILE = 7,
    MPV_EVENT_FILE_LOADED = 8,
    MPV_EVENT_TRACKS_CHANGED = 9,
    MPV_EVENT_TRACK_SWITCHED = 10,
    MPV_EVENT_IDLE = 11,
    MPV_EVENT_PAUSE = 12,
    MPV_EVENT_UNPAUSE = 13,
    MPV_EVENT_TICK = 14,
    MPV_EVENT_SCRIPT_INPUT_DISPATCH = 15,
    MPV_EVENT_CLIENT_MESSAGE = 16,
    MPV_EVENT_VIDEO_RECONFIG = 17,
    MPV_EVENT_AUDIO_RECONFIG = 18,
    MPV_EVENT_METADATA_UPDATE = 19,
    MPV_EVENT_SEEK = 20,
    MPV_EVENT_PLAYBACK_RESTART = 21,
    MPV_EVENT_PROPERTY_CHANGE = 22,
    MPV_EVENT_CHAPTER_CHANGE = 23,
    MPV_EVENT_QUEUE_OVERFLOW = 24,
}
}
pub type mpv_event_id = MpvEventId;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event_property {
    pub name: *const ::std::os::raw::c_char,
    pub format: mpv_format,
    pub data: *mut ::std::os::raw::c_void,
}
impl ::std::clone::Clone for Struct_mpv_event_property {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event_property {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event_property = Struct_mpv_event_property;
enum_from_primitive! {
#[derive(Clone, Copy, Debug)]
#[repr(u32)]
pub enum LogLevel {
    MPV_LOG_LEVEL_NONE = 0,
    MPV_LOG_LEVEL_FATAL = 10,
    MPV_LOG_LEVEL_ERROR = 20,
    MPV_LOG_LEVEL_WARN = 30,
    MPV_LOG_LEVEL_INFO = 40,
    MPV_LOG_LEVEL_V = 50,
    MPV_LOG_LEVEL_DEBUG = 60,
    MPV_LOG_LEVEL_TRACE = 70,
}
}
pub type mpv_log_level = LogLevel;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event_log_message {
    pub prefix: *const ::std::os::raw::c_char,
    pub level: *const ::std::os::raw::c_char,
    pub text: *const ::std::os::raw::c_char,
    pub log_level: mpv_log_level,
}
impl ::std::clone::Clone for Struct_mpv_event_log_message {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event_log_message {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event_log_message = Struct_mpv_event_log_message;
enum_from_primitive! {
#[derive(Clone, Copy, Debug)]
#[repr(u32)]
pub enum EndFileReason {
    MPV_END_FILE_REASON_EOF = 0,
    MPV_END_FILE_REASON_STOP = 2,
    MPV_END_FILE_REASON_QUIT = 3,
    MPV_END_FILE_REASON_ERROR = 4,
    MPV_END_FILE_REASON_REDIRECT = 5,
}
}
pub type mpv_end_file_reason = EndFileReason;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event_end_file {
    pub reason: ::std::os::raw::c_int,
    pub error: ::std::os::raw::c_int,
}
impl ::std::clone::Clone for Struct_mpv_event_end_file {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event_end_file {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event_end_file = Struct_mpv_event_end_file;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event_script_input_dispatch {
    pub arg0: ::std::os::raw::c_int,
    pub _type: *const ::std::os::raw::c_char,
}
impl ::std::clone::Clone for Struct_mpv_event_script_input_dispatch {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event_script_input_dispatch {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event_script_input_dispatch = Struct_mpv_event_script_input_dispatch;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event_client_message {
    pub num_args: ::std::os::raw::c_int,
    pub args: *mut *const ::std::os::raw::c_char,
}
impl ::std::clone::Clone for Struct_mpv_event_client_message {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event_client_message {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event_client_message = Struct_mpv_event_client_message;
#[repr(C)]
#[derive(Copy)]
pub struct Struct_mpv_event {
    pub event_id: mpv_event_id,
    pub error: ::std::os::raw::c_int,
    pub reply_userdata: uint64_t,
    pub data: *mut ::std::os::raw::c_void,
}
impl ::std::clone::Clone for Struct_mpv_event {
    fn clone(&self) -> Self {
        *self
    }
}
impl ::std::default::Default for Struct_mpv_event {
    fn default() -> Self {
        unsafe { ::std::mem::zeroed() }
    }
}
pub type mpv_event = Struct_mpv_event;
#[derive(Clone, Copy)]
#[repr(u32)]

pub enum SubApi {
    MPV_SUB_API_OPENGL_CB = 1,
    ///
    /// Rust does not allow Enums with a single variant, hence we must add another value to the
    /// existing enum. Thus 'NOTHING' has no utility
    NOTHING,
}
pub type mpv_sub_api = SubApi;
pub enum Struct_mpv_opengl_cb_context { }
pub type mpv_opengl_cb_context = Struct_mpv_opengl_cb_context;
pub type mpv_opengl_cb_update_fn =
    ::std::option::Option<unsafe extern "C" fn(cb_ctx: *mut ::std::os::raw::c_void)>;
pub type mpv_opengl_cb_get_proc_address_fn =
    ::std::option::Option<unsafe extern "C" fn(fn_ctx: *mut ::std::os::raw::c_void,
                                                 name: *const ::std::os::raw::c_char)
                                                 -> *mut ::std::os::raw::c_void>;
#[link(name = "mpv")]
extern "C" {
    pub fn mpv_client_api_version() -> ::std::os::raw::c_ulong;
    pub fn mpv_error_string(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
    pub fn mpv_free(data: *mut ::std::os::raw::c_void);
    pub fn mpv_client_name(ctx: *mut mpv_handle) -> *const ::std::os::raw::c_char;
    pub fn mpv_create() -> *mut mpv_handle;
    pub fn mpv_initialize(ctx: *mut mpv_handle) -> ::std::os::raw::c_int;
    pub fn mpv_detach_destroy(ctx: *mut mpv_handle);
    pub fn mpv_terminate_destroy(ctx: *mut mpv_handle);
    pub fn mpv_create_client(ctx: *mut mpv_handle,
                             name: *const ::std::os::raw::c_char)
                             -> *mut mpv_handle;
    pub fn mpv_load_config_file(ctx: *mut mpv_handle,
                                filename: *const ::std::os::raw::c_char)
                                -> ::std::os::raw::c_int;
    pub fn mpv_suspend(ctx: *mut mpv_handle);
    pub fn mpv_resume(ctx: *mut mpv_handle);
    pub fn mpv_get_time_us(ctx: *mut mpv_handle) -> int64_t;
    pub fn mpv_free_node_contents(node: *mut mpv_node);
    pub fn mpv_set_option(ctx: *mut mpv_handle,
                          name: *const ::std::os::raw::c_char,
                          format: mpv_format,
                          data: *mut ::std::os::raw::c_void)
                          -> ::std::os::raw::c_int;
    pub fn mpv_set_option_string(ctx: *mut mpv_handle,
                                 name: *const ::std::os::raw::c_char,
                                 data: *const ::std::os::raw::c_char)
                                 -> ::std::os::raw::c_int;
    pub fn mpv_command(ctx: *mut mpv_handle,
                       args: *mut *const ::std::os::raw::c_char)
                       -> ::std::os::raw::c_int;
    pub fn mpv_command_node(ctx: *mut mpv_handle,
                            args: *mut mpv_node,
                            result: *mut mpv_node)
                            -> ::std::os::raw::c_int;
    pub fn mpv_command_string(ctx: *mut mpv_handle,
                              args: *const ::std::os::raw::c_char)
                              -> ::std::os::raw::c_int;
    pub fn mpv_command_async(ctx: *mut mpv_handle,
                             reply_userdata: uint64_t,
                             args: *mut *const ::std::os::raw::c_char)
                             -> ::std::os::raw::c_int;
    pub fn mpv_command_node_async(ctx: *mut mpv_handle,
                                  reply_userdata: uint64_t,
                                  args: *mut mpv_node)
                                  -> ::std::os::raw::c_int;
    pub fn mpv_set_property(ctx: *mut mpv_handle,
                            name: *const ::std::os::raw::c_char,
                            format: mpv_format,
                            data: *mut ::std::os::raw::c_void)
                            -> ::std::os::raw::c_int;
    pub fn mpv_set_property_string(ctx: *mut mpv_handle,
                                   name: *const ::std::os::raw::c_char,
                                   data: *const ::std::os::raw::c_char)
                                   -> ::std::os::raw::c_int;
    pub fn mpv_set_property_async(ctx: *mut mpv_handle,
                                  reply_userdata: uint64_t,
                                  name: *const ::std::os::raw::c_char,
                                  format: mpv_format,
                                  data: *mut ::std::os::raw::c_void)
                                  -> ::std::os::raw::c_int;
    pub fn mpv_get_property(ctx: *mut mpv_handle,
                            name: *const ::std::os::raw::c_char,
                            format: mpv_format,
                            data: *mut ::std::os::raw::c_void)
                            -> ::std::os::raw::c_int;
    pub fn mpv_get_property_string(ctx: *mut mpv_handle,
                                   name: *const ::std::os::raw::c_char)
                                   -> *mut ::std::os::raw::c_char;
    pub fn mpv_get_property_osd_string(ctx: *mut mpv_handle,
                                       name: *const ::std::os::raw::c_char)
                                       -> *mut ::std::os::raw::c_char;
    pub fn mpv_get_property_async(ctx: *mut mpv_handle,
                                  reply_userdata: uint64_t,
                                  name: *const ::std::os::raw::c_char,
                                  format: mpv_format)
                                  -> ::std::os::raw::c_int;
    pub fn mpv_observe_property(mpv: *mut mpv_handle,
                                reply_userdata: uint64_t,
                                name: *const ::std::os::raw::c_char,
                                format: mpv_format)
                                -> ::std::os::raw::c_int;
    pub fn mpv_unobserve_property(mpv: *mut mpv_handle,
                                  registered_reply_userdata: uint64_t)
                                  -> ::std::os::raw::c_int;
    pub fn mpv_event_name(event: mpv_event_id) -> *const ::std::os::raw::c_char;
    pub fn mpv_request_event(ctx: *mut mpv_handle,
                             event: mpv_event_id,
                             enable: ::std::os::raw::c_int)
                             -> ::std::os::raw::c_int;
    pub fn mpv_request_log_messages(ctx: *mut mpv_handle,
                                    min_level: *const ::std::os::raw::c_char)
                                    -> ::std::os::raw::c_int;
    pub fn mpv_wait_event(ctx: *mut mpv_handle,
                          timeout: ::std::os::raw::c_double)
                          -> *mut mpv_event;
    pub fn mpv_wakeup(ctx: *mut mpv_handle);
    pub fn mpv_set_wakeup_callback(ctx: *mut mpv_handle,
                                   cb:
                                       ::std::option::Option<unsafe extern "C" fn(d:
                                                                                      *mut ::std::os::raw::c_void)>,
                                   d: *mut ::std::os::raw::c_void);
    pub fn mpv_get_wakeup_pipe(ctx: *mut mpv_handle) -> ::std::os::raw::c_int;
    pub fn mpv_wait_async_requests(ctx: *mut mpv_handle);
    pub fn mpv_get_sub_api(ctx: *mut mpv_handle,
                           sub_api: mpv_sub_api)
                           -> *mut ::std::os::raw::c_void;
    pub fn mpv_opengl_cb_set_update_callback(ctx: *mut mpv_opengl_cb_context,
                                             callback: mpv_opengl_cb_update_fn,
                                             callback_ctx: *mut ::std::os::raw::c_void);
    pub fn mpv_opengl_cb_init_gl(ctx: *mut mpv_opengl_cb_context,
                                 exts: *const ::std::os::raw::c_char,
                                 get_proc_address: mpv_opengl_cb_get_proc_address_fn,
                                 get_proc_address_ctx: *mut ::std::os::raw::c_void)
                                 -> ::std::os::raw::c_int;
    pub fn mpv_opengl_cb_draw(ctx: *mut mpv_opengl_cb_context,
                              fbo: ::std::os::raw::c_int,
                              w: ::std::os::raw::c_int,
                              h: ::std::os::raw::c_int)
                              -> ::std::os::raw::c_int;
    pub fn mpv_opengl_cb_render(ctx: *mut mpv_opengl_cb_context,
                                fbo: ::std::os::raw::c_int,
                                vp: *mut ::std::os::raw::c_int)
                                -> ::std::os::raw::c_int;
    pub fn mpv_opengl_cb_report_flip(ctx: *mut mpv_opengl_cb_context,
                                     time: int64_t)
                                     -> ::std::os::raw::c_int;
    pub fn mpv_opengl_cb_uninit_gl(ctx: *mut mpv_opengl_cb_context) -> ::std::os::raw::c_int;
}