play_tree_t* parse_playtree(stream_t *stream, int forced) { play_tree_parser_t* p; play_tree_t* ret; #ifdef MP_DEBUG assert(stream != NULL); #endif p = play_tree_parser_new(stream,0); if(!p) return NULL; ret = play_tree_parser_get_play_tree(p, forced); play_tree_parser_free(p); return ret; }
static play_tree_t* embedded_playlist_parse(char *line) { int f=DEMUXER_TYPE_PLAYLIST; stream_t* stream; play_tree_parser_t* ptp; play_tree_t* entry; // Get stream opened to link stream=open_stream(line,0,&f); if(!stream) { mp_msg(MSGT_PLAYTREE,MSGL_WARN,"Can't open playlist %s\n",line); return NULL; } //add new playtree mp_msg(MSGT_PLAYTREE,MSGL_V,"Adding playlist %s to element entryref\n",line); ptp = play_tree_parser_new(stream,1); entry = play_tree_parser_get_play_tree(ptp, 1); play_tree_parser_free(ptp); free_stream(stream); return entry; }
static play_tree_t* asx_parse_entryref(ASX_Parser_t* parser,char* buffer,char** _attribs) { play_tree_t* pt; char *href; stream_t* stream; play_tree_parser_t* ptp; int f=DEMUXER_TYPE_UNKNOWN; if(parser->deep > 0) return NULL; href = asx_get_attrib("HREF",_attribs); if(href == NULL) { asx_warning_attrib_required(parser,"ENTRYREF" ,"HREF" ); return NULL; } stream=open_stream(href,0,&f); if(!stream) { mp_msg(MSGT_PLAYTREE,MSGL_WARN,"Can't open playlist %s\n",href); free(href); return NULL; } mp_msg(MSGT_PLAYTREE,MSGL_V,"Adding playlist %s to element entryref\n",href); ptp = play_tree_parser_new(stream,parser->deep+1); pt = play_tree_parser_get_play_tree(ptp, 1); play_tree_parser_free(ptp); free_stream(stream); free(href); //mp_msg(MSGT_PLAYTREE,MSGL_INFO,"Need to implement entryref\n"); return pt; }