mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
dtsdec: use base class tag handling helper
... so as to ensure these to be handled and sent at proper time.
This commit is contained in:
parent
df86df9ddf
commit
8aa50a29de
2 changed files with 2 additions and 30 deletions
|
@ -137,8 +137,6 @@ static gboolean gst_dtsdec_parse (GstAudioDecoder * dec, GstAdapter * adapter,
|
||||||
gint * offset, gint * length);
|
gint * offset, gint * length);
|
||||||
static GstFlowReturn gst_dtsdec_handle_frame (GstAudioDecoder * dec,
|
static GstFlowReturn gst_dtsdec_handle_frame (GstAudioDecoder * dec,
|
||||||
GstBuffer * buffer);
|
GstBuffer * buffer);
|
||||||
static GstFlowReturn gst_dtsdec_pre_push (GstAudioDecoder * bdec,
|
|
||||||
GstBuffer ** buffer);
|
|
||||||
|
|
||||||
static GstFlowReturn gst_dtsdec_chain (GstPad * pad, GstBuffer * buf);
|
static GstFlowReturn gst_dtsdec_chain (GstPad * pad, GstBuffer * buf);
|
||||||
|
|
||||||
|
@ -182,7 +180,6 @@ gst_dtsdec_class_init (GstDtsDecClass * klass)
|
||||||
gstbase_class->set_format = GST_DEBUG_FUNCPTR (gst_dtsdec_set_format);
|
gstbase_class->set_format = GST_DEBUG_FUNCPTR (gst_dtsdec_set_format);
|
||||||
gstbase_class->parse = GST_DEBUG_FUNCPTR (gst_dtsdec_parse);
|
gstbase_class->parse = GST_DEBUG_FUNCPTR (gst_dtsdec_parse);
|
||||||
gstbase_class->handle_frame = GST_DEBUG_FUNCPTR (gst_dtsdec_handle_frame);
|
gstbase_class->handle_frame = GST_DEBUG_FUNCPTR (gst_dtsdec_handle_frame);
|
||||||
gstbase_class->pre_push = GST_DEBUG_FUNCPTR (gst_dtsdec_pre_push);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstDtsDec::drc
|
* GstDtsDec::drc
|
||||||
|
@ -266,10 +263,6 @@ gst_dtsdec_stop (GstAudioDecoder * dec)
|
||||||
dca_free (dts->state);
|
dca_free (dts->state);
|
||||||
dts->state = NULL;
|
dts->state = NULL;
|
||||||
}
|
}
|
||||||
if (dts->pending_tags) {
|
|
||||||
gst_tag_list_free (dts->pending_tags);
|
|
||||||
dts->pending_tags = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -459,30 +452,11 @@ gst_dtsdec_update_streaminfo (GstDtsDec * dts)
|
||||||
/* 1 => open bitrate, 2 => variable bitrate, 3 => lossless */
|
/* 1 => open bitrate, 2 => variable bitrate, 3 => lossless */
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_BITRATE,
|
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_BITRATE,
|
||||||
(guint) dts->bit_rate, NULL);
|
(guint) dts->bit_rate, NULL);
|
||||||
|
gst_audio_decoder_merge_tags (GST_AUDIO_DECODER (dts), taglist,
|
||||||
if (dts->pending_tags) {
|
GST_TAG_MERGE_REPLACE);
|
||||||
gst_tag_list_free (dts->pending_tags);
|
|
||||||
dts->pending_tags = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
dts->pending_tags = taglist;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
|
||||||
gst_dtsdec_pre_push (GstAudioDecoder * bdec, GstBuffer ** buffer)
|
|
||||||
{
|
|
||||||
GstDtsDec *dts = GST_DTSDEC (bdec);
|
|
||||||
|
|
||||||
if (G_UNLIKELY (dts->pending_tags)) {
|
|
||||||
gst_element_found_tags_for_pad (GST_ELEMENT (dts),
|
|
||||||
GST_AUDIO_DECODER_SRC_PAD (dts), dts->pending_tags);
|
|
||||||
dts->pending_tags = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_dtsdec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer)
|
gst_dtsdec_handle_frame (GstAudioDecoder * bdec, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,8 +66,6 @@ struct _GstDtsDec {
|
||||||
#else
|
#else
|
||||||
dts_state_t *state;
|
dts_state_t *state;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GstTagList *pending_tags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDtsDecClass {
|
struct _GstDtsDecClass {
|
||||||
|
|
Loading…
Reference in a new issue