Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
h264-profile-level-id
Advanced tools
Readme
TypeScript utility to process H264 profile-level-id
values based on Google's libwebrtc C++ code:
$ npm install h264-profile-level-id
import {
// H264 Profile enum
Profile,
// H264 Level enum
Level,
// Class.
ProfileLevelId,
// Functions.
parseProfileLevelId,
profileLevelIdToString,
profileToString,
levelToString,
parseSdpProfileLevelId,
isSameProfile,
generateProfileLevelIdStringForAnswer
} from 'h264-profile-level-id';
enum Profile
{
ConstrainedBaseline = 1,
Baseline = 2,
Main = 3,
ConstrainedHigh = 4,
High = 5,
PredictiveHigh444 = 6
}
enum Level
{
L1_b = 0,
L1 = 10,
L1_1 = 11,
L1_2 = 12,
L1_3 = 13,
L2 = 20,
L2_1 = 21,
L2_2 = 22,
L3 = 30,
L3_1 = 31,
L3_2 = 32,
L4 = 40,
L4_1 = 41,
L4_2 = 42,
L5 = 50,
L5_1 = 51,
L5_2 = 52
}
Class containing both H264 profile and level.
const profile_level_id = new ProfileLevelId(Profile.Main, Level.L3_1);
console.log('profile:%d, level:%d', profile_level_id.profile, profile_level_id.level);
// => profile:3, level:31
Both profile
and level
members are public.
Parse profile level id that is represented as a string of 3 hex bytes. Nothing will be returned if the string is not a recognized H264 profile level id.
Return canonical string representation as three hex bytes of the profile level id, or returns nothing for invalid profile level ids.
Return a human friendly name for the given profile.
Return a human friendly name for the given level.
Parse profile level id that is represented as a string of 3 hex bytes contained in an SDP key-value map. A default profile level id will be returned if the profile-level-id
key is missing. Nothing will be returned if the key is present but the string is invalid.
Return true if the parameters have the same H264 profile, i.e. the same H264 profile (Baseline, High, etc).
Generate a profile level id that is represented as a string of 3 hex bytes suitable for an answer in an SDP negotiation based on local supported parameters and remote offered parameters. The parameters that are used when negotiating are the level part of profile-level-id
and level-asymmetry-allowed
.
NOTE: This function is just intended to manage H264 profile levels ids with same profile (otherwise it will throw). Use isSameProfile()
API before this one.
See the unit tests.
FAQs
TypeScript utility to process H264 profile-level-id values
The npm package h264-profile-level-id receives a total of 21,620 weekly downloads. As such, h264-profile-level-id popularity was classified as popular.
We found that h264-profile-level-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.