Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(SDPUtils) Remove unused functions #2585

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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