Jump to content

LibMISB/Examples/Library basic usage: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 5: Line 5:
</noinclude>
</noinclude>


{{review|For Examples section please divide it in 2 pages: 1. Library basic usage. 2. Add data to MPEG Transport Stream.|Enrique}}


== Testing library ==
== Testing library ==
This library has an example that you can execute. This example is a metadata converter that can encode or decode metadata. If you want to encode, the input file must respect one of the formats developed (for this first version, only could use JSON format) and will return a binary file with metadata encoded. On the other hand, if you want to decode the program receives a binary file and converts it to the format file selected (for this first version, only could use JSON format).  
This library has an example that you can execute. This example is a metadata converter that can encode or decode metadata. If you want to encode, the input file must respect one of the formats developed (for this first version, only could use JSON format) and will return a binary file with metadata encoded. On the other hand, if you want to decode the program receives a binary file and converts it to the format file selected (for this first version, only could use JSON format).  


Line 17: Line 19:


=== Encode command ===
=== Encode command ===
{{review|Please show the JSON file, to let the viewer understand the whole process. Show input (JSON) and output byte-stream |Enrique}}
To perform the encoding, the following command is executed. Where the '''--encode''' flag indicates that encoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be raw without encoding. On the other hand, the '''-o''' flag indicates the output file, which contains the encoded bytes in a binary file. The '''--verbose''' flag shows the KLV bytes encoded on the terminal.  
To perform the encoding, the following command is executed. Where the '''--encode''' flag indicates that encoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be raw without encoding. On the other hand, the '''-o''' flag indicates the output file, which contains the encoded bytes in a binary file. The '''--verbose''' flag shows the KLV bytes encoded on the terminal.  


Line 24: Line 28:


=== Decode command ===
=== Decode command ===
{{review|The same here, show input (byte-stream) and output (JSON generated)|Enrique}}
To perform the decoding, the following command is executed. Where the '''--decode''' flag indicates that decoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be encoded. The '''-o''' flag indicates the output file, which contains the metadata decoded.  
To perform the decoding, the following command is executed. Where the '''--decode''' flag indicates that decoding is to be performed. The '''-i''' flag indicates the input file, where the metadata must be encoded. The '''-o''' flag indicates the output file, which contains the metadata decoded.  


Line 31: Line 37:


== Reference application ==
== Reference application ==
{{review|Move this to the other page (2. Add data to MPEG Transport Stream), Please start the example saying there are plans to implement a GStreamer misb codec, but in the meantime there's a reference to include the encoded data into a MPEG Transport Stream.|Enrique}}
In the following example, we show you how to use Gstreamer In-Band metadata to add a KLV packet (generated by LibMISB) into a Transport Stream. Based on [https://developer.ridgerun.com/wiki/index.php/GStreamer_In-Band_Metadata_for_MPEG_Transport_Stream/Examples/_C/C%2B%2B GStreamer In-Band Metadata for MPEG Transport Stream - Examples - C - C++]
In the following example, we show you how to use Gstreamer In-Band metadata to add a KLV packet (generated by LibMISB) into a Transport Stream. Based on [https://developer.ridgerun.com/wiki/index.php/GStreamer_In-Band_Metadata_for_MPEG_Transport_Stream/Examples/_C/C%2B%2B GStreamer In-Band Metadata for MPEG Transport Stream - Examples - C - C++]


286

edits

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