Jump to content

GstSEIMetadata/User Guide: Difference between revisions

no edit summary
No edit summary
Line 173: Line 173:
  Note: This element currently only supports H264 encoded buffers.
  Note: This element currently only supports H264 encoded buffers.


==SeiLatencytester element==
== SeiExtract element ==
The expected output of running <pre>gst-inspect-1.0 seilatencytester</pre> is the following:
The expected output of running <pre>gst-inspect-1.0 seiextract</pre> is the following:
 
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Factory Details:
Factory Details:
   Rank                    none (0)
   Rank                    none (0)
   Long-name                Helper element to measure latency using the GstSeiMeta from buffers.
   Long-name                SEI Extract Metadata
   Klass                    Generic
   Klass                    Generic
   Description              Helper element to measure latency using the GstSeiMeta from buffers.
   Description              Extracts metadata from SEI NAL units
   Author                  Jimena Salas <jimena.salas@ridgerun.com>
   Author                  Fernando Herrera <fernando.herrera@ridgerun.com>


Plugin Details:
Plugin Details:
Line 199: Line 198:
             +----GstElement
             +----GstElement
                   +----GstBaseTransform
                   +----GstBaseTransform
                         +----GstSeiLatencyTester
                         +----GstSeiExtract


Pad Templates:
Pad Templates:
Line 205: Line 204:
     Availability: Always
     Availability: Always
     Capabilities:
     Capabilities:
       ANY
       video/x-h264
          stream-format: { (string)byte-stream, (string)avc }
      video/x-h265
          stream-format: { (string)byte-stream, (string)hvc1 }
    
    
   SRC template: 'src'
   SRC template: 'src'
     Availability: Always
     Availability: Always
     Capabilities:
     Capabilities:
       ANY
       video/x-h264
          stream-format: { (string)byte-stream, (string)avc }
      video/x-h265
          stream-format: { (string)byte-stream, (string)hvc1 }


Element has no clocking capabilities.
Element has no clocking capabilities.
Line 224: Line 229:
   name                : The name of the object
   name                : The name of the object
                         flags: readable, writable, 0x2000
                         flags: readable, writable, 0x2000
                         String. Default: "seilatencytester0"
                         String. Default: "seiextract0"
   parent              : The parent of the object
   parent              : The parent of the object
                         flags: readable, writable, 0x2000
                         flags: readable, writable, 0x2000
Line 231: Line 236:
                         flags: readable, writable
                         flags: readable, writable
                         Boolean. Default: false
                         Boolean. Default: false
   timestamp-source    : Source clock for timestamp difference calculation (must match the one used for the seimetatimestamp)
   signal-new-metadata : Send a signal on new metadata
                         flags: readable, writable
                         flags: readable, writable
                         Enum "GstSeiMetaTimestampSources" Default: 0, "pipeline"
                         Boolean. Default: false
                          (0): pipeline        - Pipeline clock (use only when pipelines ares using the same clock)
 
                          (2): sysclk          - System clock
Element Signals:
                          (1): buffer          - Buffer timestamp
  "new-metadata" : void user_function (GstElement* object,
                          (3): reference        - Reference timestamp
                                        guint arg0,
                                        gpointer arg1,
                                        gpointer user_data);
 
</syntaxhighlight>
</syntaxhighlight>


===Important Properties===
* signal-new-metadata: It is a boolean that if set to TRUE sends a signal when metadata is received.
The following pipeline use the seiextract element to add a GstMeta with the message "Hello World" to the output buffer.


As shown in the description, this element measures the latency of each buffer by using the element of metadata. An example of how to use this would be the following pipeline with the seiinject and seimetatimestamp elements.
'''H264'''
<pre>
gst-launch-1.0 videotestsrc ! x264enc ! seiinject metadata="Hello World" ! seiextract ! filesink location=seiinject_videotestsrc.h264 -v
</pre>


'''H265'''
<pre>
<pre>
gst-launch-1.0 videotestsrc ! x264enc ! seimetatimestamp ! seilatencytester ! seiinject metadata="Hello World" ! filesink location=seiinject_videotestsrc.h264 -v
gst-launch-1.0 videotestsrc ! x265enc ! seiinject metadata="Hello World" ! seiextract ! filesink location=seiinject_videotestsrc.h265 -v
</pre>
</pre>


