mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
cccombiner: expose new input-meta-processing type, force
In force mode, generated captions are discarded even if input video buffers do not hold CC meta. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8091>
This commit is contained in:
parent
0c17efafa3
commit
7be4d09f14
3 changed files with 16 additions and 0 deletions
|
@ -8183,6 +8183,11 @@
|
||||||
"desc": "discard aggregated CC when input video buffers hold CC metas already",
|
"desc": "discard aggregated CC when input video buffers hold CC metas already",
|
||||||
"name": "favor",
|
"name": "favor",
|
||||||
"value": "2"
|
"value": "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"desc": "discard aggregated CC even when input video buffers do not hold CC",
|
||||||
|
"name": "force",
|
||||||
|
"value": "3"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -90,6 +90,9 @@ gst_cccombiner_input_meta_processing_get_type (void)
|
||||||
{CCCOMBINER_INPUT_PROCESSING_FAVOR,
|
{CCCOMBINER_INPUT_PROCESSING_FAVOR,
|
||||||
"discard aggregated CC when input video buffers hold CC metas already",
|
"discard aggregated CC when input video buffers hold CC metas already",
|
||||||
"favor"},
|
"favor"},
|
||||||
|
{CCCOMBINER_INPUT_PROCESSING_FORCE,
|
||||||
|
"discard aggregated CC even when input video buffers do not hold CC",
|
||||||
|
"force"},
|
||||||
{0, NULL, NULL},
|
{0, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -679,6 +682,12 @@ gst_cc_combiner_collect_captions (GstCCCombiner * self, gboolean timeout)
|
||||||
g_array_set_size (self->current_frame_captions, 0);
|
g_array_set_size (self->current_frame_captions, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case CCCOMBINER_INPUT_PROCESSING_FORCE:
|
||||||
|
GST_LOG_OBJECT (self,
|
||||||
|
"Forced input captions, dropping %d dequeued captions",
|
||||||
|
self->current_frame_captions->len);
|
||||||
|
g_array_set_size (self->current_frame_captions, 0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->current_frame_captions->len > 0) {
|
if (self->current_frame_captions->len > 0) {
|
||||||
|
|
|
@ -47,6 +47,7 @@ typedef struct _GstCCCombinerClass GstCCCombinerClass;
|
||||||
* @CCCOMBINER_INPUT_PROCESSING_APPEND: append aggregated CC to existing metas on video buffers
|
* @CCCOMBINER_INPUT_PROCESSING_APPEND: append aggregated CC to existing metas on video buffers
|
||||||
* @CCCOMBINER_INPUT_PROCESSING_DROP: drop existing CC metas on input video buffers
|
* @CCCOMBINER_INPUT_PROCESSING_DROP: drop existing CC metas on input video buffers
|
||||||
* @CCCOMBINER_INPUT_PROCESSING_FAVOR: discard aggregated CC when input video buffers hold CC metas already
|
* @CCCOMBINER_INPUT_PROCESSING_FAVOR: discard aggregated CC when input video buffers hold CC metas already
|
||||||
|
* @CCCOMBINER_INPUT_PROCESSING_FORCE: discard aggregated CC even when input video buffers do not hold CC meta
|
||||||
*
|
*
|
||||||
* Possible processing types for the input-meta-processing property.
|
* Possible processing types for the input-meta-processing property.
|
||||||
*
|
*
|
||||||
|
@ -56,6 +57,7 @@ typedef enum {
|
||||||
CCCOMBINER_INPUT_PROCESSING_APPEND = 0,
|
CCCOMBINER_INPUT_PROCESSING_APPEND = 0,
|
||||||
CCCOMBINER_INPUT_PROCESSING_DROP,
|
CCCOMBINER_INPUT_PROCESSING_DROP,
|
||||||
CCCOMBINER_INPUT_PROCESSING_FAVOR,
|
CCCOMBINER_INPUT_PROCESSING_FAVOR,
|
||||||
|
CCCOMBINER_INPUT_PROCESSING_FORCE,
|
||||||
} GstCCCombinerInputProcessing;
|
} GstCCCombinerInputProcessing;
|
||||||
|
|
||||||
struct _GstCCCombiner
|
struct _GstCCCombiner
|
||||||
|
|
Loading…
Reference in a new issue