• Philippe Gorley's avatar
    encoder: support loading per encoder config · 19442e3b
    Philippe Gorley authored
    This allows users to use different configurations than the one provided
    by Jami. File settings overwrite Jami's existing configuration options.
    
    Note that only codec-level options are supported, format-level is not
    implemented.
    
    The following options are ignored, as they are set by going into the
    settings page: width, height, framerate, sample_rate, channels,
    frame_size, parameters (internal option for h264's profile level id).
    
    If a file encoder.json exists in the same folder as dring.yml, it is
    loaded into the encoder's configuration options. The config file is
    separated by codec. Multiple configurations can exist for the same codec
    family (ex: libx264 and h264_vaapi) because each encoder has different
    options. Section name should be the codec implementation's name and not
    the codec's name (h264 won't work, but libx264 will).
    
    Example configuration file:
    {
        "libx264": {
            "crf": 15,
            "preset": "ultrafast"
        },
        "h264_vaapi": {
            "low_power": 1
        },
        "libopus": {
            "application": "voip"
        }
    }
    
    Change-Id: Ia6bb184af382638d4016256b393ac7295408ed82
    Gitlab: #75Reviewed-by: Sébastien Blin's avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
    19442e3b
media_encoder.cpp 26 KB