static void gst_amc_audio_dec_init (GstAmcAudioDec * self) { gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (self), TRUE); gst_audio_decoder_set_drainable (GST_AUDIO_DECODER (self), TRUE); g_mutex_init (&self->drain_lock); g_cond_init (&self->drain_cond); }
static void gst_ffmpegauddec_init (GstFFMpegAudDec * ffmpegdec) { GstFFMpegAudDecClass *klass = (GstFFMpegAudDecClass *) G_OBJECT_GET_CLASS (ffmpegdec); /* some ffmpeg data */ ffmpegdec->context = avcodec_alloc_context3 (klass->in_plugin); ffmpegdec->opened = FALSE; gst_audio_decoder_set_drainable (GST_AUDIO_DECODER (ffmpegdec), TRUE); gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (ffmpegdec), TRUE); }
static gboolean gst_wavpack_dec_start (GstAudioDecoder * dec) { GST_DEBUG_OBJECT (dec, "start"); /* never mind a few errors */ gst_audio_decoder_set_max_errors (dec, 16); /* don't bother us with flushing */ gst_audio_decoder_set_drainable (dec, FALSE); /* aim for some perfect timestamping */ gst_audio_decoder_set_tolerance (dec, 10 * GST_MSECOND); return TRUE; }
static gboolean gst_siren_dec_start (GstAudioDecoder * dec) { GstSirenDec *sdec = GST_SIREN_DEC (dec); GST_DEBUG_OBJECT (dec, "start"); sdec->decoder = Siren7_NewDecoder (16000);; /* no flushing please */ gst_audio_decoder_set_drainable (dec, FALSE); return TRUE; }
void gst_imx_audio_uniaudio_dec_init(GstImxAudioUniaudioDec *imx_decoder) { GstAudioDecoder *base = GST_AUDIO_DECODER(imx_decoder); gst_audio_decoder_set_drainable(base, TRUE); gst_audio_decoder_set_plc_aware(base, FALSE); imx_decoder->codec = NULL; imx_decoder->handle = NULL; imx_decoder->original_channel_positions = NULL; imx_decoder->reordered_channel_positions = NULL; imx_decoder->out_adapter = gst_adapter_new(); imx_decoder->skip_header_counter = 0; imx_decoder->codec_data = NULL; }
static void gst_droidadec_init (GstDroidADec * dec) { gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (dec), TRUE); gst_audio_decoder_set_drainable (GST_AUDIO_DECODER (dec), TRUE); dec->codec = NULL; dec->codec_type = NULL; dec->downstream_flow_ret = GST_FLOW_OK; dec->eos = FALSE; dec->codec_data = NULL; dec->channels = 0; dec->rate = 0; g_mutex_init (&dec->eos_lock); g_cond_init (&dec->eos_cond); dec->adapter = gst_adapter_new (); }
static void gst_ffmpegauddec_init (GstFFMpegAudDec * ffmpegdec) { GstFFMpegAudDecClass *klass = (GstFFMpegAudDecClass *) G_OBJECT_GET_CLASS (ffmpegdec); /* some ffmpeg data */ ffmpegdec->context = avcodec_alloc_context3 (klass->in_plugin); ffmpegdec->context->opaque = ffmpegdec; ffmpegdec->opened = FALSE; ffmpegdec->frame = av_frame_alloc (); GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (ffmpegdec)); gst_audio_decoder_set_use_default_pad_acceptcaps (GST_AUDIO_DECODER_CAST (ffmpegdec), TRUE); gst_audio_decoder_set_drainable (GST_AUDIO_DECODER (ffmpegdec), TRUE); gst_audio_decoder_set_needs_format (GST_AUDIO_DECODER (ffmpegdec), TRUE); }