util/frame: make it Send
This commit is contained in:
parent
08d1188d2c
commit
41a35bc542
@ -147,6 +147,8 @@ impl Frame {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Frame { }
|
||||
|
||||
impl Clone for Frame {
|
||||
fn clone(&self) -> Self {
|
||||
unsafe {
|
||||
@ -237,6 +239,8 @@ impl Audio {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Audio { }
|
||||
|
||||
impl Deref for Audio {
|
||||
type Target = Frame;
|
||||
|
||||
@ -259,14 +263,6 @@ impl Into<Audio> for Frame {
|
||||
|
||||
pub struct Video(Frame);
|
||||
|
||||
impl Deref for Video {
|
||||
type Target = Frame;
|
||||
|
||||
fn deref(&self) -> &Frame {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Video {
|
||||
pub fn new() -> Self {
|
||||
Video(Frame::new())
|
||||
@ -408,6 +404,16 @@ impl Video {
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for Video { }
|
||||
|
||||
impl Deref for Video {
|
||||
type Target = Frame;
|
||||
|
||||
fn deref(&self) -> &Frame {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<Video> for Frame {
|
||||
fn into(self) -> Video {
|
||||
Video(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user