int BlsChild::processCommand(MString &line)
{
    if (line.empty()) return E_SUCCESS;

    if (line.endWith("\n")) {
        line.erase(line.size()-1, 1);
    }
    log_trace("BlsMasterChannel get line %s", line.c_str());

    MStringList temp = line.split(Internal_CMD_Delimer);
    MString key = temp.at(0);
    MString value = temp.at(1);

    if (key == Internal_CMD_PID) {
        m_pid = value.toInt();
        gs_childs[m_pid] = this;
    } else if (key == Internal_CMD_InternalPort) {
        m_internalPort = value.toInt();
    } else if (key == Internal_CMD_WhoHasBackSource) {
        MRtmpUrl rtmpUrl(value);
        MString url = rtmpUrl.url();

        int port = 0;
        if (gs_sources.contains(url)) {
            port = gs_sources[url]->internalPort();
        }

        if (sendLine(Internal_CMD_WhoHasBackSourceRes, MString::number(port)) != E_SUCCESS) {
            return -1;
        }

        log_trace("--%s:%d", url.c_str(), port);

        if (port == 0) {
            gs_sources[url] = this;
        }
    } else if (key == Internal_CMD_IHasBackSourced) {
        log_warn("%s insert into backsource queue", value.c_str());
        gs_sources[value] = this;
    } else if (key == Internal_CMD_RemoveHasBackSourceRes) {
        log_warn("%s removed from backsource queue", value.c_str());
        gs_sources.erase(value);
    }

    return E_SUCCESS;
}