コード例 #1
0
ファイル: rtp_session.c プロジェクト: golgol7777/gpac
/*locate session by control*/
RTSPSession *RP_CheckSession(RTPClient *rtp, char *control)
{
	u32 i;
	RTSPSession *sess;
	if (!control) return NULL;

	if (!strcmp(control, "*")) control = (char *) gf_term_get_service_url(rtp->service);

	i=0;
	while ( (sess = (RTSPSession *)gf_list_enum(rtp->sessions, &i)) ) {
		if (gf_rtsp_is_my_session(sess->session, control)) return sess;
	}
	return NULL;
}
コード例 #2
0
ファイル: read.c プロジェクト: supperlitt/gpac
static Bool ISOR_CanHandleURLInService(GF_InputService *plug, const char *url)
{
    char szURL[2048], *sep;
    ISOMReader *read = (ISOMReader *)plug->priv;
    const char *this_url = gf_term_get_service_url(read->service);
    if (!this_url || !url) return 0;

    if (!strcmp(this_url, url)) return 1;

    strcpy(szURL, this_url);
    sep = strrchr(szURL, '#');
    if (sep) sep[0] = 0;

    /*direct addressing in service*/
    if (url[0] == '#') return 1;
    if (strnicmp(szURL, url, sizeof(char)*strlen(szURL))) return 0;
    return 1;
}
コード例 #3
0
ファイル: ffmpeg_demux.c プロジェクト: OpenHEVC/gpac
static Bool FFD_CanHandleURLInService(GF_InputService *plug, const char *url)
{
	char szURL[2048], *sep;
	FFDemux *ffd;
	const char *this_url;
	if (!plug || !url)
		return GF_FALSE;
	ffd = (FFDemux *)plug->priv;
	this_url = gf_term_get_service_url(ffd->service);
	if (!this_url)
		return GF_FALSE;

	strcpy(szURL, this_url);
	sep = strrchr(szURL, '#');
	if (sep) sep[0] = 0;

	if ((url[0] != '#') && strnicmp(szURL, url, sizeof(char)*strlen(szURL))) return 0;
	sep = strrchr(url, '#');
	if (sep && !stricmp(sep, "#video") && (ffd->video_st>=0)) return 1;
	if (sep && !stricmp(sep, "#audio") && (ffd->audio_st>=0)) return 1;
	return GF_FALSE;
}