mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
virtio: video: encoder: make encoder own its VEA instance
The current design of having the VEA instance outside of the encoder was mandated by the use of lifetimes on libvda Sessions, which have been removed from libvda. So it is now possible for the encoder to own its VEA instance. This makes sense in itself since there is no reason for the VEA instance to also be used by someone else, but is also required to add support for non-libvda encoder backends. BUG=b:169295147 TEST=arc.VideoEncodeAccel.h264_192p_i420_vm passes on hatch-arc-r Change-Id: Idb4356dde6124f00d87915da7da0910c7d816863 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2887526 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: David Staessens <dstaessens@chromium.org> Tested-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
parent
0b96ae0720
commit
b77b936d42
2 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,7 @@ impl LibvdaEncoder {
|
|||
}
|
||||
}
|
||||
|
||||
impl Encoder for &LibvdaEncoder {
|
||||
impl Encoder for LibvdaEncoder {
|
||||
type Session = LibvdaEncoderSession;
|
||||
|
||||
fn query_capabilities(&self) -> Result<EncoderCapabilities> {
|
||||
|
|
|
@ -231,7 +231,7 @@ impl VirtioDevice for VideoDevice {
|
|||
return;
|
||||
}
|
||||
};
|
||||
let device = match encoder::EncoderDevice::new(&encoder) {
|
||||
let device = match encoder::EncoderDevice::new(encoder) {
|
||||
Ok(d) => d,
|
||||
Err(e) => {
|
||||
error!("Failed to create encoder device: {}", e);
|
||||
|
|
Loading…
Reference in a new issue