mpeg4videoparse: Post VIDEO_CODEC tag
This commit is contained in:
parent
843de8ddf4
commit
188b445fdd
@ -29,8 +29,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/base/gstbytereader.h>
|
#include <gst/base/base.h>
|
||||||
#include <gst/pbutils/codec-utils.h>
|
#include <gst/pbutils/pbutils.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
#include "gstmpeg4videoparse.h"
|
#include "gstmpeg4videoparse.h"
|
||||||
@ -709,6 +709,25 @@ gst_mpeg4vparse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
|||||||
gboolean push_codec = FALSE;
|
gboolean push_codec = FALSE;
|
||||||
GstEvent *event = NULL;
|
GstEvent *event = NULL;
|
||||||
|
|
||||||
|
if (!mp4vparse->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 (mp4vparse),
|
||||||
|
gst_event_new_tag (taglist));
|
||||||
|
|
||||||
|
/* also signals the end of first-frame processing */
|
||||||
|
mp4vparse->sent_codec_tag = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((event = check_pending_key_unit_event (mp4vparse->force_key_unit_event,
|
if ((event = check_pending_key_unit_event (mp4vparse->force_key_unit_event,
|
||||||
&parse->segment, GST_BUFFER_TIMESTAMP (buffer),
|
&parse->segment, GST_BUFFER_TIMESTAMP (buffer),
|
||||||
GST_BUFFER_FLAGS (buffer), mp4vparse->pending_key_unit_ts))) {
|
GST_BUFFER_FLAGS (buffer), mp4vparse->pending_key_unit_ts))) {
|
||||||
|
@ -54,6 +54,7 @@ struct _GstMpeg4VParse {
|
|||||||
gboolean config_found;
|
gboolean config_found;
|
||||||
gboolean intra_frame;
|
gboolean intra_frame;
|
||||||
gboolean update_caps;
|
gboolean update_caps;
|
||||||
|
gboolean sent_codec_tag;
|
||||||
|
|
||||||
GstMpeg4VisualObject vo;
|
GstMpeg4VisualObject vo;
|
||||||
gint vo_offset;
|
gint vo_offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user