コード例 #1
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TelchemyManipulatorMarkov2StateResource.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to configure different data sets for individual 2-state markov
models which can be used for packet manipulation purposes by telchemy.""",
            fields=[
                MetaTableField(
                    TelchemyManipulatorMarkov2StateResource.DB_FIELD_NAME_ID,
                    int, 'unique id to identify the model in the table'),
                MetaTableField(
                    TelchemyManipulatorMarkov2StateResource.DB_FIELD_NAME_PCB,
                    float, 'Transition probability from burst to gap state'),
                MetaTableField(
                    TelchemyManipulatorMarkov2StateResource.DB_FIELD_NAME_PBC,
                    float, 'Transition probability from gap to burst state'),
                MetaTableField(
                    TelchemyManipulatorMarkov2StateResource.DB_FIELD_NAME_G,
                    float, 'Loss probability in gap state'),
                MetaTableField(
                    TelchemyManipulatorMarkov2StateResource.DB_FIELD_NAME_B,
                    float, 'Loss probability in burst state')
            ],
            footer_doc='Source: http://vqegstl.ugent.be/?q=node/27')
コード例 #2
0
ファイル: x264Codec.py プロジェクト: krzemienski/streamsim
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            X264Codec.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to define multiple individual x264 settings which can be applied
for video encoding techniques in the context of the processing chain.""",
            fields=[
                MetaTableField(
                    CodecTable.DB_TABLE_FIELD_NAME_ID, int,
                    'unique integer value identifying the data set'),
                MetaTableField(
                    X264Codec.DB_TABLE_FIELD_NAME_PRESET, str,
                    'preset according to https://trac.ffmpeg.org/wiki/Encode/H.264#crf',
                    X264Codec.DB_TABLE_FIELD_PRESET_VALID_VALUES),
                MetaTableField(
                    X264Codec.DB_TABLE_FIELD_NAME_CRF, int,
                    'quantizer scale according to https://trac.ffmpeg.org/wiki/Encode/H.264#crf'
                ),
                MetaTableField(
                    X264Codec.DB_TABLE_FIELD_NAME_KEYINT, int,
                    'similiar to gop length; defines the maximum number of frames between two I-frames'
                ),
                MetaTableField(X264Codec.DB_TABLE_FIELD_NAME_MIN_KEYINT, int,
                               'minimum distance between two I-frames')
            ])
コード例 #3
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TrafficControlManipulatorStateModeResource.DB_TABLE_NAME,
            header_doc="""In this csv file you are able to configure individual markov models which can be used by the
tc online network manipulator to insert packet loss into an ongoing transmission.""",
            fields=[
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_ID_FIELD_NAME,
                    int,
                    'unique id to identify each data set individually'
                ),
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_P13_FIELD_NAME,
                    float,
                    'probability in percent (%) for the good reception'
                ),
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_P31_FIELD_NAME,
                    float,
                    '[optional] probability in percent (%)'
                ),
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_P32_FIELD_NAME,
                    float,
                    '[optional] probability in percent (%)'
                ),
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_P23_FIELD_NAME,
                    float,
                    '[optional] probability in percent (%)'
                ),
                MetaTableField(
                    TrafficControlManipulatorStateModeResource.DB_P14_FIELD_NAME,
                    float,
                    '[optional] probability in percent (%)'
                )
            ],
            footer_doc="""* if %s is set only => Bernoulli Model
* With %s the configuration above is extended to a 2-State Markov Model (Good reception within a burst)
* With %s and %s the configuration above is extended to a 3-State Markov Model (Burst losses)
* With %s the configuration above is extended to a 4-State Markov Model (Independent losses)""" % (
                TrafficControlManipulatorStateModeResource.DB_P13_FIELD_NAME,

                TrafficControlManipulatorStateModeResource.DB_P31_FIELD_NAME,

                TrafficControlManipulatorStateModeResource.DB_P32_FIELD_NAME,
                TrafficControlManipulatorStateModeResource.DB_P23_FIELD_NAME,

                TrafficControlManipulatorStateModeResource.DB_P14_FIELD_NAME
            )
        )
