Utility to process H264 profile-level-id values

Overview

h264_profile_level_id

Dart utility to process H264 profile-level-id values based on Google's libwebrtc C++ code.

API

import 'package:h264_profile_level_id/h264_profile_level_id.dart';

H264Utils. => {
  // H264 Profile identifiers.
  ProfileConstrainedBaseline,
  ProfileBaseline,
  ProfileMain,
  ProfileConstrainedHigh,
  ProfileHigh,
  // H264 Level identifiers.
  Level1_b,
  Level1,
  Level1_1,
  Level1_2,
  Level1_3,
  Level2,
  Level2_1,
  Level2_2,
  Level3,
  Level3_1,
  Level3_2,
  Level4,
  Level4_1,
  Level4_2,
  Level5,
  Level5_1,
  Level5_2,
  // Functions.
  parseProfileLevelId,
  profileLevelIdToString,
  parseSdpProfileLevelId,
  isSameProfile,
  generateProfileLevelIdForAnswer
};
// Class.
ProfileLevelId

ProfileLevelId

Class containing both H264 Profile and Level.

final ProfileLevelId profileLevelId = ProfileLevelId(
    profile: H264Utils.ProfileMain,
    level: H264Utils.Level3_1,
  );

print('profile: ${profileLevelId.profile}, level: ${profileLevelId.level}');
// => profile: 3, level: 31

parseProfileLevelId(str)

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.

  • @param {String?} str - profile-level-id value as a string of 3 hex bytes.
  • @returns {ProfileLevelId?} A instance of the ProfileLevelId class.

profileLevelIdToString(profile_level_id)

Returns canonical string representation as three hex bytes of the profile level id, or returns nothing for invalid profile level ids.

  • @param {ProfileLevelId} profile_level_id - A instance of the ProfileLevelId class.
  • @returns {String?}

parseSdpProfileLevelId(params={})

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.

  • @param {Object} [params={}] - Codec parameters object.
  • @returns {ProfileLevelId?} A instance of the ProfileLevelId class.

isSameProfile(params1={}, params2={})

Returns true if the parameters have the same H264 profile, i.e. the same H264 profile (Baseline, High, etc).

  • @param {Object} [params1={}] - Codec parameters object.
  • @param {Object} [params2={}] - Codec parameters object.
  • @returns {Boolean}

generateProfileLevelIdForAnswer(local_supported_params={}, remote_offered_params={})

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.

  • @param {Object} [local_supported_params={}]
  • @param {Object} [remote_offered_params={}]
  • @returns {String?} Canonical string representation as three hex bytes of the profile level id, or null if no one of the params have profile-level-id.
  • @throws {TypeError} If Profile mismatch or invalid params.
You might also like...

Uproot(uprt) is a multi-platform (Windows, MacOs, and Linux) command line utility written in Dart to convert a router's DHCP IP Reservations between routers

Uproot(uprt) is a multi-platform (Windows, MacOs, and Linux) command line utility written in Dart to convert a router's DHCP IP Reservations between routers

UPROOT Uproot(uprt) is a multi-platform (Windows, MacOs, and Linux) command line utility written in Dart to convert a router's DHCP IP Reservations be

Jan 1, 2023

A utility library to automate mobile emulators.

emulators A utility library to automate mobile emulators. Can be used to automate screenshots on multiple devices. Example project https://github.com/

Nov 13, 2022

🔍 👀 CLI utility to check last-visit of your CodeForces friends & much more, 🚀 powered by CodeForces API

JoJo 🔍 👀 CLI utility to check last-visit of your CodeForces friends & much more, 🚀 powered by CodeForces API Features Online Friends All Friends Pr

Jul 20, 2020

A Pure Dart Utility library that checks for an Active Internet connection

This Code comes from https://github.com/komapeb/data_connection_checker * 🌍 Internet Connection Checker A Pure Dart Utility library that checks for a

Nov 25, 2022

Contains utility functions and classes in the style of dart:collection to make working with collections easier

The collection package for Dart contains a number of separate libraries with utility functions and classes that makes working with collections easier.

Dec 27, 2022

Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Quiver is a set of utility libraries for Dart that makes using many Dart libraries easier and more convenient, or adds additional functionality.

Jan 2, 2023

Flutter profile ui - Round Image Profile UI For Flutter

Flutter profile ui - Round Image Profile UI For Flutter

round_image_page A new Flutter project.

Oct 21, 2022

Application that simplifies the search process in several supermarkets, allowing the user to define the shopping list in a few minutes.

economiz Application that solves the price research process in different supermarkets, facilitating and simplifying this process for the user. Getting

Dec 29, 2021

A test for a position as a mobile engineer at the company Phi. (I did not participate in the selection process, I implemented the application for study purposes only)

A test for a position as a mobile engineer at the company Phi. (I did not participate in the selection process, I implemented the application for study purposes only)

Phi Bank Aplicativo desenvolvido baseado num teste para o cargo de desenvolvedor mobile na empresa Phi. (Não participei do processo seletivo, implemen

Dec 1, 2021

A JMAP client library in Dart to make JMAP method calls and process the responses

JMAP Dart client A JMAP client library to make JMAP method calls and process the responses. We most notably use it to write the TMail Flutter applicat

Dec 19, 2022

A mobile application that visualizes various sorting algorithms such as Bubble sort, selection sort, quick sort etc. The sorting process is visualized as the rearrangement of vertical lines of different lengths from shortest to tallest.

A mobile application that visualizes various sorting algorithms such as Bubble sort, selection sort, quick sort etc. The sorting process is visualized as the rearrangement of vertical lines of different lengths from shortest to tallest.

Sorting Visualiser This is a simple sorting visualisation app built using the flutter framework. The user can select sorting algorithms like Bubble so

May 13, 2022

A library to process noun, verb and adjectives transformations/conjugation.

A library to process noun (plural to singular and singular to plural), verb (gerund, present & past) and adjectives (comparative & superlative) transformations/conjugation.

Nov 4, 2022

Small sample app to work on simplifying the i18n process

l10n_s12n A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Jul 19, 2020

A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

Ubuntu WSL Splash A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process. Made with: Getting Sta

Dec 18, 2022

The diozz package helps you to deal with APIs easily and speed up the process of writing code.

The diozz package helps you to deal with APIs easily and speed up the process of writing code.

Diozz The diozz package helps you to deal with APIs easily and speed up the process of writing code. Installation Diozz Use that command in the termin

Nov 13, 2022

A flutter application to track the number of hours you devoted a particular skill. Helps you track your process in a neat and organised way

A flutter application to track the number of hours you devoted a particular skill. Helps you track your process in a neat and organised way

10-000 Hours A flutter application to track the number of hours you devoted a particular skill. Helps you track your process in a neat and organised w

Oct 31, 2022

A simple way to cache values that result from rather expensive operations.

cached_value A simple way to cache values that result from rather expensive operations. It is useful to cache values that: Are computed from other val

Nov 11, 2022

Context is a HashMap with shadowing (inherits parent values) and helpers to work with Types as keys

contextualized Context is a HashMap with shadowing (inherits parent values) and helpers to work with Types as keys Installation pubspec.yaml: dependen

Nov 24, 2022

A Flutter Project to display arduino sensors values about weather

A Flutter Project to display arduino sensors values about weather

worldwide_weather_watcher A new Flutter project. Getting Started This project is a starting point for a Flutter application. The Arduino send each 10

Nov 2, 2022
Owner
Ibragim Abbasov
Live life, do code
Ibragim Abbasov
A JMAP client library in Dart to make JMAP method calls and process the responses

JMAP Dart client A JMAP client library to make JMAP method calls and process the responses. We most notably use it to write the TMail Flutter applicat

LINAGORA 18 Dec 19, 2022
A library to process noun, verb and adjectives transformations/conjugation.

A library to process noun (plural to singular and singular to plural), verb (gerund, present & past) and adjectives (comparative & superlative) transformations/conjugation.

Kawaljeet Singh 6 Nov 4, 2022
The diozz package helps you to deal with APIs easily and speed up the process of writing code.

Diozz The diozz package helps you to deal with APIs easily and speed up the process of writing code. Installation Diozz Use that command in the termin

Mohamed Abu.elezz 4 Nov 13, 2022
A simple way to cache values that result from rather expensive operations.

cached_value A simple way to cache values that result from rather expensive operations. It is useful to cache values that: Are computed from other val

Renan 27 Nov 11, 2022
Context is a HashMap with shadowing (inherits parent values) and helpers to work with Types as keys

contextualized Context is a HashMap with shadowing (inherits parent values) and helpers to work with Types as keys Installation pubspec.yaml: dependen

Andrei Lesnitsky 4 Nov 24, 2022
Simply extract required values from specific paths in a Map or a List

extract values from Map/List using dot-seprated strings you don't have to cast multiple times to fetch a simple values, this is very useful while working with i.e json data

Mohammed Al Ashaal 5 Nov 18, 2022
A flutter utility to easily create flavors in your flutter application

Flutter Flavorizr A flutter utility to easily create flavors in your flutter application Getting Started Let's start by setting up our environment in

Angelo Cassano 268 Jan 1, 2023
A Dart testing utility for asserting that some code emits a compilation error.

A Dart testing utility for asserting that some code emits a compilation error.

Remi Rousselet 32 Dec 11, 2022
A simple Flutter / Dart Utility class for converting complex objects to uri and query string

A simple Flutter / Dart Utility class for converting complex or nested objects to uri and query strings you can follow the the article on how this cla

Opata Joshua 5 Sep 7, 2022
CLI utility to manage MC Server installations

CLI utility to manage MC server installations. Features Install required JDKs Download server files Generate start scripts (with optimized JVM flags)

Michael Rittmeister 14 Nov 18, 2022