GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
m3u8.h File Reference
#include <gpac/tools.h>
#include <gpac/list.h>
+ Include dependency graph for m3u8.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  Stream
 
struct  Playlist
 
struct  PlaylistElement
 
struct  Program
 
struct  VariantPlaylist
 
union  PlaylistElement.element
 

Macros

#define M3U8_UNKOWN_MIME_TYPE   "unknown"
 

Enumerations

enum  PlaylistElementType { TYPE_PLAYLIST, TYPE_STREAM, TYPE_UNKNOWN }
 

Functions

GF_Err playlist_element_del (PlaylistElement *)
 
Programprogram_new (int programId)
 
GF_Err program_del (Program *program)
 
PlaylistElementplaylist_element_new (PlaylistElementType elementType, const char *url, const char *title, const char *codecs, int durationInfo, u64 byteRangeStart, u64 byteRangeEnd)
 
VariantPlaylistvariant_playlist_new ()
 
GF_Err variant_playlist_del (VariantPlaylist *)
 
GF_Err playlist_element_dump (const PlaylistElement *e, int indent)
 
GF_Err variant_playlist_dump (const VariantPlaylist *)
 
Programvariant_playlist_find_matching_program (const VariantPlaylist *, const u32 programId)
 
Programvariant_playlist_get_current_program (const VariantPlaylist *)
 
GF_Err parse_root_playlist (const char *file, VariantPlaylist **playlist, const char *baseURL)
 
GF_Err parse_sub_playlist (const char *file, VariantPlaylist **playlist, const char *baseURL, Program *in_program, PlaylistElement *sub_playlist)
 

Data Structure Documentation

struct Stream

Basic Stream structure

+ Collaboration diagram for Stream:
Data Fields
u8 i
struct Playlist

The playlist contains a list of elements to play

+ Collaboration diagram for Playlist:
Data Fields
int currentMediaSequence
int target_duration
int mediaSequenceMin
int mediaSequenceMax
int computed_duration
char is_ended
GF_List * elements
struct PlaylistElement

The Structure containing the playlist element

+ Collaboration diagram for PlaylistElement:
Data Fields
int durationInfo
u64 byteRangeStart
u64 byteRangeEnd
int bandwidth
int width
int height
char * title
char * codecs
char * url
PlaylistElementType elementType
union PlaylistElement element
struct Program
+ Collaboration diagram for Program:
Data Fields
int programId
GF_List * bitrates
int currentBitrateIndex
int computed_duration
struct VariantPlaylist

The root playlist, can contains several PlaylistElements structures

+ Collaboration diagram for VariantPlaylist:
Data Fields
GF_List * programs
int currentProgram
Bool playlistNeedsRefresh
union PlaylistElement.element
+ Collaboration diagram for PlaylistElement.element:
Data Fields
Playlist playlist
Stream stream

Macro Definition Documentation

#define M3U8_UNKOWN_MIME_TYPE   "unknown"
            GPAC - Multimedia Framework C SDK

                            Authors: Pierre Souchay - Jean Le Feuvre
            Copyright (c) Telecom ParisTech 2010-2012
                            All rights reserved

This file is part of GPAC

GPAC is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

GPAC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. Global Structure

For a stream with multiple bandwidths and multiple programs

VariantPlayList | |_ program id 1 | | | |_ bandwidth X : playlistElement1 | |- bandwidth Y : playlistElement2 | |- program id 2 | |_ bandwidth Z : playlistElement

For a "normal" playlist

VariantPlayList | |_ program id 1 | |_ bandwidth 0 : playlistElement1

Where PlaylistElement can be :

  • a stream (real resource)
  • a playlist (list of PlaylistElements itself)

Enumeration Type Documentation

Enumerator
TYPE_PLAYLIST 
TYPE_STREAM 
TYPE_UNKNOWN 

Function Documentation

GF_Err playlist_element_del ( PlaylistElement )

Creates a new playlist

Returns
NULL if playlist could not be allocated

Playlist * playlist_new(); Deletes a given playlist and all of its sub elements

GF_Err playlist_del(Playlist *); Deletes an Playlist element

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Program* program_new ( int  programId)

Creates a new program properly initialized

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err program_del ( Program program)

Deletes the specified program

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PlaylistElement* playlist_element_new ( PlaylistElementType  elementType,
const char *  url,
const char *  title,
const char *  codecs,
int  durationInfo,
u64  byteRangeStart,
u64  byteRangeEnd 
)

Creates an Playlist element. This element can be either a playlist of a stream according to first parameter.

Returns
NULL if element could not be created. Elements will be deleted recusively

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VariantPlaylist* variant_playlist_new ( )

Creates a new VariantPlaylist

Returns
NULL if VariantPlaylist element could not be allocated

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err variant_playlist_del ( VariantPlaylist )

Deletes the given VariantPlaylist and all of its sub elements

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err playlist_element_dump ( const PlaylistElement e,
int  indent 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err variant_playlist_dump ( const VariantPlaylist )

+ Here is the call graph for this function:

Program* variant_playlist_find_matching_program ( const VariantPlaylist ,
const u32  programId 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Program* variant_playlist_get_current_program ( const VariantPlaylist )

+ Here is the call graph for this function:

GF_Err parse_root_playlist ( const char *  file,
VariantPlaylist **  playlist,
const char *  baseURL 
)

Parse the given playlist file

Parameters
fileThe file from cache to parse
playlistThe playlist to fill. If argument is null, and file is valid, playlist will be allocated
baseURLThe base URL of the playlist
Returns
GF_OK if playlist valid

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err parse_sub_playlist ( const char *  file,
VariantPlaylist **  playlist,
const char *  baseURL,
Program in_program,
PlaylistElement sub_playlist 
)

Parse the given playlist file as a subplaylist of an existing playlist

Parameters
fileThe file from cache to parse
playlistThe playlist to fill.
baseURLbase URL of the playlist
in_programin which the playlist is parsed
sub_playlistexisting subplaylist element in the playlist in which the playlist is parsed
Returns
GF_OK if playlist valid

+ Here is the call graph for this function:

+ Here is the caller graph for this function: