Skip to content

Commit a5dcb6d

Browse files
committed
Change type params order.
1 parent be34b3b commit a5dcb6d

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/avfilter.ml

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ type filter_ctx
2828
type ('a, 'b, 'c) pad = {
2929
pad_name: string;
3030
filter_name: string;
31-
media_type: 'c;
31+
media_type: 'b;
3232
idx: int;
3333
filter_ctx: filter_ctx option;
3434
_config: _config option
3535
}
3636

3737
type ('a,'b) pads =
38-
(('a, 'b, [`Audio]) pad list,
39-
('a, 'b, [`Video]) pad list) av
38+
(('a, [`Audio], 'b) pad list,
39+
('a, [`Video], 'b) pad list) av
4040

4141
type 'a filter = {
4242
name: string;
@@ -99,10 +99,10 @@ let filters, buffers, sinks =
9999
let split_pads pads =
100100
let audio, video = Array.fold_left (fun (a,v) pad ->
101101
if pad.media_type = `Audio then
102-
let pad : (_, _, [`Audio]) pad = {pad with media_type = `Audio} in
102+
let pad : (_, [`Audio], _) pad = {pad with media_type = `Audio} in
103103
pad::a, v
104104
else
105-
let pad : (_, _, [`Video]) pad = {pad with media_type = `Video} in
105+
let pad : (_, [`Video], _) pad = {pad with media_type = `Video} in
106106
a, pad::v) ([],[]) pads
107107
in
108108

@@ -250,8 +250,8 @@ type ('a, 'b, 'c) parse_node = {
250250
}
251251

252252
type ('a, 'b) parse_av =
253-
(('a, 'b, [`Audio]) parse_node list,
254-
('a, 'b, [`Video]) parse_node list) av
253+
(('a, [`Audio], 'b) parse_node list,
254+
('a, [`Video], 'b) parse_node list) av
255255

256256
type 'a parse_io =
257257
(('a, [`Input]) parse_av,

src/avfilter.mli

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ type ('a, 'b) io = {
2424
outputs: 'b
2525
}
2626

27-
(** (attached/unattached, input/output, audio/video) pad *)
27+
(** (attached/unattached, audio/video, input/output) pad *)
2828
type ('a, 'b, 'c) pad
2929

3030
type ('a,'b) pads =
31-
(('a, 'b, [`Audio]) pad list,
32-
('a, 'b, [`Video]) pad list) av
31+
(('a, [`Audio], 'b) pad list,
32+
('a, [`Video], 'b) pad list) av
3333

3434
type 'a filter = {
3535
name: string;
@@ -74,7 +74,7 @@ val init : unit -> config
7474
val attach : ?args:args list -> name:string -> [`Unattached] filter -> config-> [`Attached] filter
7575

7676
(** Link two filter pads. *)
77-
val link : ([`Attached], [`Output], 'a) pad -> ([`Attached], [`Input], 'a) pad -> unit
77+
val link : ([`Attached], 'a, [`Output]) pad -> ([`Attached], 'a, [`Input]) pad -> unit
7878

7979
(** Parse a graph described by a string and attach outputs/inputs to it. *)
8080
type ('a, 'b, 'c) parse_node = {
@@ -84,8 +84,8 @@ type ('a, 'b, 'c) parse_node = {
8484
}
8585

8686
type ('a, 'b) parse_av =
87-
(('a, 'b, [`Audio]) parse_node list,
88-
('a, 'b, [`Video]) parse_node list) av
87+
(('a, [`Audio], 'b) parse_node list,
88+
('a, [`Video], 'b) parse_node list) av
8989

9090
type 'a parse_io =
9191
(('a, [`Input]) parse_av,

0 commit comments

Comments
 (0)