mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
schroenc: Output element message with frame stats
This commit is contained in:
parent
0249d55cd8
commit
d1a78aa3f9
1 changed files with 16 additions and 1 deletions
|
@ -782,7 +782,7 @@ gst_schro_enc_process (GstSchroEnc * schro_enc)
|
||||||
buf = gst_buffer_new_and_alloc (sizeof (double) * 21);
|
buf = gst_buffer_new_and_alloc (sizeof (double) * 21);
|
||||||
schro_encoder_get_frame_stats (schro_enc->encoder,
|
schro_encoder_get_frame_stats (schro_enc->encoder,
|
||||||
(double *) GST_BUFFER_DATA (buf), 21);
|
(double *) GST_BUFFER_DATA (buf), 21);
|
||||||
structure = gst_structure_new ("schroenc",
|
structure = gst_structure_new ("GstSchroEnc",
|
||||||
"frame-stats", GST_TYPE_BUFFER, buf, NULL);
|
"frame-stats", GST_TYPE_BUFFER, buf, NULL);
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
message = gst_message_new_element (GST_OBJECT (schro_enc), structure);
|
message = gst_message_new_element (GST_OBJECT (schro_enc), structure);
|
||||||
|
@ -790,6 +790,21 @@ gst_schro_enc_process (GstSchroEnc * schro_enc)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
GstMessage *message;
|
||||||
|
GstStructure *structure;
|
||||||
|
GstBuffer *buf;
|
||||||
|
|
||||||
|
buf = gst_buffer_new_and_alloc (sizeof (double) * 21);
|
||||||
|
schro_encoder_get_frame_stats (schro_enc->encoder,
|
||||||
|
(double *) GST_BUFFER_DATA (buf), 21);
|
||||||
|
structure = gst_structure_new ("schroenc",
|
||||||
|
"frame-stats", GST_TYPE_BUFFER, buf, NULL);
|
||||||
|
message = gst_message_new_element (GST_OBJECT (schro_enc), structure);
|
||||||
|
gst_element_post_message (GST_ELEMENT (schro_enc), message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (voidptr == NULL) {
|
if (voidptr == NULL) {
|
||||||
GST_DEBUG ("got eos");
|
GST_DEBUG ("got eos");
|
||||||
//frame = schro_enc->eos_frame;
|
//frame = schro_enc->eos_frame;
|
||||||
|
|
Loading…
Reference in a new issue