コード例 #4
0
ファイル: hrcTable.py プロジェクト: krzemienski/streamsim
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        config = MetaTable(
            'hrc',
            header_doc="""In this csv file you are able to link different settings together which can be applied on an
arbitrary source.""",
            fields=[
                MetaTableField(
                    HrcTable.DB_TABLE_FIELD_NAME_HRC_ID,
                    int,
                    'unique id for each individual HRC data set used to reference it'
                ),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_ENCODING_ID,
                    int,
                    'id of the settings used for encoding (Defined in the hrc/encoding.csv file)'
                ),
                MetaTableField(
                    PacketLossTable.DB_TABLE_FIELD_NAME_PACKET_LOSS_ID,
                    int,
                    'id of the settings used for packet manipulation (Defined in the hrc/packet_loss.csv file)'
                ),
                MetaTableField(
                    HrcTable.DB_TABLE_FIELD_NAME_CODER_ID,
                    str,
                    'name of the coder to use for encoding, streaming and decoding'
                ),
                MetaTableField(
                    HrcTable.DB_TABLE_FIELD_NAME_STREAM_MODE,
                    str,
                    'mode in which the file should be streamed',
                    HrcTable.VALID_STREAM_MODES
                )
            ]
        )

        # build sub-tree from hrc
        config.add_children([EncodingTable.get_meta_description(), PacketLossTable.get_meta_description()])
        return config
コード例 #5
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TrafficControlManipulatorGeModelResource.DB_TABLE_NAME,
            header_doc="""In this file you are able to configure arbitrary data sets og gilbert-elliot or bernoulli
models which can be used by the tc tool to manipulate the network traffic according to these models.""",
            fields=[
                MetaTableField(
                    TrafficControlManipulatorGeModelResource.DB_ID_FIELD_NAME,
                    int,
                    'unique id to identify the data set'
                ),
                MetaTableField(
                    TrafficControlManipulatorGeModelResource.DB_BAD_PROB_FIELD_NAME,
                    float,
                    'transition probability in % for bad states'
                ),
                MetaTableField(
                    TrafficControlManipulatorGeModelResource.DB_GOOD_PROB_FIELD_NAME,
                    float,
                    'the transition probability for good states [default: %s = 100%% - %s]' % (
                        TrafficControlManipulatorGeModelResource.DB_GOOD_PROB_FIELD_NAME,
                        TrafficControlManipulatorGeModelResource.DB_BAD_PROB_FIELD_NAME
                    )
                ),
                MetaTableField(
                    TrafficControlManipulatorGeModelResource.DB_GOOD_LOSS_PROB_FIELD_NAME,
                    float,
                    'loss probability in the good state [default: 0%]'
                ),
                MetaTableField(
                    TrafficControlManipulatorGeModelResource.DB_BAD_LOSS_PROB_FIELD_NAME,
                    float,
                    'loss probability in the bad state [default: 100%]'
                )
            ],
            footer_doc="""* If only %s is set             => Bernoulli Model
* If only %s and %s are set      => Simple Gilbert Model
* If only %s, %s and %s are set => Gilbert Model
* If all params set            => Gilbert-Elliot Model""" % (
                TrafficControlManipulatorGeModelResource.DB_BAD_PROB_FIELD_NAME,

                TrafficControlManipulatorGeModelResource.DB_BAD_PROB_FIELD_NAME,
                TrafficControlManipulatorGeModelResource.DB_GOOD_PROB_FIELD_NAME,

                TrafficControlManipulatorGeModelResource.DB_BAD_PROB_FIELD_NAME,
                TrafficControlManipulatorGeModelResource.DB_GOOD_PROB_FIELD_NAME,
                TrafficControlManipulatorGeModelResource.DB_GOOD_LOSS_PROB_FIELD_NAME
            )
        )
