From db2edba1b2cafc0e27553b5f6b68b8c32714b9d9 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Tue, 8 Oct 2024 15:45:36 -0400 Subject: [PATCH] ref(SDPUtils) Remove unused functions --- modules/sdp/SdpTransformUtil.js | 34 ------------------- .../modules/sdp/SdpTransformUtil.d.ts | 3 -- 2 files changed, 37 deletions(-) diff --git a/modules/sdp/SdpTransformUtil.js b/modules/sdp/SdpTransformUtil.js index 74e02be603..65e3bc8452 100644 --- a/modules/sdp/SdpTransformUtil.js +++ b/modules/sdp/SdpTransformUtil.js @@ -193,18 +193,6 @@ class MLineWrap { && parsePrimarySSRC(group) === primarySSRC); } - /** - * @param {string|null} msid the media stream id or null to match - * the first SSRC object with any 'msid' value. - * @return {Object|undefined} the SSRC object as defined by 'sdp-transform' - * lib. - */ - findSSRCByMSID(msid) { - return this.ssrcs.find( - ssrcObj => ssrcObj.attribute === 'msid' - && (msid === null || ssrcObj.value === msid)); - } - /** * Gets the SSRC count for the underlying media description. * @return {number} @@ -320,13 +308,6 @@ class MLineWrap { return videoSSRCs; } - /** - * Dumps all SSRC groups of this media description to JSON. - */ - dumpSSRCGroups() { - return JSON.stringify(this.mLine.ssrcGroups); - } - /** * Removes all SSRC groups which contain given SSRC number at any position. * @param {number} ssrc the SSRC for which all matching groups are to be @@ -355,21 +336,6 @@ class MLineWrap { .filter(groupInfo => groupInfo.semantics !== semantics); } - /** - * Replaces SSRC (does not affect SSRC groups, but only attributes). - * @param {number} oldSSRC the old SSRC number - * @param {number} newSSRC the new SSRC number - */ - replaceSSRC(oldSSRC, newSSRC) { - if (this.mLine.ssrcs) { - this.mLine.ssrcs.forEach(ssrcInfo => { - if (ssrcInfo.id === oldSSRC) { - ssrcInfo.id = newSSRC; - } - }); - } - } - /** * Adds given SSRC group to this media description. * @param {object} group the SSRC group object as defined by diff --git a/types/hand-crafted/modules/sdp/SdpTransformUtil.d.ts b/types/hand-crafted/modules/sdp/SdpTransformUtil.d.ts index 78147c1ffc..070a0ba897 100644 --- a/types/hand-crafted/modules/sdp/SdpTransformUtil.d.ts +++ b/types/hand-crafted/modules/sdp/SdpTransformUtil.d.ts @@ -13,17 +13,14 @@ export class MLineWrap { findGroup: ( semantics: string, ssrcs: string ) => unknown | undefined; findGroups: ( semantics: string ) => unknown[]; findGroupByPrimarySSRC: ( semantics: string, primarySSRC: number ) => unknown; // TODO: - findSSRCByMSID: ( msid: string | null ) => unknown | undefined; // TODO: getSSRCCount: () => number; containsAnySSRCGroups: () => boolean; getPrimaryVideoSsrc: () => number | undefined; getRtxSSRC: ( primarySsrc: number ) => number | undefined; getSSRCs: () => number[]; getPrimaryVideoSSRCs: () => number[]; - dumpSSRCGroups: () => string; removeGroupsWithSSRC: ( ssrc: string ) => void; removeGroupsBySemantics: ( semantics: string ) => void; - replaceSSRC: ( oldSSRC: number, newSSRC: number ) => void; addSSRCGroup: ( group: unknown ) => void; // TODO: }