mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 05:46:36 +00:00
avvidec: Expose Closed Caption as GstVideoCaptionMeta
This commit is contained in:
parent
a68dbb9c82
commit
b894bedeb3
1 changed files with 14 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
||||||
#include <gst/video/gstvideodecoder.h>
|
#include <gst/video/gstvideodecoder.h>
|
||||||
#include <gst/video/gstvideometa.h>
|
#include <gst/video/gstvideometa.h>
|
||||||
#include <gst/video/gstvideopool.h>
|
#include <gst/video/gstvideopool.h>
|
||||||
|
#include <gst/video/video-anc.h>
|
||||||
|
|
||||||
#include "gstav.h"
|
#include "gstav.h"
|
||||||
#include "gstavcodecmap.h"
|
#include "gstavcodecmap.h"
|
||||||
|
@ -1635,6 +1636,19 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
||||||
GST_VIDEO_BUFFER_FLAG_INTERLACED);
|
GST_VIDEO_BUFFER_FLAG_INTERLACED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
AVFrameSideData *side_data =
|
||||||
|
av_frame_get_side_data (ffmpegdec->picture, AV_FRAME_DATA_A53_CC);
|
||||||
|
if (side_data) {
|
||||||
|
GST_LOG_OBJECT (ffmpegdec, "Found CC of size %d", side_data->size);
|
||||||
|
GST_MEMDUMP ("A53 CC", side_data->data, side_data->size);
|
||||||
|
out_frame->output_buffer =
|
||||||
|
gst_buffer_make_writable (out_frame->output_buffer);
|
||||||
|
gst_buffer_add_video_caption_meta (out_frame->output_buffer,
|
||||||
|
GST_VIDEO_CAPTION_TYPE_CEA708_RAW, side_data->data, side_data->size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* cleaning time */
|
/* cleaning time */
|
||||||
/* so we decoded this frame, frames preceding it in decoding order
|
/* so we decoded this frame, frames preceding it in decoding order
|
||||||
* that still do not have a buffer allocated seem rather useless,
|
* that still do not have a buffer allocated seem rather useless,
|
||||||
|
|
Loading…
Reference in a new issue