h265parse: Post VIDEO_CODEC tag
This commit is contained in:
parent
6934c7e2fc
commit
843de8ddf4
@ -22,9 +22,8 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gst/base/gstbytereader.h>
|
#include <gst/base/base.h>
|
||||||
#include <gst/base/gstbytewriter.h>
|
#include <gst/pbutils/pbutils.h>
|
||||||
#include <gst/base/gstadapter.h>
|
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
#include "gsth265parse.h"
|
#include "gsth265parse.h"
|
||||||
|
|
||||||
@ -198,6 +197,8 @@ gst_h265_parse_reset (GstH265Parse * h265parse)
|
|||||||
h265parse->have_sps = FALSE;
|
h265parse->have_sps = FALSE;
|
||||||
h265parse->have_vps = FALSE;
|
h265parse->have_vps = FALSE;
|
||||||
|
|
||||||
|
h265parse->sent_codec_tag = FALSE;
|
||||||
|
|
||||||
h265parse->pending_key_unit_ts = GST_CLOCK_TIME_NONE;
|
h265parse->pending_key_unit_ts = GST_CLOCK_TIME_NONE;
|
||||||
h265parse->force_key_unit_event = NULL;
|
h265parse->force_key_unit_event = NULL;
|
||||||
|
|
||||||
@ -1518,6 +1519,26 @@ gst_h265_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
|
||||||
h265parse = GST_H265_PARSE (parse);
|
h265parse = GST_H265_PARSE (parse);
|
||||||
|
|
||||||
|
if (!h265parse->sent_codec_tag) {
|
||||||
|
GstTagList *taglist;
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
|
taglist = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
|
/* codec tag */
|
||||||
|
caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse));
|
||||||
|
gst_pb_utils_add_codec_description_to_tag_list (taglist,
|
||||||
|
GST_TAG_VIDEO_CODEC, caps);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
gst_pad_push_event (GST_BASE_PARSE_SRC_PAD (h265parse),
|
||||||
|
gst_event_new_tag (taglist));
|
||||||
|
|
||||||
|
/* also signals the end of first-frame processing */
|
||||||
|
h265parse->sent_codec_tag = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
buffer = frame->buffer;
|
buffer = frame->buffer;
|
||||||
|
|
||||||
if ((event = check_pending_key_unit_event (h265parse->force_key_unit_event,
|
if ((event = check_pending_key_unit_event (h265parse->force_key_unit_event,
|
||||||
|
@ -89,6 +89,8 @@ struct _GstH265Parse
|
|||||||
/* props */
|
/* props */
|
||||||
guint interval;
|
guint interval;
|
||||||
|
|
||||||
|
gboolean sent_codec_tag;
|
||||||
|
|
||||||
GstClockTime pending_key_unit_ts;
|
GstClockTime pending_key_unit_ts;
|
||||||
GstEvent *force_key_unit_event;
|
GstEvent *force_key_unit_event;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user