capric 最近的时间轴更新
capric

capric

V2EX 第 228267 号会员,加入于 2017-04-29 07:50:15 +08:00
capric 最近回复了
用 libmpv 启用 hwdec=auto ,或者使用 ffmpeg 硬件加速+libplacebo ,播放器非常复杂,要颜色映射,hdr/sdr ,还要向上向下缩放,还有同步策略和丢帧策略,做不好不是卡就是画面偏色或者资源占用高
我跑 visual studio 2022 和 rust 自动化 runner ,用来编译代码,tiny10/tiny11 没有问题,是在 linux 下 qemu 跑的,不是物理机 https://github.com/dockur/windows
建议用 https://github.com/rust-cross/cargo-zigbuild 或者 https://github.com/cross-rs/cross 静态链接 musl ,不要静态链接 glibc ,可以动态链接 2012 年的 glibc2.17 ,就可以在主流相同指令集的 linux 上跑起来,比如 cargo zigbuild --target aarch64-unknown-linux-gnu.2.17
53 天前
回复了 HkMuxxx 创建的主题 iPhone iPhone 镜像耗电吗?
不是 DLNA ,AirPlay 镜像是屏幕声音录制,编码,加密,传输,显示端接收、解密,解码渲染,加密和编码有硬件加速,具体耗电量还得结合码率、画质看
楼上用的哪里的国补啊,我看北京的用不了啊
95 天前
回复了 bli22ard 创建的主题 Rust rust TcpStream 为什么设计读写一体
@bli22ard 实现在这里,就是很简单的 Arc 和 clone
```rust
/// Owned read half of a [`TcpStream`], created by [`into_split`].
///
/// Reading from an `OwnedReadHalf` is usually done using the convenience methods found
/// on the [`AsyncReadExt`] trait.
///
/// [`TcpStream`]: TcpStream
/// [`into_split`]: TcpStream::into_split()
/// [`AsyncReadExt`]: trait@crate::io::AsyncReadExt
#[derive(Debug)]
pub struct OwnedReadHalf {
inner: Arc<TcpStream>,
}

/// Owned write half of a [`TcpStream`], created by [`into_split`].
///
/// Note that in the [`AsyncWrite`] implementation of this type, [`poll_shutdown`] will
/// shut down the TCP stream in the write direction. Dropping the write half
/// will also shut down the write half of the TCP stream.
///
/// Writing to an `OwnedWriteHalf` is usually done using the convenience methods found
/// on the [`AsyncWriteExt`] trait.
///
/// [`TcpStream`]: TcpStream
/// [`into_split`]: TcpStream::into_split()
/// [`AsyncWrite`]: trait@crate::io::AsyncWrite
/// [`poll_shutdown`]: fn@crate::io::AsyncWrite::poll_shutdown
/// [`AsyncWriteExt`]: trait@crate::io::AsyncWriteExt
#[derive(Debug)]
pub struct OwnedWriteHalf {
inner: Arc<TcpStream>,
shutdown_on_drop: bool,
}

pub(crate) fn split_owned(stream: TcpStream) -> (OwnedReadHalf, OwnedWriteHalf) {
let arc = Arc::new(stream);
let read = OwnedReadHalf {
inner: Arc::clone(&arc),
};
let write = OwnedWriteHalf {
inner: arc,
shutdown_on_drop: true,
};
(read, write)
}
```
96 天前
回复了 bli22ard 创建的主题 Rust rust TcpStream 为什么设计读写一体
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2799 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 13:37 · PVG 21:37 · LAX 05:37 · JFK 08:37
Developed with CodeLauncher
♥ Do have faith in what you're doing.