summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xplugins/beepdec/beepdec.c9
-rwxr-xr-xplugins/beepdec/beepdec.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/beepdec/beepdec.c b/plugins/beepdec/beepdec.c
index 065f3be..3f22f12 100755
--- a/plugins/beepdec/beepdec.c
+++ b/plugins/beepdec/beepdec.c
@@ -434,8 +434,10 @@ static gboolean beep_dec_set_format(GstAudioDecoder *dec, GstCaps *caps)
do{
beepdec = GST_BEEP_DEC (dec);
- if (beepdec->beep_interface == NULL) {
- beepdec->beep_interface = beep_core_create_interface_from_caps_dsp (caps);
+ if (beepdec->beep_interface == NULL || beepdec->dsp_dec == TRUE) {
+ if (beepdec->beep_interface == NULL) {
+ beepdec->beep_interface = beep_core_create_interface_from_caps_dsp (caps);
+ }
if (beepdec->beep_interface) {
AUDIOFORMAT type = FORMAT_UNKNOW;
GST_INFO (" dsp wrapper interface created ");
@@ -470,6 +472,7 @@ static gboolean beep_dec_set_format(GstAudioDecoder *dec, GstCaps *caps)
GST_INFO (" dsp set parameter fail ");
goto dsp_fail;
}
+ beepdec->dsp_dec = TRUE;
break;
}
dsp_fail:
@@ -478,6 +481,7 @@ dsp_fail:
beepdec->handle = NULL;
}
beepdec->beep_interface = NULL;
+ beepdec->dsp_dec = FALSE;
}
GST_INFO ("normal create sw wrapper interface");
@@ -532,6 +536,7 @@ static gboolean beep_dec_start (GstAudioDecoder * dec)
beepdec->set_codec_data = FALSE;
beepdec->in_cnt = 0;
beepdec->eos_sent = FALSE;
+ beepdec->dsp_dec = FALSE;
gst_audio_decoder_set_estimate_rate(dec, TRUE);
diff --git a/plugins/beepdec/beepdec.h b/plugins/beepdec/beepdec.h
index 69857e5..da71a67 100755
--- a/plugins/beepdec/beepdec.h
+++ b/plugins/beepdec/beepdec.h
@@ -91,6 +91,7 @@ struct _GstBeepDec
gint frame_cnt;
gint in_cnt;
gboolean eos_sent;
+ gboolean dsp_dec; /* use hifi decoder or not*/
};
struct _GstBeepDecClass