コード例 #6
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            EncodingTable.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to specify different sets of encoding settings which can be used
 by different encoders, to encode an arbitrary video source.""",
            fields=[
                MetaTableField(EncodingTable.DB_TABLE_FIELD_NAME_ENCODING_ID,
                               int,
                               'unique id to identify the encoding data set'),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_CODEC_ID, str,
                    'unique name id to identify the codec used for the encoding operation'
                ),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_CODEC_SETTINGS_ID, int,
                    'id to link these settings with the codec\'s appropriate settings'
                ),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_BIT_RATE, int,
                    'bit rate the video should be encoded with (unit: kbit/s)'
                ),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_TWO_PASS, bool,
                    '0 if one-pass encoding should be used, 1 otherwise'),
                MetaTableField(
                    EncodingTable.DB_TABLE_FIELD_NAME_ALTERNATIVE_COMMAND_LINE,
                    str,
                    """Instead of using the flexible and generic encoding table system, you can also define here a
complete command line which will be then executed. Note that you are responsible by your own for the validity of this
command line. A wrong command line might arise an undesired behaviour with wrong results!

You can use the following parameters as generic variables within your command line
""", {
                        EncodingTable.ALT_CMD_FIELD_SRC_PATH:
                        """The complete path of the source video including the
source file name""",
                        EncodingTable.ALT_CMD_FIELD_OUT_PATH:
                        """The complete path of the destination where to save the
encoded video (usually not required, is added
automatically at the line's end)""",
                        EncodingTable.ALT_CMD_FIELD_FPS_VALUE:
                        """The fps value of the appropriate source defined in the
source table""",
                        EncodingTable.ALT_CMD_FIELD_RES_VALUE:
                        """The res value of the appropriate source defined in the
source table""",
                    })
            ])
コード例 #7
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        config = MetaTable(
            TelchemyManipulatorResource.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to configure different individual setting combination which can
be used to manipulate .pcap files with the telchemy tpkloss tool.""",
            fields=[
                MetaTableField(
                    TelchemyManipulatorResource.DB_FIELD_NAME_ID, int,
                    'unique id to identify each data set individually'),
                MetaTableField(
                    TelchemyManipulatorResource.DB_FIELD_MANIPULATION_TYPE,
                    str,
                    'defines the manipulation model to use for the manipulation',
                    {
                        TelchemyManipulatorResource.MANIPULATION_TYPE_MARKOV:
                        'use a markov model (further specifications in %s table)'
                        % TelchemyManipulatorMarkovResource.DB_TABLE_NAME,
                        TelchemyManipulatorResource.MANIPULATION_TYPE_READ_TRACE:
                        'read a trace (further specifications in %s table)' %
                        TelchemyManipulatorReadTraceResource.DB_TABLE_NAME
                    }),
                MetaTableField(
                    TelchemyManipulatorResource.DB_FIELD_MANIPULATION_ID, int,
                    'id to identify the settings linked to the appropriate manipulation'
                )
            ])

        config.add_children([
            TelchemyManipulatorReadTraceResource.get_meta_description(),
            TelchemyManipulatorMarkovResource.get_meta_description()
        ])

        return config
コード例 #8
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TelchemyManipulatorMarkov4StateResource.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to configure different 4-state markov models which can be used
then by the telchemy tool to manipulate different pcap files with loss behaviour.""",
            fields=[
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_ID,
                    int, 'unique id to identify each data set individually'),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_PBA,
                    float,
                    'Transition probability from gap lossless to gap lossy state'
                ),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_PBC,
                    float,
                    'Transition probability from gap to gap burst state'),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_PDC,
                    float,
                    'Transition probability from burst lossless to burst lossy state [default: 25%]'
                ),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_PCD,
                    float,
                    'Transition probability from burst lossy to burst lossless state [default: 50%]'
                ),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_PCB,
                    float,
                    'Transition probability from burst to gap state [default: 30%]'
                ),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_G,
                    float, 'Loss probability in gap state'),
                MetaTableField(
                    TelchemyManipulatorMarkov4StateResource.DB_FIELD_NAME_B,
                    float, 'Loss probability in burst state')
            ],
            footer_doc='Source: http://vqegstl.ugent.be/?q=node/27')
