Share group calling frame buffers to reduce memory usage
This commit is contained in:
parent
4c40d861cf
commit
8e1391c70c
7 changed files with 71 additions and 34 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// Copyright 2020-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { useMemo, useEffect } from 'react';
|
||||
|
@ -16,6 +16,7 @@ import {
|
|||
VideoFrameSource,
|
||||
} from '../types/Calling';
|
||||
import { SetRendererCanvasType } from '../state/ducks/calling';
|
||||
import { useGetCallingFrameBuffer } from '../calling/useGetCallingFrameBuffer';
|
||||
import { usePageVisibility } from '../util/hooks';
|
||||
import { nonRenderedRemoteParticipant } from '../util/ringrtc/nonRenderedRemoteParticipant';
|
||||
|
||||
|
@ -77,6 +78,8 @@ export const CallingPipRemoteVideo = ({
|
|||
}: PropsType): JSX.Element => {
|
||||
const { conversation } = activeCall;
|
||||
|
||||
const getGroupCallFrameBuffer = useGetCallingFrameBuffer();
|
||||
|
||||
const isPageVisible = usePageVisibility();
|
||||
|
||||
const activeGroupCallSpeaker:
|
||||
|
@ -155,6 +158,7 @@ export const CallingPipRemoteVideo = ({
|
|||
return (
|
||||
<div className="module-calling-pip__video--remote">
|
||||
<GroupCallRemoteParticipant
|
||||
getFrameBuffer={getGroupCallFrameBuffer}
|
||||
getGroupCallVideoFrameSource={getGroupCallVideoFrameSource}
|
||||
i18n={i18n}
|
||||
isInPip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue