Esempio n. 1
0
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: postr(); break;
        case 1: vod(); break;
        case 2: exit(); break;
        case 3: inform(); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
Esempio n. 2
0
// VodWnd 消息处理程序
afx_msg LRESULT VodWnd::OnXmppNotify(WPARAM wParam, LPARAM lParam)
{
    XmppData *data = (XmppData*)lParam;
    if (!strcmp(data->cmd.c_str(), "test.fc.add_sink")) {
        if (!strcmp(data->result.c_str(), "ok")) {
            KVS param = util_parse_options(data->result_options.c_str());
            char info[128];
            assert(chk_params(param, info, "sinkid", "server_ip", "server_rtcp_port", "server_rtp_port", 0));

            sinkid_ = atoi(param["sinkid"].c_str());

            snprintf(info, sizeof(info), "VOD: id=%d, server_ip=%s, rtp_port=%d, rtcp_port=%d", sid_, param["server_ip"].c_str(),
                     atoi(param["server_rtp_port"].c_str()), atoi(param["server_rtcp_port"].c_str()));
            SetWindowText(info);
            vod(param["server_ip"].c_str(), atoi(param["server_rtp_port"].c_str()), atoi(param["server_rtcp_port"].c_str()));
        }
    }
    delete data;
    return 0;
}