Lines Matching defs:playlist

58  * An apple http stream consists of a playlist with media segment files,
62 * the user supplied the url to a main playlist that only lists the variant
65 * If the main playlist doesn't point at any variants, we still create
96 * Each playlist has its own demuxer. If it currently is active,
100 struct playlist {
114 /* main demuxer streams associated with this playlist
163 /* Renditions associated with this playlist, if any.
166 * multiple (playlist-less) renditions associated with them. */
171 * playlist, if any. */
178 * The rendition may either be an external playlist or it may be
180 * playlist is NULL).
184 struct playlist *playlist;
196 struct playlist **playlists;
209 struct playlist **playlists;
242 static void free_segment_list(struct playlist *pls)
249 static void free_init_section_list(struct playlist *pls)
265 struct playlist *pls = c->playlists[i];
311 static struct playlist *new_playlist(HLSContext *c, const char *url,
314 struct playlist *pls = av_mallocz(sizeof(struct playlist));
349 struct playlist *pls;
415 static struct segment *new_init_section(struct playlist *pls,
532 /* add the playlist if this is an external rendition */
534 rend->playlist = new_playlist(c, info->uri, url_base);
535 if (rend->playlist)
536 dynarray_add(&rend->playlist->renditions,
537 &rend->playlist->n_renditions, rend);
605 /* used by parse_playlist to allocate a new variant+playlist when the
606 * playlist is detected to be a Media Playlist (not Master Playlist)
608 * allocated the variant and playlist already)
610 * *pls != NULL => parented Media Playlist, playlist+variant allocated */
611 static int ensure_playlist(HLSContext *c, struct playlist **pls, const char *url)
727 struct playlist *pls, AVIOContext *in)
757 "keepalive request failed for '%s' with error: '%s' when parsing playlist\n",
1042 static struct segment *current_segment(struct playlist *pls)
1050 static struct segment *next_segment(struct playlist *pls)
1058 static int read_from_url(struct playlist *pls, struct segment *seg,
1104 static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
1133 static void handle_id3(AVIOContext *pb, struct playlist *pls)
1175 static void intercept_id3(struct playlist *pls, uint8_t *buf,
1275 static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg, AVIOContext **in)
1291 av_log(pls->parent, AV_LOG_VERBOSE, "HLS request for url '%s', offset %"PRId64", playlist %d\n",
1358 static int update_init_section(struct playlist *pls, struct segment *seg)
1377 "Failed to open an initialization section in playlist %d\n",
1415 static int64_t default_reload_interval(struct playlist *pls)
1422 static int playlist_needed(struct playlist *pls)
1429 /* If there is no context or streams yet, the playlist is needed */
1433 /* check if any of the streams in the playlist are needed */
1441 /* If all streams in the playlist were discarded, the playlist is not
1446 /* Otherwise, check if all the programs (variants) this playlist is in are
1447 * discarded. Since all streams in the playlist are part of the same programs
1457 /* playlist is in an undiscarded program */
1470 struct playlist *v = opaque;
1484 /* Check that the playlist is still needed before opening a new
1489 av_log(v->parent, AV_LOG_INFO, "No longer receiving playlist %d ('%s')\n",
1495 * the last playlist reload, reload the playlists now. */
1506 av_log(v->parent, AV_LOG_WARNING, "Failed to reload playlist %d\n",
1510 /* If we need to reload the playlist again below (if
1563 av_log(v->parent, AV_LOG_WARNING, "Failed to open segment %"PRId64" of playlist %d\n",
1588 av_log(v->parent, AV_LOG_WARNING, "Failed to open segment %"PRId64" of playlist %d\n",
1638 if (rend->playlist)
1639 /* rendition is an external playlist
1640 * => add the playlist to the variant */
1641 dynarray_add(&var->playlists, &var->n_playlists, rend->playlist);
1652 static void add_metadata_from_renditions(AVFormatContext *s, struct playlist *pls,
1684 static int find_timestamp_in_playlist(HLSContext *c, struct playlist *pls,
1714 static int64_t select_cur_seq_no(HLSContext *c, struct playlist *pls)
1720 /* reload the playlist since it was suspended */
1724 * playlist) and this is a complete file, find the matching segment
1750 /* If #EXT-X-START in playlist, need to recalculate */
1761 * the duration of the playlist, it indicates either the end of the
1762 * playlist (if positive) or the beginning of the playlist (if
1793 "A HLS playlist item '%s' referred to an external file '%s'. "
1799 static void add_stream_to_programs(AVFormatContext *s, struct playlist *pls, AVStream *stream)
1825 static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, AVStream *ist)
1858 static int update_streams_from_subdemuxer(AVFormatContext *s, struct playlist *pls)
1890 struct playlist *pls = c->playlists[i];
1946 av_log(s, AV_LOG_WARNING, "Empty playlist\n");
1949 /* If the playlist only contained playlists (Master Playlist),
1950 * parse each individual playlist. */
1953 struct playlist *pls = c->playlists[i];
2006 struct playlist *pls = c->playlists[i];
2015 /* Open the demuxer for each playlist */
2017 struct playlist *pls = c->playlists[i];
2034 * If this is a live stream and this playlist looks like it is one segment
2177 /* Create new AVStreams for each stream in this playlist */
2183 * Copy any metadata from playlist to main streams, but do not set
2207 struct playlist *pls = c->playlists[i];
2225 av_log(s, AV_LOG_INFO, "Now receiving playlist %d, segment %"PRId64"\n", i, pls->cur_seq_no);
2233 av_log(s, AV_LOG_INFO, "No longer receiving playlist %d\n", i);
2239 static void fill_timing_for_id3_timestamped_stream(struct playlist *pls)
2264 static AVRational get_timebase(struct playlist *pls)
2272 static int compare_ts_with_wrapdetect(int64_t ts_a, struct playlist *pls_a,
2273 int64_t ts_b, struct playlist *pls_b)
2290 struct playlist *pls = c->playlists[i];
2291 /* Make sure we've got one buffered packet from each open playlist
2350 struct playlist *minpls = minplaylist < 0 ?
2367 struct playlist *pls = c->playlists[minplaylist];
2430 struct playlist *seek_pls = NULL;
2452 /* find the playlist with the specified stream */
2454 struct playlist *pls = c->playlists[i];
2463 /* check if the timestamp is valid for the playlist with the
2481 struct playlist *pls = c->playlists[i];
2502 /* seek the playlist to the given position without taking
2503 * keyframes into account since this playlist does not have the
2534 {"prefer_x_start", "prefer to use #EXT-X-START if it's in playlist instead of live_start_index",