コード例 #9
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TelchemyManipulatorReadTraceResource.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to configure different individual setting combination which can
be used to manipulate .pcap files with the telchemy tpkloss tool, but only for trace reading applications.""",
            fields=[
                MetaTableField(
                    TelchemyManipulatorReadTraceResource.DB_FIELD_NAME_ID, int,
                    'unique id to identify each data set individually'),
                MetaTableField(
                    TelchemyManipulatorReadTraceResource.
                    DB_FIELD_NAME_TRACE_FILE_NAME, str,
                    """a relative file path to a loss trace, which is looked up in the folder PATH/traces (with PATH as
the path defined at the chain's execution time with the "p"/"path" argument)"""
                )
            ])
コード例 #10
0
ファイル: pvsMatrix.py プロジェクト: krzemienski/streamsim
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            'pvs',
            header_doc=
            """In this csv-file you are able to link sources with different HRC settings multiply.
Remember to set for each individual connection a unique id.""",
            fields=[
                MetaTableField(PvsMatrix.DB_TABLE_FIELD_NAME_PVS_ID, int,
                               'unique id for each connection'),
                MetaTableField(
                    SrcTable.DB_TABLE_FIELD_NAME_SRC_ID, int,
                    'id of the source (specified in the source table) to link with the HRC'
                ),
                MetaTableField(
                    HrcTable.DB_TABLE_FIELD_NAME_HRC_ID, int,
                    'id of the HRC setting to link with the source')
            ])
コード例 #11
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TrafficControlManipulatorRandomModeResource.DB_TABLE_NAME,
            header_doc="""In this csv file you are able to configure individual data sets which can be used as random
loss models for the tc packet manipulation tool.""",
            fields=[
                MetaTableField(
                    TrafficControlManipulatorRandomModeResource.DB_ID_FIELD_NAME,
                    int,
                    'unique number to identify each data set individually'
                ),
                MetaTableField(
                    TrafficControlManipulatorRandomModeResource.DB_LOSS_RATE_FIELD_NAME,
                    float,
                    'loss rate in percent (%) which may apply in this model'
                )
            ]
        )
コード例 #12
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            X265Codec.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to define multiple individual x265 settings which can be applied
for video encoding techniques in the context of the processing chain.""",
            fields=[
                MetaTableField(
                    CodecTable.DB_TABLE_FIELD_NAME_ID, int,
                    'unique integer value identifying the data set'),
                MetaTableField(
                    X265Codec.DB_TABLE_FIELD_NAME_PRESET, str,
                    'preset according to https://trac.ffmpeg.org/wiki/Encode/H.264#crf',
                    X265Codec.DB_TABLE_FIELD_PRESET_VALID_VALUES),
                MetaTableField(
                    X265Codec.DB_TABLE_FIELD_NAME_CRF, int,
                    'quantizer scale according to https://trac.ffmpeg.org/wiki/Encode/H.264#crf'
                ),
                MetaTableField(
                    X265Codec.DB_TABLE_FIELD_NAME_KEYINT, int,
                    'similiar to gop length; defines the maximum number of frames between two I-frames'
                ),
                MetaTableField(X265Codec.DB_TABLE_FIELD_NAME_MIN_KEYINT, int,
                               'minimum distance between two I-frames'),
                MetaTableField(X265Codec.DB_TABLE_FIELD_NAME_MERANGE, int,
                               'motion search range [default: 57]'),
                MetaTableField(
                    X265Codec.DB_TABLE_FIELD_NAME_ME, str,
                    'motion search method',
                    ('dia', 'hex [default]', 'umh', 'star', 'full')),
                MetaTableField(X265Codec.DB_TABLE_FIELD_NAME_SLICES, int),
                MetaTableField(X265Codec.DB_TABLE_FIELD_NAME_BPYRAMID, str,
                               'use, if possible, b-frames as references'),
                MetaTableField(X265Codec.DB_TABLE_FIELD_NAME_BFRAMES, int,
                               'max number of consecutive b-frames')
            ])
コード例 #13
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            'src',
            header_doc=
            """In this csv file you are able to specify which link resources should be used to perform