== SeiExtract element ==
 
The expected output of running <pre>gst-inspect-1.0 seiextract</pre> is the following:
==SeiLatencytester element==
The expected output of running <pre>gst-inspect-1.0 seilatencytester</pre> is the following:
 
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
Factory Details:
Factory Details:
   Rank                    none (0)
   Rank                    none (0)
   Long-name                SEI Extract Metadata
   Long-name                Helper element to measure latency using the GstSeiMeta from buffers.
   Klass                    Generic
   Klass                    Generic
   Description              Extracts metadata from SEI NAL units
   Description              Helper element to measure latency using the GstSeiMeta from buffers.
   Author                  Fernando Herrera <fernando.herrera@ridgerun.com>
   Author                  Jimena Salas <jimena.salas@ridgerun.com>


Plugin Details:
Plugin Details:
Line 272: Line 289:
             +----GstElement
             +----GstElement
                   +----GstBaseTransform
                   +----GstBaseTransform
                         +----GstSeiExtract
                         +----GstSeiLatencyTester


Pad Templates:
Pad Templates:
Line 278: Line 295:
     Availability: Always
     Availability: Always
     Capabilities:
     Capabilities:
       video/x-h264
       ANY
          stream-format: { (string)byte-stream, (string)avc }
      video/x-h265
          stream-format: { (string)byte-stream, (string)hvc1 }
    
    
   SRC template: 'src'
   SRC template: 'src'
     Availability: Always
     Availability: Always
     Capabilities:
     Capabilities:
       video/x-h264
       ANY
          stream-format: { (string)byte-stream, (string)avc }
      video/x-h265
          stream-format: { (string)byte-stream, (string)hvc1 }


Element has no clocking capabilities.
Element has no clocking capabilities.
Line 303: Line 314:
   name                : The name of the object
   name                : The name of the object
                         flags: readable, writable, 0x2000
                         flags: readable, writable, 0x2000
                         String. Default: "seiextract0"
                         String. Default: "seilatencytester0"
   parent              : The parent of the object
   parent              : The parent of the object
                         flags: readable, writable, 0x2000
                         flags: readable, writable, 0x2000
Line 310: Line 321:
                         flags: readable, writable
                         flags: readable, writable
                         Boolean. Default: false
                         Boolean. Default: false
   signal-new-metadata : Send a signal on new metadata
   timestamp-source    : Source clock for timestamp difference calculation (must match the one used for the seimetatimestamp)
                         flags: readable, writable
                         flags: readable, writable
                         Boolean. Default: false
                         Enum "GstSeiMetaTimestampSources" Default: 0, "pipeline"
 
                          (0): pipeline        - Pipeline clock (use only when pipelines ares using the same clock)
Element Signals:
                          (2): sysclk          - System clock
  "new-metadata" :  void user_function (GstElement* object,
                          (1): buffer          - Buffer timestamp
                                        guint arg0,
                          (3): reference        - Reference timestamp
                                        gpointer arg1,
                                        gpointer user_data);
 
</syntaxhighlight>
</syntaxhighlight>


==Important Properties==
* signal-new-metadata: It is a boolean that if set to TRUE sends a signal when metadata is received.
The following pipeline use the seiextract element to add a GstMeta with the message "Hello World" to the output buffer.


'''H264'''
As shown in the description, this element measures the latency of each buffer by using the element of metadata. An example of how to use this would be the following pipeline with the seiinject and seimetatimestamp elements.
<pre>
gst-launch-1.0 videotestsrc ! x264enc ! seiinject metadata="Hello World" ! seiextract ! filesink location=seiinject_videotestsrc.h264 -v
</pre>


'''H265'''
<pre>
<pre>
gst-launch-1.0 videotestsrc ! x265enc ! seiinject metadata="Hello World" ! seiextract ! filesink location=seiinject_videotestsrc.h265 -v
gst-launch-1.0 videotestsrc ! x264enc ! seimetatimestamp ! seilatencytester ! seiinject metadata="Hello World" ! filesink location=seiinject_videotestsrc.h264 -v
</pre>
</pre>


532

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.