Skip to content

Commit

Permalink
ref(SDPUtils) Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jallamsetty1 committed Oct 8, 2024
1 parent 7dfad4f commit db2edba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
34 changes: 0 additions & 34 deletions modules/sdp/SdpTransformUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,6 @@ class MLineWrap {
&& parsePrimarySSRC(group) === primarySSRC);
}

/**
* @param {string|null} msid the media stream id or <tt>null</tt> 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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions types/hand-crafted/modules/sdp/SdpTransformUtil.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
}

Expand Down

0 comments on commit db2edba

Please sign in to comment.