1
0
mirror of https://github.com/danog/libdvb.git synced 2024-11-30 04:19:00 +01:00
This commit is contained in:
Daniil Gentili 2022-03-27 18:31:48 +02:00
parent 9f1988adb8
commit 38f2db4e38
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
5 changed files with 12 additions and 9 deletions

View File

@ -12,8 +12,8 @@ categories = ["api-bindings", "hardware-support"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
nix = "0.19" nix = "^0.23"
anyhow = "1.0" anyhow = "^1.0"
strum = { version = "0.23", features = ["derive"] } strum = { version = "^0.23", features = ["derive"] }
bitflags = "1.3.2" bitflags = "^1.3.2"
itertools = "0.10.2" itertools = "^0.10.2"

View File

@ -1,6 +1,6 @@
use { use {
anyhow::{bail, Context, Result}, anyhow::{bail, Context, Result},
libdvb::{FeDevice, FeStatus}, libdvb_rs::{FeDevice, FeStatus},
}; };
fn main() -> Result<()> { fn main() -> Result<()> {

View File

@ -1,6 +1,6 @@
use { use {
anyhow::{bail, Context, Result}, anyhow::{bail, Context, Result},
libdvb::{FeDevice, FeStatus}, libdvb_rs::{FeDevice, FeStatus},
std::{thread, time::Duration}, std::{thread, time::Duration},
}; };

View File

@ -1,6 +1,6 @@
use { use {
anyhow::{bail, Context, Result}, anyhow::{bail, Context, Result},
libdvb::NetDevice, libdvb_rs::NetDevice,
}; };
fn main() -> Result<()> { fn main() -> Result<()> {
@ -18,7 +18,7 @@ fn main() -> Result<()> {
let dev = NetDevice::open(adapter, device)?; let dev = NetDevice::open(adapter, device)?;
let interface = dev.add_if(0, libdvb::net::sys::DVB_NET_FEEDTYPE_MPE)?; let interface = dev.add_if(0, libdvb_rs::net::sys::DVB_NET_FEEDTYPE_MPE)?;
println!("Interface: {}", &interface); println!("Interface: {}", &interface);
let mac = interface.get_mac(); let mac = interface.get_mac();
println!("MAC: {}", &mac); println!("MAC: {}", &mac);

View File

@ -863,6 +863,9 @@ macro_rules! dtv_property {
( $property:ident($data:expr) ) => { ( $property:ident($data:expr) ) => {
$property(DtvPropertyRequest::new($data)) $property(DtvPropertyRequest::new($data))
}; };
( $property:ident, $data:expr ) => {
$property(DtvPropertyRequest::new($data))
};
} }
#[macro_export] #[macro_export]