kurento 自定义GStreamer filter的深度开发

kurento 的模块开发官网有介绍,只是内容比较基本. 真正有价值的参考全部来自于其源码.

  • 创建filter

  • 编译,生成 js 包.
    cmake ~/source/ar-marker/ -DGENERATE_JS_CLIENT_PROJECT:BOOL=TRUE

  • 如何给filter 增加 构造函数参数,方法
    修改 src/server/interface/armarker.arMarker.kmd.json 文件.

{
    "remoteClasses": [
    {
        "name": "arMarker",
        "extends": "Filter",
        "doc": "arMarker interface. Documentation about the module",
        "constructor": {
            "doc": "Create an element",
            "params": [
            {
                "name": "mediaPipeline",
                "doc": "the parent :rom:cls:`MediaPipeline`",
                "type": "MediaPipeline",
                "final": true
            },
            {
                "name": "enableArrow",
                "doc": "enable 3D arrow in place",
                "type": "boolean",
                "optional": true,
                "defaultValue": true
            }
            ]
        },
        "methods": [
        {   
            "name": "setFilterInfo",
            "doc": "Configures Info of filter.",
            "params": [
            {   
                "name": "filterInfo",
                "doc": "Value of filter info.",
                "type": "String"
            }   
            ]   
        }
        ]
    }
    ]
}

然后,在媒体服务器这边就是纯粹的GStreamer开发了,如g_object_set, _set_property, _get_property, 而信令服务器or浏览器应用的开发就直接拿前面生成的包开发, 更多细节就不讲了, 清者自清.

你可能感兴趣的:(kurento 自定义GStreamer filter的深度开发)