Top | ![]() |
![]() |
![]() |
![]() |
guint
gst_codec_utils_aac_get_sample_rate_from_index
(guint sr_idx
);
Translates the sample rate index found in AAC headers to the actual sample rate.
gint
gst_codec_utils_aac_get_index_from_sample_rate
(guint rate
);
Translates the sample rate to the index corresponding to it in AAC spec.
const gchar * gst_codec_utils_aac_get_profile (const guint8 *audio_config
,guint len
);
Returns the profile of the given AAC stream as a string. The profile is
determined using the AudioObjectType field which is in the first 5 bits of
audio_config
.
audio_config |
a pointer to the AudioSpecificConfig as specified in the
Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see
|
|
len |
Length of |
const gchar * gst_codec_utils_aac_get_level (const guint8 *audio_config
,guint len
);
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 audio_config
parameter follows the following format, starting from the
most significant bit of the first byte:
Bit 0:4 contains the AudioObjectType
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
gboolean gst_codec_utils_aac_caps_set_level_and_profile (GstCaps *caps
,const guint8 *audio_config
,guint len
);
Sets the level and profile on caps
if it can be determined from
audio_config
. 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
.
caps |
the GstCaps to which level and profile fields are to be added |
|
audio_config |
a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1 (see below for a more details). |
|
len |
Length of |
const gchar * gst_codec_utils_h264_get_profile (const guint8 *sps
,guint len
);
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
const gchar * gst_codec_utils_h264_get_level (const guint8 *sps
,guint len
);
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()
.
gboolean gst_codec_utils_h264_caps_set_level_and_profile (GstCaps *caps
,const guint8 *sps
,guint len
);
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.
caps |
the GstCaps to which the level and profile are to be added |
|
sps |
Pointer to the sequence parameter set for the stream. |
|
len |
Length of the data available in |
guint8
gst_codec_utils_h264_get_level_idc (const gchar *level
);
Transform a level string from the caps into the level_idc
const gchar * gst_codec_utils_mpeg4video_get_profile (const guint8 *vis_obj_seq
,guint len
);
Converts the profile indication in the stream's visual object sequence into
a string. vis_obj_seq
is expected to be the data following the visual
object sequence start code. Only the first byte
(profile_and_level_indication) is used.
const gchar * gst_codec_utils_mpeg4video_get_level (const guint8 *vis_obj_seq
,guint len
);
Converts the level indication in the stream's visual object sequence into
a string. vis_obj_seq
is expected to be the data following the visual
object sequence start code. Only the first byte
(profile_and_level_indication) is used.
gboolean gst_codec_utils_mpeg4video_caps_set_level_and_profile (GstCaps *caps
,const guint8 *vis_obj_seq
,guint len
);
Sets the level and profile in caps
if it can be determined from
vis_obj_seq
. See gst_codec_utils_mpeg4video_get_level()
and
gst_codec_utils_mpeg4video_get_profile()
for more details on the
parameters.
caps |
the GstCaps to which the level and profile are to be added |
|
vis_obj_seq |
Pointer to the visual object sequence for the stream. |
|
len |
Length of the data available in |