From 07f3bfb443ea12068a64341a21353211191a2b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Ka=C5=BAmierczak?= Date: Wed, 18 Dec 2024 12:58:08 +0100 Subject: [PATCH] refactor --- .../src/pipeline/input/whip/depayloader.rs | 10 +++++++++- integration_tests/examples/whip_server.rs | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/compositor_pipeline/src/pipeline/input/whip/depayloader.rs b/compositor_pipeline/src/pipeline/input/whip/depayloader.rs index 580497e64..ec875a956 100644 --- a/compositor_pipeline/src/pipeline/input/whip/depayloader.rs +++ b/compositor_pipeline/src/pipeline/input/whip/depayloader.rs @@ -10,7 +10,7 @@ use webrtc::rtp_transceiver::rtp_codec::RTPCodecType; use crate::pipeline::{ decoder, - types::{AudioCodec, EncodedChunk, EncodedChunkKind, VideoCodec}, + types::{AudioCodec, EncodedChunk, EncodedChunkKind, IsKeyframe, VideoCodec}, VideoDecoder, }; @@ -122,6 +122,7 @@ impl VideoDepayloader { data: mem::take(buffer).concat().into(), pts: Duration::from_secs_f64(timestamp as f64 / 90000.0), dts: None, + is_keyframe: IsKeyframe::Unknown, kind, }; @@ -139,6 +140,12 @@ pub enum AudioDepayloader { }, } +impl Default for AudioDepayloader { + fn default() -> Self { + Self::new() + } +} + impl AudioDepayloader { pub fn new() -> Self { AudioDepayloader::Opus { @@ -167,6 +174,7 @@ impl AudioDepayloader { data: opus_packet, pts: Duration::from_secs_f64(timestamp as f64 / 48000.0), dts: None, + is_keyframe: IsKeyframe::NoKeyframes, kind, }]) } diff --git a/integration_tests/examples/whip_server.rs b/integration_tests/examples/whip_server.rs index 1bab56a57..260667a78 100644 --- a/integration_tests/examples/whip_server.rs +++ b/integration_tests/examples/whip_server.rs @@ -94,7 +94,7 @@ fn client_code() -> Result<()> { "initial": { "root": { "type": "view", - "background_color_rgba": "#4d4d4dff", + "background_color": "#4d4d4dff", "children": [ { "type": "rescaler",