mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-03 16:09:39 +00:00
baseparse: custom bufferflag indicates not to count frame in stats
This commit is contained in:
parent
b320b08149
commit
0777806170
2 changed files with 14 additions and 1 deletions
|
@ -942,7 +942,9 @@ gst_base_parse_push_buffer (GstBaseParse * parse, GstBuffer * buffer)
|
|||
|
||||
/* update stats */
|
||||
parse->priv->bytecount += GST_BUFFER_SIZE (buffer);
|
||||
parse->priv->framecount++;
|
||||
parse->priv->framecount +=
|
||||
!GST_BUFFER_FLAG_IS_SET (buffer, GST_BASE_PARSE_BUFFER_FLAG_NO_FRAME);
|
||||
GST_BUFFER_FLAG_UNSET (buffer, GST_BASE_PARSE_BUFFER_FLAG_NO_FRAME);
|
||||
if (parse->priv->update_interval &&
|
||||
(parse->priv->framecount % parse->priv->update_interval) == 0)
|
||||
gst_base_parse_update_duration (parse);
|
||||
|
|
|
@ -78,6 +78,17 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
#define GST_BASE_PARSE_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS
|
||||
|
||||
/**
|
||||
* GST_BASE_PARSE_BUFFER_FLAG_NO_FRAME:
|
||||
*
|
||||
* A #GstBufferFlag that can be set to have this buffer not counted as frame,
|
||||
* e.g. if this frame is dependent on a previous one. As it is not counted as
|
||||
* a frame, bitrate increases but frame to time conversions are maintained.
|
||||
*
|
||||
* Since: 0.10.x
|
||||
*/
|
||||
#define GST_BASE_PARSE_BUFFER_FLAG_NO_FRAME GST_BUFFER_FLAG_LAST
|
||||
|
||||
/**
|
||||
* GST_BASE_PARSE_LOCK:
|
||||
* @obj: base parse instance
|
||||
|
|
Loading…
Reference in a new issue