implement assuming arc mutex (non-mutable ptr) not actual variable
This commit is contained in:
parent
6b9427aec1
commit
44b647615e
1 changed files with 4 additions and 4 deletions
|
@ -7,8 +7,8 @@ use std::error::Error;
|
|||
use crate::util;
|
||||
|
||||
pub trait Decoder {
|
||||
fn write_nalu(&mut self, nalu: util::NALUPacket) -> Result<(), Box<dyn Error + Send + Sync>>;
|
||||
fn write_loop(&mut self, chan_in: mpsc::Receiver<util::NALUPacket>, err_in: mpsc::Sender<Box<dyn Error + Send + Sync>>) {
|
||||
fn write_nalu(&self, nalu: util::NALUPacket) -> Result<(), Box<dyn Error + Send + Sync>>;
|
||||
fn write_loop(&self, chan_in: mpsc::Receiver<util::NALUPacket>, err_in: mpsc::Sender<Box<dyn Error + Send + Sync>>) {
|
||||
loop {
|
||||
let nalu = match chan_in.recv() {
|
||||
Ok(x) => x,
|
||||
|
@ -20,8 +20,8 @@ pub trait Decoder {
|
|||
}
|
||||
}
|
||||
}
|
||||
fn read_raw(&mut self) -> Result<util::RawMedia, Box<dyn Error + Send + Sync>>;
|
||||
fn read_loop(&mut self, chan_out: mpsc::Sender<util::RawMedia>, err_in: mpsc::Sender<Box<dyn Error + Send + Sync>>) {
|
||||
fn read_raw(&self) -> Result<util::RawMedia, Box<dyn Error + Send + Sync>>;
|
||||
fn read_loop(&self, chan_out: mpsc::Sender<util::RawMedia>, err_in: mpsc::Sender<Box<dyn Error + Send + Sync>>) {
|
||||
loop {
|
||||
let raw_sample = match self.read_raw() {
|
||||
Ok(x) => x,
|
||||
|
|
Loading…
Reference in a new issue