mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
baseaudio: rename GstAudioState to GstAudioFormatInfo
This commit is contained in:
parent
ecf57f2b73
commit
d1ab04f029
6 changed files with 17 additions and 16 deletions
|
@ -442,7 +442,7 @@ static gboolean
|
|||
gst_base_audio_decoder_src_setcaps (GstPad * pad, GstCaps * caps)
|
||||
{
|
||||
GstBaseAudioDecoder *dec;
|
||||
GstAudioState *state;
|
||||
GstAudioFormatInfo *state;
|
||||
gboolean res = TRUE, changed;
|
||||
|
||||
dec = GST_BASE_AUDIO_DECODER (gst_pad_get_parent (pad));
|
||||
|
|
|
@ -137,7 +137,7 @@ G_STMT_START { \
|
|||
struct _GstBaseAudioDecoderContext {
|
||||
/* input */
|
||||
/* (output) audio format */
|
||||
GstAudioState state;
|
||||
GstAudioFormatInfo state;
|
||||
|
||||
/* parsing state */
|
||||
gboolean eos;
|
||||
|
|
|
@ -919,7 +919,7 @@ gst_base_audio_encoder_sink_setcaps (GstPad * pad, GstCaps * caps)
|
|||
GstBaseAudioEncoder *enc;
|
||||
GstBaseAudioEncoderClass *klass;
|
||||
GstBaseAudioEncoderContext *ctx;
|
||||
GstAudioState *state;
|
||||
GstAudioFormatInfo *state;
|
||||
gboolean res = TRUE, changed = FALSE;
|
||||
|
||||
enc = GST_BASE_AUDIO_ENCODER (GST_PAD_PARENT (pad));
|
||||
|
|
|
@ -105,7 +105,7 @@ typedef struct _GstBaseAudioEncoderContext GstBaseAudioEncoderContext;
|
|||
*/
|
||||
struct _GstBaseAudioEncoderContext {
|
||||
/* input */
|
||||
GstAudioState state;
|
||||
GstAudioFormatInfo state;
|
||||
|
||||
/* output */
|
||||
gint frame_samples;
|
||||
|
@ -192,7 +192,7 @@ struct _GstBaseAudioEncoderClass {
|
|||
gboolean (*stop) (GstBaseAudioEncoder *enc);
|
||||
|
||||
gboolean (*set_format) (GstBaseAudioEncoder *enc,
|
||||
GstAudioState *state);
|
||||
GstAudioFormatInfo *info);
|
||||
|
||||
GstFlowReturn (*handle_frame) (GstBaseAudioEncoder *enc,
|
||||
GstBuffer *buffer);
|
||||
|
|
|
@ -37,7 +37,7 @@ G_STMT_START { \
|
|||
/**
|
||||
* gst_base_audio_parse_caps:
|
||||
* @caps: a #GstCaps
|
||||
* @state: a #GstAudioState
|
||||
* @state: a #GstAudioFormatInfo
|
||||
* @changed: whether @caps introduced a change in current @state
|
||||
*
|
||||
* Parses audio format as represented by @caps into a more concise form
|
||||
|
@ -47,7 +47,7 @@ G_STMT_START { \
|
|||
* Returns: TRUE if parsing succeeded, otherwise FALSE
|
||||
*/
|
||||
gboolean
|
||||
gst_base_audio_parse_caps (GstCaps * caps, GstAudioState * state,
|
||||
gst_base_audio_parse_caps (GstCaps * caps, GstAudioFormatInfo * state,
|
||||
gboolean * _changed)
|
||||
{
|
||||
gboolean res = TRUE, changed = FALSE;
|
||||
|
@ -168,7 +168,7 @@ gst_base_audio_add_streamheader (GstCaps * caps, GstBuffer * buf, ...)
|
|||
* @samples and @bytes (and @fmt).
|
||||
*/
|
||||
gboolean
|
||||
gst_base_audio_encoded_audio_convert (GstAudioState * fmt,
|
||||
gst_base_audio_encoded_audio_convert (GstAudioFormatInfo * fmt,
|
||||
gint64 bytes, gint64 samples, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value)
|
||||
{
|
||||
|
@ -236,8 +236,9 @@ exit:
|
|||
* by @fmt.
|
||||
*/
|
||||
gboolean
|
||||
gst_base_audio_raw_audio_convert (GstAudioState * fmt, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value)
|
||||
gst_base_audio_raw_audio_convert (GstAudioFormatInfo * fmt,
|
||||
GstFormat src_format, gint64 src_value,
|
||||
GstFormat * dest_format, gint64 * dest_value)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
guint scale = 1;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GstAudioState:
|
||||
* GstAudioFormatInfo:
|
||||
* @is_int: whether sample data is int or float
|
||||
* @rate: rate of sample data
|
||||
* @channels: number of channels in sample data
|
||||
|
@ -43,7 +43,7 @@ G_BEGIN_DECLS
|
|||
* @endian: endianness of sample data
|
||||
* @bpf: bytes per audio frame
|
||||
*/
|
||||
typedef struct _GstAudioState {
|
||||
typedef struct _GstAudioFormatInfo {
|
||||
gboolean is_int;
|
||||
gint rate;
|
||||
gint channels;
|
||||
|
@ -54,18 +54,18 @@ typedef struct _GstAudioState {
|
|||
GstAudioChannelPosition *channel_pos;
|
||||
|
||||
gint bpf;
|
||||
} GstAudioState;
|
||||
} GstAudioFormatInfo;
|
||||
|
||||
gboolean gst_base_audio_parse_caps (GstCaps * caps,
|
||||
GstAudioState * state, gboolean * changed);
|
||||
GstAudioFormatInfo * state, gboolean * changed);
|
||||
|
||||
GstCaps *gst_base_audio_add_streamheader (GstCaps * caps, GstBuffer * buf, ...);
|
||||
|
||||
gboolean gst_base_audio_encoded_audio_convert (GstAudioState * fmt,
|
||||
gboolean gst_base_audio_encoded_audio_convert (GstAudioFormatInfo * fmt,
|
||||
gint64 bytes, gint64 samples, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
|
||||
gboolean gst_base_audio_raw_audio_convert (GstAudioState * fmt, GstFormat src_format,
|
||||
gboolean gst_base_audio_raw_audio_convert (GstAudioFormatInfo * fmt, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Reference in a new issue