oysteikt
0e5e43c088
event_parser: add some unit tests
Build and test / check (push) Successful in 52s
Build and test / build (push) Successful in 1m19s
Build and test / docs (push) Successful in 1m23s
Build and test / test (push) Successful in 2m27s
2026-01-02 21:00:32 +09:00
oysteikt
2643ed547b
property_parsers: add doccomment for LoopProperty
2026-01-02 21:00:32 +09:00
oysteikt
ca0e04ab13
src/event_parser: more doccomments for public items
2026-01-02 21:00:31 +09:00
oysteikt
c4b77dd198
Change rust edition from 2021 -> 2024
Build and test / build (push) Successful in 54s
Build and test / check (push) Successful in 55s
Build and test / docs (push) Successful in 1m24s
Build and test / test (push) Failing after 2m9s
2025-12-15 09:52:24 +09:00
oysteikt
5a74dd0b02
highlevel_api: fix pause toggling
Build and test / docs (push) Has been cancelled
Build and test / check (push) Successful in 1m9s
Build and test / build (push) Successful in 1m10s
Build and test / test (push) Successful in 2m33s
2024-12-15 17:37:48 +01:00
oysteikt
ee5aa30335
core: mark MpvDataType as serde(untagged)
Build and test / build (push) Waiting to run
Build and test / check (push) Waiting to run
Build and test / test (push) Waiting to run
Build and test / docs (push) Waiting to run
2024-12-15 16:21:25 +01:00
oysteikt
e3297bef15
event_parser: make id optional
Build and test / build (push) Waiting to run
Build and test / check (push) Waiting to run
Build and test / test (push) Waiting to run
Build and test / docs (push) Waiting to run
2024-12-15 15:31:01 +01:00
oysteikt
99884b670d
property_parser: fix typo in docstring
Build and test / build (push) Successful in 10m30s
Build and test / check (push) Successful in 10m36s
Build and test / test (push) Successful in 2m20s
Build and test / docs (push) Successful in 12m5s
2024-12-14 13:52:58 +01:00
oysteikt
3fe7417d4c
core: add docstrings for variants of MpvCommand
2024-12-14 13:52:57 +01:00
oysteikt
eb7277e4fd
treewide: fix type for property change event ids
2024-12-14 13:51:12 +01:00
oysteikt
81479d2f64
MpvError: add copy of command for better context
Build and test / test (push) Successful in 2m13s
Build and test / build (push) Successful in 10m26s
Build and test / docs (push) Successful in 11m19s
Build and test / check (push) Successful in 10m27s
2024-12-12 16:36:42 +01:00
oysteikt
ac863c571e
core_api: add Default for Playlist
2024-12-12 14:47:55 +01:00
oysteikt
467cac3c50
fix inverted switch for MpvExt::set_playback
Build and test / build (push) Successful in 1m56s
Build and test / check (push) Successful in 1m55s
Build and test / docs (push) Successful in 3m57s
Build and test / test (push) Successful in 3m57s
2024-08-03 21:02:46 +02:00
oysteikt
6a0a275f64
cargo fmt + clippy
Build and test / build (push) Successful in 1m58s
Build and test / check (push) Successful in 1m58s
Build and test / docs (push) Successful in 2m16s
Build and test / test (push) Successful in 3m27s
2024-08-03 17:07:52 +02:00
oysteikt
961da5b301
rename project from mpvipc to mpvipc-async
2024-08-03 17:07:09 +02:00
oysteikt
cbd8b1aed2
Add TODO for missing async response events
2024-08-03 16:02:17 +02:00
oysteikt
93366593c7
Allow a few more highlevel types to be nullable
2024-08-03 15:38:46 +02:00
oysteikt
eb81d7c463
reuse property_parser for highlevel api, add more highlevel functions
2024-05-04 23:01:17 +02:00
oysteikt
650507e680
add support for parsing playlists as events + more
...
This brings several changes with it:
- `Mpv::get_property` now returns `Option`s in case `data` is
nonexistent. There could be cases where this is different from
`MpvDataType::Null` and `MpvDataType::MinusOne`.
- `MpvError` now implements `PartialEq`
2024-05-04 18:45:32 +02:00
oysteikt
e044246cba
fixup: fmt + clippy
2024-05-04 00:23:02 +02:00
oysteikt
f1687fe07b
add/fix more docstrings
2024-05-04 00:23:01 +02:00
oysteikt
2736d1d7ad
wrap event data in Option
2024-05-03 22:29:28 +02:00
oysteikt
878cebbc9f
use usize for request ids
2024-05-03 22:29:27 +02:00
oysteikt
cb0921144d
rework error messages
2024-05-03 22:29:25 +02:00
oysteikt
7eec34ce00
split property parsing from event parsing:
...
Build and test / build (pull_request) Successful in 1m55s
Build and test / check (pull_request) Successful in 1m52s
Build and test / docs (pull_request) Successful in 2m21s
Build and test / test (pull_request) Successful in 4m9s
Build and test / check (push) Successful in 1m55s
Build and test / build (push) Successful in 1m57s
Build and test / docs (push) Successful in 2m43s
Build and test / test (push) Successful in 5m33s
High-level properties are now optional, considering there are about a
thousand of them to parse. The high-level properties are a few chosen
ones that I suspect might be useful for most people, with catch-all enum
variants for the less common ones.
2024-05-02 21:16:23 +02:00
oysteikt
f5ca2ebde9
add more tests, fix event/command response race condition
Build and test / check (pull_request) Successful in 1m56s
Build and test / build (pull_request) Successful in 1m57s
Build and test / docs (pull_request) Successful in 2m30s
Build and test / test (pull_request) Successful in 4m0s
Build and test / check (push) Successful in 1m55s
Build and test / build (push) Successful in 1m56s
Build and test / docs (push) Successful in 3m2s
Build and test / test (push) Successful in 3m59s
2024-05-01 23:45:42 +02:00
oysteikt
64bf743c6c
clean: add docstrings, move a few things around
2024-05-01 22:22:45 +02:00
oysteikt
7e20ff9b56
api: split into several files
2024-04-30 17:39:33 +02:00
oysteikt
3be7b2bda6
cargo fmt + clippy
Build and test / check (push) Successful in 1m55s
Build and test / build (push) Successful in 1m59s
Build and test / test (push) Successful in 2m30s
2024-04-30 02:13:57 +02:00
oysteikt
75645c5880
api: move highlevel functions into extension
2024-04-30 02:07:08 +02:00
oysteikt
aacde5df12
Create event stream
2024-04-30 02:07:04 +02:00
oysteikt
deb45a4570
Make entire project async
...
This moves all communication with Mpv's unix socket into another tokio
task, and uses message passing through clonable mpsc channels to receive
commands to execute, and to send responses.
2024-04-19 00:59:22 +02:00
oysteikt
f5c9674b78
Misc: refactor + serde serialization derives
...
- Split content into more files
- Refactor TypeHandler impls
- Add serialization traits to public structs/enums
2024-04-16 23:11:19 +02:00
oysteikt
6d2575b940
Add Clone and Copy to several public structs
2024-04-16 20:54:17 +02:00
Jonas Frei
9e3ec12894
Generate JSON string with serde_json
...
Closes #3
2023-08-02 11:15:37 +02:00
Jonas Frei
ff7a7b7c9d
Added mpv commands script-message and script-message-to
2023-07-31 20:19:03 +02:00
Jonas Frei
cea343cd3b
Merge branch 'add-client-message-event' into 'master'
...
Add support for `client-message` events
See merge request mpv-ipc/mpvipc!4
2023-07-31 07:30:06 +00:00
naglis
f023be48f7
Use cycle command for toggling play/pause
...
This way we do not need to get the `pause` property first.
2023-07-31 00:47:04 +03:00
naglis
83abe0bf62
Add support for client-message events
...
These events are issued [1] when clients communicate to each other using
`script-message` [2] and `script-message-to` [3] commands.
[1]: https://mpv.io/manual/stable/#command-interface-client-message
[2]: https://mpv.io/manual/stable/#command-interface-script-message
[3]: https://mpv.io/manual/stable/#command-interface-script-message-to
2023-07-30 23:14:20 +03:00
jole
9fde540089
do not panic on message without event field
...
intead discard it and try again
2022-07-19 21:27:02 +02:00
jole
fded248b7e
minor cleanup: run_mpv_command()
2022-07-19 21:07:20 +02:00
jole
71b148cce4
auto formatting
2022-07-19 21:06:47 +02:00
jole
be2132735b
remove comments
2022-07-19 21:06:34 +02:00
jole
cc9f2cae53
fix potential bug
...
could potentially return MpvError("success")
2022-07-19 21:00:30 +02:00
jole
fde2bce07d
clean up get_mpv_property_string()
2022-07-19 20:54:44 +02:00
jole
8b5d3bc0fd
clean up listen()
2022-07-19 20:34:11 +02:00
Jonas Frei
442f121b2e
Using _isize_ instead of _usize_ for observation as per mpv documentation
2022-07-10 20:59:52 +02:00
Jonas Frei
b21f0c804b
Added Observe/Unobserve MpvCommand.
...
Closes #2
2022-07-10 15:23:58 +02:00
Christoph Herzog
9552cad8ef
Add method to call custom commands
2019-10-30 01:13:52 +01:00
Christoph Herzog
8e47f52803
Implement std::error::Error for Error
2019-10-30 01:11:44 +01:00