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.c File Reference
#include <gpac/internal/m3u8.h>
#include <string.h>
#include <stdio.h>
#include <gpac/network.h>
+ Include dependency graph for m3u8.c:

Data Structures

struct  s_accumulated_attributes
 

Macros

#define _GNU_SOURCE
 
#define MYLOG(xx)
 
#define M3U8_BUF_SIZE   2048
 

Functions

GF_Err cleanup_list_of_elements (GF_List *list)
 
GF_Err playlist_element_del (PlaylistElement *e)
 
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 *playlist)
 
GF_Err playlist_element_dump (const PlaylistElement *e, int indent)
 
GF_Err variant_playlist_dump (const VariantPlaylist *pl)
 
Programvariant_playlist_find_matching_program (const VariantPlaylist *pl, const u32 programId)
 
Programvariant_playlist_get_current_program (const VariantPlaylist *pl)
 
static Bool safe_start_equals (const char *attribute, const char *line)
 
static char ** extractAttributes (const char *name, const char *line, const int numberOfAttributes)
 
static char ** parseAttributes (const char *line, s_accumulated_attributes *attributes)
 
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 s_accumulated_attributes
+ Collaboration diagram for s_accumulated_attributes:
Data Fields
char * title
int durationInSeconds
int bandwidth
int width
int height
int programId
char * codecs
int targetDurationInSeconds
int minMediaSequence
int currentMediaSequence
Bool isVariantPlaylist
Bool isPlaylistEnded
u64 byteRangeStart
u64 byteRangeEnd

Macro Definition Documentation

#define _GNU_SOURCE
            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.

#define MYLOG (   xx)
#define M3U8_BUF_SIZE   2048

Function Documentation

GF_Err cleanup_list_of_elements ( GF_List *  list)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 pl)

+ Here is the call graph for this function:

Program* variant_playlist_find_matching_program ( const VariantPlaylist pl,
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 pl)

+ Here is the call graph for this function:

static Bool safe_start_equals ( const char *  attribute,
const char *  line 
)
static

+ Here is the caller graph for this function:

static char** extractAttributes ( const char *  name,
const char *  line,
const int  numberOfAttributes 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char** parseAttributes ( const char *  line,
s_accumulated_attributes attributes 
)
static

Parses the attributes and accumulate into the attributes structure

+ Here is the call graph for this function:

+ Here is the caller 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: