Class GstPbutils

java.lang.Object
org.freedesktop.gstreamer.pbutils.GstPbutils

@Generated("org.javagi.JavaGI") public final class GstPbutils extends Object
Constants and functions that are declared in the global GstPbutils namespace.
  • Field Details

    • ENCODING_CATEGORY_CAPTURE

      public static final String ENCODING_CATEGORY_CAPTURE
      GstEncodingTarget category for recording and capture. Targets within this category are optimized for low latency encoding.
      See Also:
    • ENCODING_CATEGORY_DEVICE

      public static final String ENCODING_CATEGORY_DEVICE
      GstEncodingTarget category for device-specific targets. The name of the target will usually be the constructor and model of the device, and that target will contain GstEncodingProfiles suitable for that device.
      See Also:
    • ENCODING_CATEGORY_FILE_EXTENSION

      public static final String ENCODING_CATEGORY_FILE_EXTENSION
      GstEncodingTarget category for file extensions. The name of the target will be the name of the file extensions possible for a particular target. Those targets are defining like 'default' formats usually used for a particular file extension.
      See Also:
    • ENCODING_CATEGORY_ONLINE_SERVICE

      public static final String ENCODING_CATEGORY_ONLINE_SERVICE
      GstEncodingTarget category for online-services. The name of the target will usually be the name of the online service and that target will contain GstEncodingProfiles suitable for that online service.
      See Also:
    • ENCODING_CATEGORY_STORAGE_EDITING

      public static final String ENCODING_CATEGORY_STORAGE_EDITING
      GstEncodingTarget category for storage, archiving and editing targets. Those targets can be lossless and/or provide very fast random access content. The name of the target will usually be the container type or editing target, and that target will contain GstEncodingProfiles suitable for editing or storage.
      See Also:
    • PLUGINS_BASE_VERSION_MAJOR

      public static final int PLUGINS_BASE_VERSION_MAJOR
      The major version of GStreamer's gst-plugins-base libraries at compile time.
      See Also:
    • PLUGINS_BASE_VERSION_MICRO

      public static final int PLUGINS_BASE_VERSION_MICRO
      The micro version of GStreamer's gst-plugins-base libraries at compile time.
      See Also:
    • PLUGINS_BASE_VERSION_MINOR

      public static final int PLUGINS_BASE_VERSION_MINOR
      The minor version of GStreamer's gst-plugins-base libraries at compile time.
      See Also:
    • PLUGINS_BASE_VERSION_NANO

      public static final int PLUGINS_BASE_VERSION_NANO
      The nano version of GStreamer's gst-plugins-base libraries at compile time. Actual releases have 0, GIT versions have 1, prerelease versions have 2-...
      See Also:
  • Constructor Details

    • GstPbutils

      public GstPbutils()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • codecUtilsAacCapsSetLevelAndProfile

      public static boolean codecUtilsAacCapsSetLevelAndProfile(Caps caps, @Nullable byte @Nullable [] audioConfig)
      Sets the level and profile on caps if it can be determined from audioConfig. See gst_codec_utils_aac_get_level() and gst_codec_utils_aac_get_profile() for more details on the parameters. caps must be audio/mpeg caps with an "mpegversion" field of either 2 or 4. If mpegversion is 4, the "base-profile" field is also set in caps.
      Parameters:
      caps - the GstCaps to which level and profile fields are to be added
      audioConfig - a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)
      Returns:
      true if the level and profile could be set, false otherwise.
    • codecUtilsAacGetChannels

      public static int codecUtilsAacGetChannels(@Nullable byte @Nullable [] audioConfig)
      Returns the channels of the given AAC stream.
      Parameters:
      audioConfig - a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.
      Returns:
      The channels or 0 if the channel could not be determined.
      Since:
      1.10
    • codecUtilsAacGetIndexFromSampleRate

      public static int codecUtilsAacGetIndexFromSampleRate(int rate)
      Translates the sample rate to the index corresponding to it in AAC spec.
      Parameters:
      rate - Sample rate
      Returns:
      The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.
    • codecUtilsAacGetLevel

      public static @Nullable String codecUtilsAacGetLevel(@Nullable byte @Nullable [] audioConfig)

      Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC streams, the constraints from the AAC audio profile are applied. For AAC Main, LTP, SSR and others, the Main profile is used.

      The audioConfig parameter follows the following format, starting from the most significant bit of the first byte:

      • Bit 0:4 contains the AudioObjectType (if this is 0x5, then the real AudioObjectType is carried after the rate and channel data)
      • Bit 5:8 contains the sample frequency index (if this is 0xf, then the next 24 bits define the actual sample frequency, and subsequent fields are appropriately shifted).
      • Bit 9:12 contains the channel configuration
      Parameters:
      audioConfig - a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.
      Returns:
      The level as a const string and null if the level could not be determined.
    • codecUtilsAacGetProfile

      public static @Nullable String codecUtilsAacGetProfile(@Nullable byte @Nullable [] audioConfig)
      Returns the profile of the given AAC stream as a string. The profile is normally determined using the AudioObjectType field which is in the first 5 bits of audioConfig
      Parameters:
      audioConfig - a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.
      Returns:
      The profile as a const string and null if the profile could not be determined.
    • codecUtilsAacGetSampleRate

      public static int codecUtilsAacGetSampleRate(@Nullable byte @Nullable [] audioConfig)
      Translates the sample rate index found in AAC headers to the actual sample rate.
      Parameters:
      audioConfig - a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.
      Returns:
      The sample rate if sr_idx is valid, 0 otherwise.
      Since:
      1.10
    • codecUtilsAacGetSampleRateFromIndex

      public static int codecUtilsAacGetSampleRateFromIndex(int srIdx)
      Translates the sample rate index found in AAC headers to the actual sample rate.
      Parameters:
      srIdx - Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header
      Returns:
      The sample rate if srIdx is valid, 0 otherwise.
    • codecUtilsAv1CreateAv1cFromCaps

      public static @Nullable Buffer codecUtilsAv1CreateAv1cFromCaps(Caps caps)
      Creates the corresponding AV1 Codec Configuration Record
      Parameters:
      caps - a video/x-av1 GstCaps
      Returns:
      The AV1 Codec Configuration Record, or null if there was an error.
      Since:
      1.26
    • codecUtilsAv1CreateCapsFromAv1c

      public static @Nullable Caps codecUtilsAv1CreateCapsFromAv1c(Buffer av1c)
      Parses the provided av1c and returns the corresponding caps
      Parameters:
      av1c - a GstBuffer containing a AV1CodecConfigurationRecord
      Returns:
      The parsed AV1 caps, or null if there is an error
      Since:
      1.26
    • codecUtilsAv1GetLevel

      public static @Nullable String codecUtilsAv1GetLevel(byte seqLevelIdx)
      Transform a seq_level_idx into the level string
      Parameters:
      seqLevelIdx - A seq_level_idx
      Returns:
      the level string or null if the seq_level_idx is unknown
      Since:
      1.26
    • codecUtilsAv1GetSeqLevelIdx

      public static byte codecUtilsAv1GetSeqLevelIdx(String level)
      Transform a level string from the caps into the seq_level_idx
      Parameters:
      level - A level string from caps
      Returns:
      the seq_level_idx or 31 (max-level) if the level is unknown
      Since:
      1.26
    • codecUtilsCapsFromMimeCodec

      public static @Nullable Caps codecUtilsCapsFromMimeCodec(String codecsField)

      Converts a RFC 6381 compatible codec string to GstCaps. More than one codec string can be present (separated by ,).

      Registered codecs can be found at http://mp4ra.org//codecs

      Parameters:
      codecsField - A mime codec string field
      Returns:
      The corresponding GstCaps or null
      Since:
      1.22
    • codecUtilsCapsGetMimeCodec

      public static @Nullable String codecUtilsCapsGetMimeCodec(Caps caps)

      Converts caps to a RFC 6381 compatible codec string if possible.

      Useful for providing the 'codecs' field inside the 'Content-Type' HTTP header for containerized formats, such as mp4 or matroska.

      Registered codecs can be found at http://mp4ra.org//codecs

      Parameters:
      caps - A GstCaps to convert to mime codec
      Returns:
      a RFC 6381 compatible codec string or null
      Since:
      1.20
    • codecUtilsH264CapsSetLevelAndProfile

      public static boolean codecUtilsH264CapsSetLevelAndProfile(Caps caps, @Nullable byte @Nullable [] sps)
      Sets the level and profile in caps if it can be determined from sps. See gst_codec_utils_h264_get_level() and gst_codec_utils_h264_get_profile() for more details on the parameters.
      Parameters:
      caps - the GstCaps to which the level and profile are to be added
      sps - Pointer to the sequence parameter set for the stream.
      Returns:
      true if the level and profile could be set, false otherwise.
    • codecUtilsH264GetLevel

      public static @Nullable String codecUtilsH264GetLevel(@Nullable byte @Nullable [] sps)
      Converts the level indication (level_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the same format as for gst_codec_utils_h264_get_profile().
      Parameters:
      sps - Pointer to the sequence parameter set for the stream.
      Returns:
      The level as a const string, or null if there is an error.
    • codecUtilsH264GetLevelIdc

      public static byte codecUtilsH264GetLevelIdc(String level)
      Transform a level string from the caps into the level_idc
      Parameters:
      level - A level string from caps
      Returns:
      the level_idc or 0 if the level is unknown
    • codecUtilsH264GetProfile

      public static @Nullable String codecUtilsH264GetProfile(@Nullable byte @Nullable [] sps)

      Converts the profile indication (profile_idc) in the stream's sequence parameter set into a string. The SPS is expected to have the following format, as defined in the H.264 specification. The SPS is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

      • Bit 0:7 - Profile indication
      • Bit 8 - constraint_set0_flag
      • Bit 9 - constraint_set1_flag
      • Bit 10 - constraint_set2_flag
      • Bit 11 - constraint_set3_flag
      • Bit 12 - constraint_set3_flag
      • Bit 13:15 - Reserved
      • Bit 16:24 - Level indication
      Parameters:
      sps - Pointer to the sequence parameter set for the stream.
      Returns:
      The profile as a const string, or null if there is an error.
    • codecUtilsH264GetProfileFlagsLevel

      public static boolean codecUtilsH264GetProfileFlagsLevel(@Nullable byte @Nullable [] codecData, @Nullable Out<Byte> profile, @Nullable Out<Byte> flags, @Nullable Out<Byte> level)

      Parses profile, flags, and level from a H264 AVCC extradata/sequence_header. These are most commonly retrieved from a video/x-h264 caps with a codec_data buffer.

      The format of H264 AVCC extradata/sequence_header is documented in the ITU-T H.264 specification section 7.3.2.1.1 as well as in ISO/IEC 14496-15 section 5.3.3.1.2.

      Parameters:
      codecData - H264 AVCC extradata
      profile - return location for h264 profile_idc or null
      flags - return location for h264 constraint set flags or null
      level - return location h264 level_idc or null
      Returns:
      true on success, false on failure
      Since:
      1.20
    • codecUtilsH265CapsSetLevelTierAndProfile

      public static boolean codecUtilsH265CapsSetLevelTierAndProfile(Caps caps, @Nullable byte @Nullable [] profileTierLevel)
      Sets the level, tier and profile in caps if it can be determined from profileTierLevel. See gst_codec_utils_h265_get_level(), gst_codec_utils_h265_get_tier() and gst_codec_utils_h265_get_profile() for more details on the parameters.
      Parameters:
      caps - the GstCaps to which the level, tier and profile are to be added
      profileTierLevel - Pointer to the profile_tier_level struct
      Returns:
      true if the level, tier, profile could be set, false otherwise.
      Since:
      1.4
    • codecUtilsH265GetLevel

      public static @Nullable String codecUtilsH265GetLevel(@Nullable byte @Nullable [] profileTierLevel)
      Converts the level indication (general_level_idc) in the stream's profile_tier_level structure into a string. The profiel_tier_level is expected to have the same format as for gst_codec_utils_h264_get_profile().
      Parameters:
      profileTierLevel - Pointer to the profile_tier_level for the stream
      Returns:
      The level as a const string, or null if there is an error.
      Since:
      1.4
    • codecUtilsH265GetLevelIdc

      public static byte codecUtilsH265GetLevelIdc(String level)
      Transform a level string from the caps into the level_idc
      Parameters:
      level - A level string from caps
      Returns:
      the level_idc or 0 if the level is unknown
      Since:
      1.4
    • codecUtilsH265GetProfile

      public static @Nullable String codecUtilsH265GetProfile(@Nullable byte @Nullable [] profileTierLevel)

      Converts the profile indication (general_profile_idc) in the stream's profile_level_tier structure into a string. The profile_tier_level is expected to have the following format, as defined in the H.265 specification. The profile_tier_level is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.

      • Bit 0:1 - general_profile_space
      • Bit 2 - general_tier_flag
      • Bit 3:7 - general_profile_idc
      • Bit 8:39 - gernal_profile_compatibility_flags
      • Bit 40 - general_progressive_source_flag
      • Bit 41 - general_interlaced_source_flag
      • Bit 42 - general_non_packed_constraint_flag
      • Bit 43 - general_frame_only_constraint_flag
      • Bit 44:87 - See below
      • Bit 88:95 - general_level_idc
      Parameters:
      profileTierLevel - Pointer to the profile_tier_level structure for the stream.
      Returns:
      The profile as a const string, or null if there is an error.
      Since:
      1.4
    • codecUtilsH265GetTier

      public static @Nullable String codecUtilsH265GetTier(@Nullable byte @Nullable [] profileTierLevel)
      Converts the tier indication (general_tier_flag) in the stream's profile_tier_level structure into a string. The profile_tier_level is expected to have the same format as for gst_codec_utils_h264_get_profile().
      Parameters:
      profileTierLevel - Pointer to the profile_tier_level for the stream.
      Returns:
      The tier as a const string, or null if there is an error.
      Since:
      1.4
    • codecUtilsH266CapsSetLevelTierAndProfile

      public static boolean codecUtilsH266CapsSetLevelTierAndProfile(Caps caps, @Nullable byte @Nullable [] decoderConfiguration)
      Sets the level, tier and profile in caps if it can be determined from decoderConfiguration. See gst_codec_utils_h266_get_level(), gst_codec_utils_h266_get_tier() and gst_codec_utils_h266_get_profile() for more details on the parameters.
      Parameters:
      caps - the GstCaps to which the level, tier and profile are to be added
      decoderConfiguration - Pointer to the VvcDecoderConfigurationRecord struct as defined in ISO/IEC 14496-15
      Returns:
      true if the level, tier, profile could be set, false otherwise.
      Since:
      1.26
    • codecUtilsH266GetLevel

      public static @Nullable String codecUtilsH266GetLevel(@Nullable byte @Nullable [] ptlRecord)
      Converts the level indication (general_level_idc) in the stream's ptl_record structure into a string.
      Parameters:
      ptlRecord - Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
      Returns:
      The level as a const string, or null if there is an error.
      Since:
      1.26
    • codecUtilsH266GetLevelIdc

      public static byte codecUtilsH266GetLevelIdc(String level)
      Transform a level string from the caps into the level_idc
      Parameters:
      level - A level string from caps
      Returns:
      the level_idc or 0 if the level is unknown
      Since:
      1.26
    • codecUtilsH266GetProfile

      public static @Nullable String codecUtilsH266GetProfile(@Nullable byte @Nullable [] ptlRecord)
      Converts the profile indication (general_profile_idc) in the stream's ptl_record structure into a string.
      Parameters:
      ptlRecord - Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
      Returns:
      The profile as a const string, or null if there is an error.
      Since:
      1.26
    • codecUtilsH266GetTier

      public static @Nullable String codecUtilsH266GetTier(@Nullable byte @Nullable [] ptlRecord)
      Converts the tier indication (general_tier_flag) in the stream's ptl_record structure into a string.
      Parameters:
      ptlRecord - Pointer to the VvcPTLRecord structure as defined in ISO/IEC 14496-15.
      Returns:
      The tier as a const string, or null if there is an error.
      Since:
      1.26
    • codecUtilsMpeg4videoCapsSetLevelAndProfile

      public static boolean codecUtilsMpeg4videoCapsSetLevelAndProfile(Caps caps, @Nullable byte @Nullable [] visObjSeq)
      Sets the level and profile in caps if it can be determined from visObjSeq. See gst_codec_utils_mpeg4video_get_level() and gst_codec_utils_mpeg4video_get_profile() for more details on the parameters.
      Parameters:
      caps - the GstCaps to which the level and profile are to be added
      visObjSeq - Pointer to the visual object sequence for the stream.
      Returns:
      true if the level and profile could be set, false otherwise.
    • codecUtilsMpeg4videoGetLevel

      public static @Nullable String codecUtilsMpeg4videoGetLevel(@Nullable byte @Nullable [] visObjSeq)
      Converts the level indication in the stream's visual object sequence into a string. visObjSeq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.
      Parameters:
      visObjSeq - Pointer to the visual object sequence for the stream.
      Returns:
      The level as a const string, or NULL if there is an error.
    • codecUtilsMpeg4videoGetProfile

      public static @Nullable String codecUtilsMpeg4videoGetProfile(@Nullable byte @Nullable [] visObjSeq)
      Converts the profile indication in the stream's visual object sequence into a string. visObjSeq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.
      Parameters:
      visObjSeq - Pointer to the visual object sequence for the stream.
      Returns:
      The profile as a const string, or NULL if there is an error.
    • codecUtilsOpusCreateCaps

      public static @Nullable Caps codecUtilsOpusCreateCaps(int rate, byte channels, byte channelMappingFamily, byte streamCount, byte coupledCount, @Nullable byte @Nullable [] channelMapping)
      Creates Opus caps from the given parameters.
      Parameters:
      rate - the sample rate
      channels - the number of channels
      channelMappingFamily - the channel mapping family
      streamCount - the number of independent streams
      coupledCount - the number of stereo streams
      channelMapping - the mapping between the streams
      Returns:
      The GstCaps, or null if the parameters would lead to invalid Opus caps.
      Since:
      1.8
    • codecUtilsOpusCreateCapsFromHeader

      public static @Nullable Caps codecUtilsOpusCreateCapsFromHeader(Buffer header, @Nullable Buffer comments)
      Creates Opus caps from the given OpusHead header and comment header comments.
      Parameters:
      header - OpusHead header
      comments - Comment header or NULL
      Returns:
      The GstCaps.
      Since:
      1.8
    • codecUtilsOpusCreateHeader

      public static @Nullable Buffer codecUtilsOpusCreateHeader(int rate, byte channels, byte channelMappingFamily, byte streamCount, byte coupledCount, @Nullable byte @Nullable [] channelMapping, short preSkip, short outputGain)
      Creates OpusHead header from the given parameters.
      Parameters:
      rate - the sample rate
      channels - the number of channels
      channelMappingFamily - the channel mapping family
      streamCount - the number of independent streams
      coupledCount - the number of stereo streams
      channelMapping - the mapping between the streams
      preSkip - Pre-skip in 48kHz samples or 0
      outputGain - Output gain or 0
      Returns:
      The GstBuffer containing the OpusHead.
      Since:
      1.8
    • codecUtilsOpusParseCaps

      public static boolean codecUtilsOpusParseCaps(Caps caps, @Nullable Out<Integer> rate, @Nullable Out<Byte> channels, @Nullable Out<Byte> channelMappingFamily, @Nullable Out<Byte> streamCount, @Nullable Out<Byte> coupledCount, @Nullable Out<byte[]> channelMapping)
      Parses Opus caps and fills the different fields with defaults if possible.
      Parameters:
      caps - the GstCaps to parse the data from
      rate - the sample rate
      channels - the number of channels
      channelMappingFamily - the channel mapping family
      streamCount - the number of independent streams
      coupledCount - the number of stereo streams
      channelMapping - the mapping between the streams
      Returns:
      true if parsing was successful, false otherwise.
      Since:
      1.8
    • codecUtilsOpusParseHeader

      public static boolean codecUtilsOpusParseHeader(Buffer header, @Nullable Out<Integer> rate, @Nullable Out<Byte> channels, @Nullable Out<Byte> channelMappingFamily, @Nullable Out<Byte> streamCount, @Nullable Out<Byte> coupledCount, @Nullable Out<byte[]> channelMapping, @Nullable Out<Short> preSkip, @Nullable Out<Short> outputGain)
      Parses the OpusHead header.
      Parameters:
      header - the OpusHead GstBuffer
      rate - the sample rate
      channels - the number of channels
      channelMappingFamily - the channel mapping family
      streamCount - the number of independent streams
      coupledCount - the number of stereo streams
      channelMapping - the mapping between the streams
      preSkip - Pre-skip in 48kHz samples or 0
      outputGain - Output gain or 0
      Returns:
      true if parsing was successful, false otherwise.
      Since:
      1.8
    • encodingListAllTargets

      public static List<EncodingTarget> encodingListAllTargets(@Nullable String categoryname)
      List all available GstEncodingTarget for the specified category, or all categories if categoryname is null.
      Parameters:
      categoryname - The category, for ex: GST_ENCODING_CATEGORY_DEVICE. Can be null.
      Returns:
      The list of GstEncodingTarget
    • encodingListAvailableCategories

      public static List<String> encodingListAvailableCategories()
      Lists all GstEncodingTarget categories present on disk.
      Returns:
      A list of GstEncodingTarget categories.
    • installPluginsAsync

      public static InstallPluginsReturn installPluginsAsync(@Nullable String @Nullable [] details, @Nullable InstallPluginsContext ctx, @Nullable InstallPluginsResultFunc func)

      Requests plugin installation without blocking. Once the plugins have been installed or installation has failed, func will be called with the result of the installation and your provided userData pointer.

      This function requires a running GLib/Gtk main loop. If you are not running a GLib/Gtk main loop, make sure to regularly call g_main_context_iteration(NULL,FALSE).

      The installer strings that make up detail are typically obtained by calling gst_missing_plugin_message_get_installer_detail() on missing-plugin messages that have been caught on a pipeline's bus or created by the application via the provided API, such as gst_missing_element_message_new().

      It is possible to request the installation of multiple missing plugins in one go (as might be required if there is a demuxer for a certain format installed but no suitable video decoder and no suitable audio decoder).

      Parameters:
      details - NULL-terminated array of installer string details (see below)
      ctx - a GstInstallPluginsContext, or NULL
      func - the function to call when the installer program returns
      Returns:
      result code whether an external installer could be started
    • installPluginsInstallationInProgress

      public static boolean installPluginsInstallationInProgress()
      Checks whether plugin installation (initiated by this application only) is currently in progress.
      Returns:
      TRUE if plugin installation is in progress, otherwise FALSE
    • installPluginsSupported

      public static boolean installPluginsSupported()
      Checks whether plugin installation is likely to be supported by the current environment. This currently only checks whether the helper script that is to be provided by the distribution or operating system vendor exists.
      Returns:
      TRUE if plugin installation is likely to be supported.
    • installPluginsSync

      public static InstallPluginsReturn installPluginsSync(@Nullable String @Nullable [] details, @Nullable InstallPluginsContext ctx)

      Requests plugin installation and block until the plugins have been installed or installation has failed.

      This function should almost never be used, it only exists for cases where a non-GLib main loop is running and the user wants to run it in a separate thread and marshal the result back asynchronously into the main thread using the other non-GLib main loop. You should almost always use gst_install_plugins_async() instead of this function.

      Parameters:
      details - NULL-terminated array of installer string details
      ctx - a GstInstallPluginsContext, or NULL
      Returns:
      the result of the installation.
    • isMissingPluginMessage

      public static boolean isMissingPluginMessage(Message msg)
      Checks whether msg is a missing plugins message.
      Parameters:
      msg - a GstMessage
      Returns:
      true if msg is a missing-plugins message, otherwise false.
    • missingDecoderInstallerDetailNew

      public static String missingDecoderInstallerDetailNew(Caps decodeCaps)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.

      Parameters:
      decodeCaps - the (fixed) caps for which a decoder element is needed
      Returns:
      a newly-allocated detail string. Free string with g_free() when not needed any longer.
    • missingDecoderMessageNew

      public static Message missingDecoderMessageNew(Element element, Caps decodeCaps)
      Creates a missing-plugin message for element to notify the application that a decoder element for a particular set of (fixed) caps is missing. This function is mainly for use in plugins.
      Parameters:
      element - the GstElement posting the message
      decodeCaps - the (fixed) caps for which a decoder element is needed
      Returns:
      a new GstMessage
    • missingElementInstallerDetailNew

      public static String missingElementInstallerDetailNew(String factoryName)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.

      Parameters:
      factoryName - the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc"
      Returns:
      a newly-allocated detail string. Free string with g_free() when not needed any longer.
    • missingElementMessageNew

      public static Message missingElementMessageNew(Element element, String factoryName)
      Creates a missing-plugin message for element to notify the application that a certain required element is missing. This function is mainly for use in plugins.
      Parameters:
      element - the GstElement posting the message
      factoryName - the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc"
      Returns:
      a new GstMessage
    • missingEncoderInstallerDetailNew

      public static String missingEncoderInstallerDetailNew(Caps encodeCaps)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.

      Parameters:
      encodeCaps - the (fixed) caps for which an encoder element is needed
      Returns:
      a newly-allocated detail string. Free string with g_free() when not needed any longer.
    • missingEncoderMessageNew

      public static Message missingEncoderMessageNew(Element element, Caps encodeCaps)
      Creates a missing-plugin message for element to notify the application that an encoder element for a particular set of (fixed) caps is missing. This function is mainly for use in plugins.
      Parameters:
      element - the GstElement posting the message
      encodeCaps - the (fixed) caps for which an encoder element is needed
      Returns:
      a new GstMessage
    • missingPluginMessageGetDescription

      public static String missingPluginMessageGetDescription(Message msg)

      Returns a localised string describing the missing feature, for use in error dialogs and the like. Should never return NULL unless msg is not a valid missing-plugin message.

      This function is mainly for applications that need a human-readable string describing a missing plugin, given a previously collected missing-plugin message

      Parameters:
      msg - a missing-plugin GstMessage of type GST_MESSAGE_ELEMENT
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • missingPluginMessageGetInstallerDetail

      public static @Nullable String missingPluginMessageGetInstallerDetail(Message msg)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions.

      Parameters:
      msg - a missing-plugin GstMessage of type GST_MESSAGE_ELEMENT
      Returns:
      a newly-allocated detail string, or NULL on error. Free string with g_free() when not needed any longer.
    • missingPluginMessageGetStreamId

      public static @Nullable String missingPluginMessageGetStreamId(Message msg)
      Get the stream-id of the stream for which an element is missing.
      Parameters:
      msg - A missing-plugin GstMessage of type GST_MESSAGE_ELEMENT
      Returns:
      The stream-id or null if none is specified.
      Since:
      1.26
    • missingPluginMessageSetStreamId

      public static void missingPluginMessageSetStreamId(Message msg, String streamId)
      Set the stream-id of the stream for which an element is missing.
      Parameters:
      msg - A missing-plugin GstMessage of type GST_MESSAGE_ELEMENT
      streamId - The stream id for which an element is missing
      Since:
      1.26
    • missingUriSinkInstallerDetailNew

      public static String missingUriSinkInstallerDetailNew(String protocol)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.

      Parameters:
      protocol - the URI protocol the missing source needs to implement, e.g. "http" or "mms"
      Returns:
      a newly-allocated detail string. Free string with g_free() when not needed any longer.
    • missingUriSinkMessageNew

      public static Message missingUriSinkMessageNew(Element element, String protocol)
      Creates a missing-plugin message for element to notify the application that a sink element for a particular URI protocol is missing. This function is mainly for use in plugins.
      Parameters:
      element - the GstElement posting the message
      protocol - the URI protocol the missing sink needs to implement, e.g. "http" or "smb"
      Returns:
      a new GstMessage
    • missingUriSourceInstallerDetailNew

      public static String missingUriSourceInstallerDetailNew(String protocol)

      Returns an opaque string containing all the details about the missing element to be passed to an external installer called via gst_install_plugins_async() or gst_install_plugins_sync().

      This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.

      Parameters:
      protocol - the URI protocol the missing source needs to implement, e.g. "http" or "mms"
      Returns:
      a newly-allocated detail string. Free string with g_free() when not needed any longer.
    • missingUriSourceMessageNew

      public static Message missingUriSourceMessageNew(Element element, String protocol)
      Creates a missing-plugin message for element to notify the application that a source element for a particular URI protocol is missing. This function is mainly for use in plugins.
      Parameters:
      element - the GstElement posting the message
      protocol - the URI protocol the missing source needs to implement, e.g. "http" or "mms"
      Returns:
      a new GstMessage
    • pbUtilsAddCodecDescriptionToTagList

      public static boolean pbUtilsAddCodecDescriptionToTagList(TagList taglist, @Nullable String codecTag, Caps caps)
      Adds a codec tag describing the format specified by caps to taglist.
      Parameters:
      taglist - a GstTagList
      codecTag - a GStreamer codec tag such as GST_TAG_AUDIO_CODEC, GST_TAG_VIDEO_CODEC or GST_TAG_CODEC. If none is specified, the function will attempt to detect the appropriate category.
      caps - the (fixed) GstCaps for which a codec tag should be added.
      Returns:
      TRUE if a codec tag was added, FALSE otherwise.
    • pbUtilsGetCapsDescriptionFlags

      public static Set<PbUtilsCapsDescriptionFlags> pbUtilsGetCapsDescriptionFlags(Caps caps)
      Returns flags that describe the format of the caps if known. No flags are set for unknown caps.
      Parameters:
      caps - the (fixed) GstCaps for which flags are requested
      Returns:
      GstPbUtilsCapsDescriptionFlags that describe caps, or no flags if the caps are unknown.
      Since:
      1.20
    • pbUtilsGetCodecDescription

      public static @Nullable String pbUtilsGetCodecDescription(Caps caps)

      Returns a localised (as far as this is possible) string describing the media format specified in caps, for use in error dialogs or other messages to be seen by the user. Should never return NULL unless caps is invalid.

      Also see the convenience function gst_pb_utils_add_codec_description_to_tag_list().

      Parameters:
      caps - the (fixed) GstCaps for which an format description is needed
      Returns:
      a newly-allocated description string, or NULL on error. Free string with g_free() when not needed any longer.
    • pbUtilsGetDecoderDescription

      public static String pbUtilsGetDecoderDescription(Caps caps)

      Returns a localised string describing an decoder for the format specified in caps, for use in error dialogs or other messages to be seen by the user.

      This function is mainly for internal use, applications would typically use gst_missing_plugin_message_get_description() to get a description of a missing feature from a missing-plugin message.

      Parameters:
      caps - the (fixed) GstCaps for which an decoder description is needed
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • pbUtilsGetElementDescription

      public static String pbUtilsGetElementDescription(String factoryName)

      Returns a localised string describing the given element, for use in error dialogs or other messages to be seen by the user.

      This function is mainly for internal use, applications would typically use gst_missing_plugin_message_get_description() to get a description of a missing feature from a missing-plugin message.

      Parameters:
      factoryName - the name of the element, e.g. "giosrc"
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • pbUtilsGetEncoderDescription

      public static String pbUtilsGetEncoderDescription(Caps caps)

      Returns a localised string describing an encoder for the format specified in caps, for use in error dialogs or other messages to be seen by the user.

      This function is mainly for internal use, applications would typically use gst_missing_plugin_message_get_description() to get a description of a missing feature from a missing-plugin message.

      Parameters:
      caps - the (fixed) GstCaps for which an encoder description is needed
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • pbUtilsGetFileExtensionFromCaps

      public static @Nullable String pbUtilsGetFileExtensionFromCaps(Caps caps)
      Returns a possible file extension for the given caps, if known.
      Parameters:
      caps - the (fixed) GstCaps for which a file extension is needed
      Returns:
      a newly-allocated file extension string, or NULL on error. Free string with g_free() when not needed any longer.
      Since:
      1.20
    • pbUtilsGetSinkDescription

      public static String pbUtilsGetSinkDescription(String protocol)

      Returns a localised string describing a sink element handling the protocol specified in protocol, for use in error dialogs or other messages to be seen by the user.

      This function is mainly for internal use, applications would typically use gst_missing_plugin_message_get_description() to get a description of a missing feature from a missing-plugin message.

      Parameters:
      protocol - the protocol the sink element needs to handle, e.g. "http"
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • pbUtilsGetSourceDescription

      public static String pbUtilsGetSourceDescription(String protocol)

      Returns a localised string describing a source element handling the protocol specified in protocol, for use in error dialogs or other messages to be seen by the user.

      This function is mainly for internal use, applications would typically use gst_missing_plugin_message_get_description() to get a description of a missing feature from a missing-plugin message.

      Parameters:
      protocol - the protocol the source element needs to handle, e.g. "http"
      Returns:
      a newly-allocated description string. Free string with g_free() when not needed any longer.
    • pbUtilsInit

      public static void pbUtilsInit()

      Initialises the base utils support library. This function is not thread-safe. Applications should call it after calling gst_init(), plugins should call it from their plugin_init function.

      This function may be called multiple times. It will do nothing if the library has already been initialised.

    • pluginsBaseVersion

      public static void pluginsBaseVersion(Out<Integer> major, Out<Integer> minor, Out<Integer> micro, Out<Integer> nano)
      Gets the version number of the GStreamer Plugins Base libraries.
      Parameters:
      major - pointer to a guint to store the major version number, or null
      minor - pointer to a guint to store the minor version number, or null
      micro - pointer to a guint to store the micro version number, or null
      nano - pointer to a guint to store the nano version number, or null
    • pluginsBaseVersionString

      public static String pluginsBaseVersionString()
      This function returns a string that is useful for describing this version of GStreamer's gst-plugins-base libraries to the outside world: user agent strings, logging, about dialogs ...
      Returns:
      a newly allocated string describing this version of gst-plugins-base