首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > 多媒体 >

欢迎测评开源编码器gstreamill

2014-01-12 
欢迎评测开源编码器gstreamillhttp://github.com/zhangping/gstreamill[解决办法]缩进用4个空格....while

欢迎评测开源编码器gstreamill

http://github.com/zhangping/gstreamill
[解决办法]
缩进用4个空格....

        while (bins != NULL) {
                bin = bins->data;
                if (bin->previous == NULL) {
                        /* add element to pipeline */
                        elements = bin->elements;
                        while (elements != NULL) {
                                element = elements->data;
                                gst_bin_add (GST_BIN (pipeline), element);
                                elements = g_slist_next (elements);
                        }

                        /* links element */
                        links = bin->links;
                        while (links != NULL) {
                                link = links->data;
                                GST_INFO ("link %s -> %s", link->src_name, link->sink_name);
                                if (link->caps != NULL) {
                                        caps = gst_caps_from_string (link->caps);
                                        gst_element_link_filtered (link->src, link->sink, caps);
                                        gst_caps_unref (caps);
                                } else {
                                        gst_element_link (link->src, link->sink);
                                }
                                links = g_slist_next (links);



------解决方案--------------------


刚贴错代码了 这代码嵌套有点深啊

        while (l1 != NULL) {
                bin = l1->data;
                l2 = bin->links;
                while (l2 != NULL) {
                        link = l2->data;
                        if (link->sink == NULL) {
                                GST_INFO ("Request element link: %s -> %s", link->src_name, link->sink_name);
                                l3 = bins;
                                while (l3 != NULL) {
                                        bin2 = l3->data;
                                        l4 = bin2->elements;
                                        while (l4 != NULL) {
                                                element = l4->data;
                                                l4 = g_slist_next (l4);
                                                if (g_strcmp0 (link->sink_name, gst_element_get_name (element)) == 0) {
                                                        /* request sink element found, e.g mpeg2mux */
                                                        link->sink = element;
                                                }

热点排行