diff options
author | David Schleef <ds@schleef.org> | 2010-12-30 18:25:04 -0800 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2011-03-23 21:33:49 -0700 |
commit | d1a78aa3f9e737023b31ec84fef11e13002a12ea (patch) | |
tree | 7880650186edb3e847e514f5ee424041d3200964 /ext/schroedinger | |
parent | 0249d55cd85afc80dce9dc22ca56fc05fd9099e1 (diff) | |
download | gstreamer-plugins-bad-d1a78aa3f9e737023b31ec84fef11e13002a12ea.tar.gz |
schroenc: Output element message with frame stats
Diffstat (limited to 'ext/schroedinger')
-rw-r--r-- | ext/schroedinger/gstschroenc.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index 7af28eac2..3ad76ab81 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -782,7 +782,7 @@ gst_schro_enc_process (GstSchroEnc * schro_enc) 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", + structure = gst_structure_new ("GstSchroEnc", "frame-stats", GST_TYPE_BUFFER, buf, NULL); gst_buffer_unref (buf); message = gst_message_new_element (GST_OBJECT (schro_enc), structure); @@ -790,6 +790,21 @@ gst_schro_enc_process (GstSchroEnc * schro_enc) } #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) { GST_DEBUG ("got eos"); //frame = schro_enc->eos_frame; |