package metadata

  1. Overview
  2. Docs
module R : sig ... end
val read_size : synch_safe:bool -> R.t -> int
val read_size_v2 : R.t -> int
val unterminate : int -> string -> string

Remove trailing nulls.

val next_substring : int -> ?offset:int -> string -> int

Find the index of the substring after the first null-terminated substring.

val normalize_id : string -> string
val make_recode : (?source:[ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> ?target:[ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> string -> string) option -> int -> string -> string
val parse : ?recode: (?source:[ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> ?target:[ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> string -> string) -> R.t -> (string * string) list

Parse ID3v2 tags.

val parse_file : ?recode: (?source:[ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> ?target:[ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> string -> string) -> string -> (string * string) list
val dump : R.t -> string

Dump ID3v2 header.

val dump_file : string -> string
type apic = {
  1. mime : string;
  2. picture_type : int;
  3. description : string;
  4. data : string;
}

APIC data.

type pic = {
  1. pic_format : string;
  2. pic_type : int;
  3. pic_description : string;
  4. pic_data : string;
}
val parse_apic : ?recode: (?source:[ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> ?target:[ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> string -> string) -> string -> apic

Parse APIC data.

val parse_pic : ?recode: (?source:[ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> ?target:[ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] -> string -> string) -> string -> pic
type frame_id = [
  1. | `AENC
  2. | `APIC
  3. | `COMM
  4. | `COMR
  5. | `ENCR
  6. | `EQUA
  7. | `ETCO
  8. | `GEOB
  9. | `GRID
  10. | `IPLS
  11. | `MCDI
  12. | `MLLT
  13. | `OWNE
  14. | `PCNT
  15. | `POPM
  16. | `POSS
  17. | `PRIV
  18. | `RBUF
  19. | `RVAD
  20. | `RVRB
  21. | `SYLT
  22. | `SYTC
  23. | `TALB
  24. | `TBPM
  25. | `TCOM
  26. | `TCON
  27. | `TCOP
  28. | `TDAT
  29. | `TDLY
  30. | `TENC
  31. | `TEXT
  32. | `TFLT
  33. | `TIME
  34. | `TIT1
  35. | `TIT2
  36. | `TIT3
  37. | `TKEY
  38. | `TLAN
  39. | `TLEN
  40. | `TMED
  41. | `TOAL
  42. | `TOFN
  43. | `TOLY
  44. | `TOPE
  45. | `TORY
  46. | `TOWN
  47. | `TPE1
  48. | `TPE2
  49. | `TPE3
  50. | `TPE4
  51. | `TPOS
  52. | `TPUB
  53. | `TRCK
  54. | `TRDA
  55. | `TRSN
  56. | `TRSO
  57. | `TSIZ
  58. | `TSRC
  59. | `TSSE
  60. | `TXXX
  61. | `TYER
  62. | `UFID
  63. | `USER
  64. | `USLT
  65. | `WCOM
  66. | `WCOP
  67. | `WOAF
  68. | `WOAR
  69. | `WOAS
  70. | `WORS
  71. | `WPAY
  72. | `WPUB
  73. | `WXXX
]
val string_of_frame_id : [< `AENC | `APIC | `COMM | `COMR | `ENCR | `EQUA | `ETCO | `GEOB | `GRID | `IPLS | `LINK | `MCDI | `MLLT | `OWNE | `PCNT | `POPM | `POSS | `PRIV | `RBUF | `RVAD | `RVRB | `SYLT | `SYTC | `TALB | `TBPM | `TCOM | `TCON | `TCOP | `TDAT | `TDLY | `TENC | `TEXT | `TFLT | `TIME | `TIT1 | `TIT2 | `TIT3 | `TKEY | `TLAN | `TLEN | `TMED | `TOAL | `TOFN | `TOLY | `TOPE | `TORY | `TOWN | `TPE1 | `TPE2 | `TPE3 | `TPE4 | `TPOS | `TPUB | `TRCK | `TRDA | `TRSN | `TRSO | `TSIZ | `TSRC | `TSSE | `TXXX | `TYER | `UFID | `USER | `USLT | `WCOM | `WCOP | `WOAF | `WOAR | `WOAS | `WORS | `WPAY | `WPUB | `WXXX ] -> string
type frame_flag = [
  1. | `Tag_alter_perservation of bool
  2. | `File_alter_preservation of bool
]
val default_flags : [> `AENC | `EQUA | `ETCO | `MLLT | `POSS | `RVAD | `SYLT | `SYTC | `TENC | `TLEN | `TSIZ ] -> [> `File_alter_preservation of bool | `Tag_alter_perservation of bool ] list
type text_encoding = [
  1. | `ISO_8859_1
  2. | `UTF_8
  3. | `UTF_16
  4. | `UTF_16LE
  5. | `UTF_16BE
]
type frame_data = [
  1. | `Text of text_encoding * string
]
type frame = {
  1. id : frame_id;
  2. data : frame_data;
  3. flags : frame_flag list;
}
val write_string : buf:Buffer.t -> string -> unit
val write_int32 : buf:Buffer.t -> int -> unit
val write_int16 : buf:Buffer.t -> int -> unit
val write_int : buf:Buffer.t -> int -> unit
val write_size : buf:Buffer.t -> int -> unit
val render_frame_data : version:int -> [< `Text of [ `ISO_8859_1 | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] * string ] -> string
val render_frames : version:int -> frame list -> Buffer.t
val make : version:int -> frame list -> string
OCaml

Innovation. Community. Security.