operations on in the processing chain. Be aware that each file listed here must exists in the "srcVid" folder.""",
            fields=[
                MetaTableField(SrcTable.DB_TABLE_FIELD_NAME_SRC_ID, int,
                               'unique id to identify each individual source'),
                MetaTableField(
                    SrcTable.DB_TABLE_FIELD_NAME_SRC_NAME, str,
                    'unique name to identify the source file in the folder "srcVid"'
                ),
                MetaTableField(SrcTable.DB_TABLE_FIELD_NAME_RES, str,
                               'video frame resolution in px'),
                MetaTableField(
                    SrcTable.DB_TABLE_FIELD_NAME_FPS, int,
                    'number of frames to encode the video with (unit: frame/s)'
                ),
            ])
コード例 #14
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        return MetaTable(
            TelchemyManipulatorMarkovPNamsPNBams4StateResource.DB_TABLE_NAME,
            header_doc=
            """In this csv file you are able to specify different P.NAMS/P.NBAMS 4-state markov models for
the telchemy tool in order to manipulate packets with it.""",
            fields=[
                MetaTableField(
                    TelchemyManipulatorMarkovPNamsPNBams4StateResource.
                    DB_FIELD_NAME_ID, int,
                    'unique id to identify the model in the table'),
                MetaTableField(
                    TelchemyManipulatorMarkovPNamsPNBams4StateResource.
                    DB_FIELD_NAME_LOSS_RATIO, float,
                    'Target average loss probability in %'),
                MetaTableField(
                    TelchemyManipulatorMarkovPNamsPNBams4StateResource.
                    DB_FIELD_NAME_GAP_RATIO, float,
                    'Percentage of time in which the process resides in the gap state (in %)'
                )
            ])
コード例 #15
0
    def get_meta_description():
        from metaConfig.metaTable import MetaTable
        from metaConfig.metaTableField import MetaTableField

        config = MetaTable(
            TrafficControlManipulatorResource.DB_TABLE_NAME,
            header_doc="""In this file you are able to configure the traffic control manipulator tool for
online manipulation.""",
            fields=[
                MetaTableField(
                    TrafficControlManipulatorResource.DB_ID_FIELD_NAME,
                    int,
                    'unique id to identify the control data set'
                ),
                MetaTableField(
                    TrafficControlManipulatorResource.DB_DELAY_FIELD_NAME,
                    float,
                    'delay in ms which may occur on the packet transmission'
                ),
                MetaTableField(
                    TrafficControlManipulatorResource.DB_JITTER_FIELD_NAME,
                    float,
                    'jitter in ms in which the delay may vary'
                ),
                MetaTableField(
                    TrafficControlManipulatorResource.DB_JITTER_DISTRIBUTION_FIELD_NAME,
                    str,
                    'specification of the jitter distribution',
                    TrafficControlManipulatorResource.DB_JITTER_DISTRIBUTION_VALID_VALUES
                ),
                MetaTableField(
                    TrafficControlManipulatorResource.DB_LOSS_MODE_FIELD_NAME,
                    str,
                    """specifies in which mode the packets transmission should be manipulated,
i.e. which model should be applied on""",
                    {
                        TrafficControlManipulatorResource.DB_LOSS_MODE_RANDOM_VALUE:
                            'loss is randomly distributed',
                        TrafficControlManipulatorResource.DB_LOSS_MODE_STATE_VALUE:
                            'loss is distributed via markov model settings',
                        TrafficControlManipulatorResource.DB_LOSS_MODE_GE_VALUE:
                            'loss is distributed via Gilbert-Elliot models'
                    }
                ),
                MetaTableField(
                    TrafficControlManipulatorResource.DB_LOSS_MODE_ID_FIELD_NAME,
                    int,
                    """an arbitrary, but unique, id referencing to a configuration set of the appropriate loss_mode,
the referenced configuration can be set in the tc configuration folders (look up the file according to the mode's
name!)"""
                )
            ]
        )

        config.add_children([
            TrafficControlManipulatorGeModelResource.get_meta_description(),
            TrafficControlManipulatorStateModeResource.get_meta_description(),
            TrafficControlManipulatorRandomModeResource.get_meta_description()
        ])

        return config