Beispiel #1
0
GF_Err playlist_element_dump(const PlaylistElement * e, int indent) {
	int i;
	GF_Err r = GF_OK;
	for (i = 0 ; i < indent; i++)
		GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, (" ") );
	if (e == NULL) {
		GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] NULL PlaylistElement\n"));
		return r;
	}
	GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] PlayListElement[%p, title=%s, codecs=%s, duration=%d, bandwidth=%d, url=%s, type=%s]\n",
		(void*)e,
		e->title,
		e->codecs,
		e->durationInfo,
		e->bandwidth,
		e->url,
		e->elementType == TYPE_STREAM ? "stream" : "playlist"));
	if (TYPE_PLAYLIST == e->elementType) {
		int sz;
		assert( e->element.playlist.elements);
		sz = gf_list_count(e->element.playlist.elements);
		indent+=2;
		for (i = 0 ; i < sz ; i++) {
			PlaylistElement * el = gf_list_get(e->element.playlist.elements, i);
			assert( el);
			r|= playlist_element_dump( el, indent);
		}
	}
	return r;
}
Beispiel #2
0
GF_Err variant_playlist_dump(const VariantPlaylist * pl) {
	int i, count;
	GF_Err e = GF_OK;
	if (pl == NULL) {
		GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] VariantPlaylist = NULL\n"));
		return e;
	}
	GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] VariantPlaylist = {\n"));
	assert( pl->programs);
	count = gf_list_count( pl->programs);
	for (i = 0 ; i < count ; i++) {
		int j, countj;
		Program * p = gf_list_get(pl->programs, i);
		assert( p );
		GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] program[programId=%d]{\n",  p->programId));
		assert( p->bitrates );
		countj = gf_list_count(p->bitrates);
		for (j = 0; j < countj; j++) {
			PlaylistElement * el = gf_list_get(p->bitrates, j);
			assert(el);
			e |= playlist_element_dump( el, 4);
		}
		GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8] }\n"));
	}
	GF_LOG(GF_LOG_DEBUG, GF_LOG_DASH, ("[M3U8]}\n"));
	return e;
}
Beispiel #3
0
GF_Err variant_playlist_dump(const VariantPlaylist * pl) {
	int i, count;
	GF_Err e = GF_OK;
	if (pl == NULL) {
		printf("VariantPlaylist = NULL\n");
		return e;
	}
	printf("VariantPlaylist = {\n");
	assert( pl->programs);
	count = gf_list_count( pl->programs);
	for (i = 0 ; i < count ; i++) {
		int j, countj;
		Program * p = gf_list_get(pl->programs, i);
		assert( p );
		printf("  program[programId=%d]{\n",  p->programId);
		assert( p->bitrates );
		countj = gf_list_count(p->bitrates);
		for (j = 0; j < countj; j++) {
			PlaylistElement * el = gf_list_get(p->bitrates, j);
			assert(el);
			e |= playlist_element_dump( el, 4);
		}
		printf("  }\n");
	}
	printf("}\n");
	return e;
}