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
// Copyright (C) 2026 the prolink authors.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, version 3.
//
// SPDX-License-Identifier: GPL-3.0-only
//! Pioneer Pro DJ Link, both directions.
//!
//! - **Consume**: see the media in CDJs on the network, browse their libraries
//! the way the LINK button does, and stream their tracks.
//! - **Serve**: appear as another CDJ with a USB and an SD slot, and let real
//! players browse and play a local rekordbox medium.
//!
//! # Passive by default
//!
//! [`discovery::Discovery`] transmits **nothing**. It can be run next to a live
//! rig without contending for a device number or disturbing anything, and it is
//! enough to see every device and to pull a player's database over NFS.
//!
//! Announcing is a separate, explicit step, because it is the one that carries
//! risk: [`virtual_cdj::VirtualCdj`] claims a device number and starts emitting
//! status. That is required for anything a peer has to *offer* us — slot
//! contents, tempo master, and being browsable at all.
//!
//! # What the other players have in their slots
//!
//! [`VirtualCdj::peer_media`] answers it, and it is filled from two sources
//! because the protocol splits the answer in two. Whether a slot holds anything
//! is published in status packets and nowhere else, so it costs nothing but
//! having announced; the volume label and the track and playlist counts come
//! only from a media query, which [`VirtualCdj::survey_media`] sends. A deck
//! answers for an empty slot too, with everything zeroed, so occupancy is read
//! from the status byte rather than inferred from the counts.
//!
//! # What a device must do to be browsable
//!
//! Learned by getting each one wrong in turn, and the order matters:
//!
//! 1. **Announce** on UDP 50000 — keep-alive at least, the claim chain to hold
//! a number, and that number **must be in 1–4** (F45). Outside that range
//! every later step still works and none of them is ever reached.
//! 2. **Emit status** on UDP 50002, unicast per peer at 200 ms, with the slot
//! state set. Media presence is advertised there and nowhere else.
//! 3. **Answer media queries** with true track and playlist counts.
//! 4. **Serve NFS** — and this comes *before* dbserver. A portmapper on UDP/111
//! is mandatory: with nothing there a deck retries `GETPORT` once a second
//! indefinitely and never falls back to the well-known ports.
//! 5. **Answer the port query** on TCP 12523.
//! 6. **Serve dbserver** on the advertised port, and never answer an unknown
//! request with an error.
//! 7. Optionally answer the settings query, for LOAD SETTINGS.
// Tests are allowed to panic: an assertion *is* the failure mode, and a test
// that carefully propagated errors would report them as passes.
pub use ;
pub use Discovery;
pub use ;
pub use Interface;
pub use ;
pub use ;
pub use ;
/// The beat-packet types that appear in [`monitor`]'s signatures.
pub use ;
pub use ;
pub use ;
pub use ;
/// Re-exported so callers do not need a direct dependency on the codec crate
/// for the handful of its types that appear in this one's signatures.
pub use ;