2021-08-15 15:07:16 +03:00
|
|
|
$ fq -i -d mp3 . /test.mp3
|
|
|
|
mp3> .headers[0].flags | ., tovalue, type, length?
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.headers[0].flags{}:
|
2020-06-08 03:29:51 +03:00
|
|
|
0x0| 00 | . | unsynchronisation: false
|
|
|
|
0x0| 00 | . | extended_header: false
|
|
|
|
0x0| 00 | . | experimental_indicator: false
|
|
|
|
0x0| 00 | . | unused: 0
|
2021-08-12 00:51:00 +03:00
|
|
|
{
|
|
|
|
"experimental_indicator": false,
|
|
|
|
"extended_header": false,
|
|
|
|
"unsynchronisation": false,
|
|
|
|
"unused": 0
|
|
|
|
}
|
2020-06-08 03:29:51 +03:00
|
|
|
"object"
|
|
|
|
4
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[0] | ., type, length?
|
2021-08-12 00:51:00 +03:00
|
|
|
error: expected an array with index 0 but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[-1000] | ., type, length?
|
2021-08-12 00:51:00 +03:00
|
|
|
error: expected an array with index -2 but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[1000] | ., type, length?
|
2021-08-12 00:51:00 +03:00
|
|
|
error: expected an array with index -1 but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[1:3] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
error: expected an array but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[0:-1] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
error: expected an array but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[-1000:2000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
error: expected an array but got: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags["test"] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> [.headers[0].flags[]] | type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"array"
|
|
|
|
4
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | keys
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"unsynchronisation",
|
|
|
|
"extended_header",
|
|
|
|
"experimental_indicator",
|
|
|
|
"unused"
|
|
|
|
]
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | has("a")
|
2020-06-08 03:29:51 +03:00
|
|
|
false
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | has(0)
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot check whether object has a key: 0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | type
|
2020-06-08 03:29:51 +03:00
|
|
|
"object"
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | tonumber
|
2020-06-08 03:29:51 +03:00
|
|
|
error: tonumber cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | tostring
|
2020-06-08 03:29:51 +03:00
|
|
|
error: tostring cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags + ""
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot add: object ({"experimental_indicator" ...}) and string ("")
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags + 1
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot add: object ({"experimental_indicator" ...}) and number (1)
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._start | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
40
|
|
|
|
"number"
|
|
|
|
40
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._stop | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
48
|
|
|
|
"number"
|
|
|
|
48
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._len | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
8
|
|
|
|
"number"
|
|
|
|
8
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._name | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"flags"
|
|
|
|
"string"
|
|
|
|
5
|
2021-11-03 19:19:33 +03:00
|
|
|
mp3> .headers[0].flags._sym | ., type, length?
|
2021-11-05 19:24:49 +03:00
|
|
|
null
|
|
|
|
"null"
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._description | ., type, length?
|
2021-11-19 13:44:23 +03:00
|
|
|
null
|
|
|
|
"null"
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._path | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"headers",
|
|
|
|
0,
|
|
|
|
"flags"
|
|
|
|
]
|
|
|
|
"array"
|
|
|
|
3
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._bits | ., type, length?
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0| 00 | . |.: raw bits 0x5-0x5.7 (1)
|
2020-06-08 03:29:51 +03:00
|
|
|
"buffer"
|
|
|
|
8
|
2021-09-27 23:42:34 +03:00
|
|
|
mp3>
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._bytes | ., type, length?
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0| 00 | . |.: raw bits 0x5-0x5.7 (1)
|
2020-06-08 03:29:51 +03:00
|
|
|
"buffer"
|
|
|
|
1
|
2021-09-27 23:42:34 +03:00
|
|
|
mp3>
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._error | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags._unknown | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
false
|
|
|
|
"boolean"
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags.a = 1
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[0] = 1
|
|
|
|
error: expected an array with index 0 but got: object
|
|
|
|
mp3> .headers[0].flags.a |= empty
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags[0] |= empty
|
|
|
|
error: expected an array with index 0 but got: object
|
|
|
|
mp3> .headers[0].flags | setpath(["a"]; 1)
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | setpath([0]; 1)
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | delpaths([["a"]])
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0].flags | delpaths([[0]])
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: object
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> ^D
|