GNOME Bugzilla – Bug 777048
timecodestamper: Post element message with current timecode
Last modified: 2017-01-09 16:53:19 UTC
timecodestamper will post an element message which contains the current timecode it just stamped. If a timecode was already found and not replaced, it will still post it in a message.
Created attachment 343159 [details] [review] 0001-timecodestamper-Post-element-message-with-current-ti.patch
Review of attachment 343159 [details] [review]: ::: gst/timecode/gsttimecodestamper.c @@ +446,3 @@ + gst_util_uint64_scale_int (GST_SECOND, timecodestamper->vinfo.fps_d, + timecodestamper->vinfo.fps_n); + s = gst_structure_new ("timecodestamper", "running-time", G_TYPE_UINT64, Maybe stream-time too? What does level/spectrum do? Also should the name be more generic or is it ok like that? Suggestions? @@ +447,3 @@ + timecodestamper->vinfo.fps_n); + s = gst_structure_new ("timecodestamper", "running-time", G_TYPE_UINT64, + ref_time, "duration", G_TYPE_UINT64, duration, "timecode", G_TYPE_STRING, It would make more sense to put the actual GstVideoTimeCode in here instead of a string @@ +450,3 @@ + tc_str, NULL); + msg = gst_message_new_element (GST_OBJECT (timecodestamper), s); + gst_element_post_message (GST_ELEMENT (timecodestamper), msg); Might want a property to enable/disable this as that many messages can be expensive
Created attachment 343163 [details] [review] 0001-timecodestamper-Post-element-message-with-current-ti.patch Thanks! Applied the comments, please review again
Review of attachment 343163 [details] [review]: ::: gst/timecode/gsttimecodestamper.c @@ +133,3 @@ G_TYPE_DATE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_SEND_MSG, + g_param_spec_boolean ("send-msg", "Send element message", In level and spectrum this is called "post-messages" @@ +455,3 @@ + running_time = + gst_segment_to_running_time (&vfilter->segment, GST_FORMAT_TIME, + buffer->pts); Instead of buffer->pts use GST_BUFFER_PTS(buffer)
Created attachment 343166 [details] [review] 0001-timecodestamper-Post-element-message-with-current-ti.patch
Created attachment 343167 [details] [review] 0001-timecodestamper-Post-element-message-with-current-ti.patch
commit b16cd484bf97fb886d0bf48f75881046827a4a66 Author: Vivia Nikolaidou <vivia@toolsonair.com> Date: Mon Jan 9 17:53:38 2017 +0200 timecodestamper: Post element message with current timecode timecodestamper will post an element message which contains the current timecode it just stamped. If a timecode was already found and not replaced, it will still post it in a message. https://bugzilla.gnome.org/show_bug.cgi?id=777048