Skip to content

Commit

Permalink
Merge branch 'master' into feature/bugfix-winsize-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
hori-ryota committed Jul 4, 2016
2 parents 4bd1012 + 7a7520b commit fdfe4d4
Show file tree
Hide file tree
Showing 16 changed files with 681 additions and 244 deletions.
6 changes: 4 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
There are many persons contribute their code include small patches
There are many persons contribute their code (include small patches)
to the project. They listed below in an alphabetical order:

- Alexander (Axel) I.Grafov <grafov@gmail.com>
Expand All @@ -7,12 +7,14 @@ to the project. They listed below in an alphabetical order:
- Bradley Falzon <brad@teambrad.net>
- Denys Smirnov <denis.smirnov.91@gmail.com>
- Fabrizio (Misto) Milo <mistobaan@gmail.com>
- Hori Ryota <hori.ryota@gmail.com>
- Jamie Stackhouse <jamie.stackhouse@redspace.com>
- Julian Cooper <jcooper@brightcove.com>
- Kz26
- Makombo
- Scott Kidder <skidder@brightcove.com>
- Vishal Kumar Tuniki <vishal24.tuniki@gmail.com>
- Zac Shenker <zshenker@brightcove.com>

If you want to be added to this list (or removed for any reason)
just open issue about it.
just open an issue about it.
6 changes: 3 additions & 3 deletions M3U8.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This doc explaines M3U8 tag occurence in different versions
of HLS protocol and their status in Go library.
Copyleft 2013-2015 Alexander I.Grafov aka Axel <grafov@gmail.com>
Copyleft 2013-2016 library authors (see AUTHORS file in the package)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -27,7 +27,7 @@ M3U8 tags cheatsheet
====================

The table above describes tags of M3U8, their occurence in playlists of different types and their support status
in the go-library. Current stable version of the library is 0.2.
in the go-library.

Legend for playlist types:

Expand Down Expand Up @@ -104,4 +104,4 @@ http://tools.ietf.org/html/draft-pantos-http-live-streaming
* Version 4 of the HLS protocol described in draft07-draft08.
* Version 5 of the HLS protocol described in draft09-draft11.
* Version 6 of the HLS protocol described in draft12-draft13.
* Version 7 of the HLS protocol described in draft14-draft17.
* Version 7 of the HLS protocol described in draft14-draft19.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ Parse playlist:
if err != nil {
panic(err)
}
p, listType, err := DecodeFrom(bufio.NewReader(f), true)
p, listType, err := m3u8.DecodeFrom(bufio.NewReader(f), true)
if err != nil {
panic(err)
}
switch listType {
case MEDIA:
mediapl := p.(*MediaPlaylist)
case m3u8.MEDIA:
mediapl := p.(*m3u8.MediaPlaylist)
fmt.Printf("%+v\n", mediapl)
case MASTER:
masterpl := p.(*MasterPlaylist)
case m3u8.MASTER:
masterpl := p.(*m3u8.MasterPlaylist)
fmt.Printf("%+v\n", masterpl)
}
```
Expand All @@ -65,7 +65,7 @@ See ``structure.go`` or full documentation (link below).
You may use API methods to fill structures or create them manually to generate playlists. Example of media playlist generation:

```go
p, e := NewMediaPlaylist(3, 10) // with window of size 3 and capacity 10
p, e := m3u8.NewMediaPlaylist(3, 10) // with window of size 3 and capacity 10
if e != nil {
panic(fmt.Sprintf("Creating of media playlist failed: %s", e))
}
Expand Down Expand Up @@ -99,12 +99,13 @@ Related links
Library usage
-------------

This library successfully used in streaming software developed for my employer and tested with
generating of VOD and Live streams and parsing of Widevine Live streams. Also library usage noted
in opensource software:
This library was successfully used in streaming software developed for company where I worked several
years ago. It was tested then in generating of VOD and Live streams and parsing of Widevine Live streams.
Also the library used in opensource software so you may look at these apps for usage examples:

* [Stream Surfer](http://streamsurfer.org) monitoring software.
* [gohls](https://github.com/kz26/gohls) — HLS downloader.
* [HLS downloader](https://github.com/kz26/gohls)
* [Another HLS downloader](https://github.com/Makombo/hlsdownloader)
* [HLS utils](https://github.com/archsh/hls-utils)

M3U8 parsing/generation in other languages
------------------------------------------
Expand All @@ -116,30 +117,30 @@ M3U8 parsing/generation in other languages
* http://sourceforge.net/projects/m3u8parser/ in Java
* https://github.com/karlll/erlm3u8 in Erlang

Project status [![Is maintained?](http://stillmaintained.com/grafov/m3u8.png)](http://stillmaintained.com/grafov/m3u8)
---------------
Project status [![Go Report Card](https://goreportcard.com/badge/grafov/m3u8)](https://goreportcard.com/report/grafov/m3u8)
--------------

In development.
[![Build Status](https://travis-ci.org/grafov/m3u8.png?branch=master)](https://travis-ci.org/grafov/m3u8) [![Build Status](https://drone.io/github.com/grafov/m3u8/status.png)](https://drone.io/github.com/grafov/m3u8/latest)

[![Build Status](https://travis-ci.org/grafov/m3u8.png?branch=master)](https://travis-ci.org/grafov/m3u8) for last commit from `master` or `draft` branches.
Project maintainers:

[![Build Status](https://drone.io/github.com/grafov/m3u8/status.png)](https://drone.io/github.com/grafov/m3u8/latest) for `master` branch.
* Bradley Falzon @bradleyfalzon
* Alexander Grafov @grafov

Development rules:

* Feature changes first applied to `draft` branch then after minimal testing it will merge with `master` branch.
* Bugfixes or minor doc changes applied to `master` branch and then merged to `draft`.
* Code in `draft` branch may be in an inconsistent state.
* After complete testing and one week usage with my prober for HLS [Stream Surfer](http://streamsurfer.org) it may be released as new library version.
* Each new API call or M3U8 tag accompanied by at least with one unit test till new release (this rule will be apply after v1.0).
* Versioning scheme follows http://semver.org rules (but versions till v1.0 not support bacward compatibility, see release notes carefully).

Project dashboard: https://waffle.io/grafov/m3u8 [![Stories in Ready](https://badge.waffle.io/grafov/m3u8.png?label=ready&title=Ready)](https://waffle.io/grafov/m3u8)

State of code coverage: https://gocover.io/github.com/grafov/m3u8

Roadmap
-------

To version 1.0:

* Support all M3U8 tags up to latest version of specs.
* Code coverage by unit tests more than 90%
* Code coverage by unit tests up to 90%
42 changes: 0 additions & 42 deletions TODO.org

This file was deleted.

2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Next example shows parsing of master playlist:
fmt.Println(err)
}
p := NewMasterPlaylist()
err = p.Decode(bufio.NewReader(f), false)
err = p.DecodeFrom(bufio.NewReader(f), false)
if err != nil {
fmt.Println(err)
}
Expand Down
33 changes: 33 additions & 0 deletions example/example.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package main

import (
"bufio"
"fmt"
"os"

"github.com/grafov/m3u8"
)

func main() {
GOPATH := os.Getenv("GOPATH")
if GOPATH == "" {
panic("$GOPATH is empty")
}
this := "github.com/grafov/m3u8"
f, err := os.Open(GOPATH + "/src/" + this + "/sample-playlists/media-playlist-with-byterange.m3u8")
if err != nil {
panic(err)
}
p, listType, err := m3u8.DecodeFrom(bufio.NewReader(f), true)
if err != nil {
panic(err)
}
switch listType {
case m3u8.MEDIA:
mediapl := p.(*m3u8.MediaPlaylist)
fmt.Printf("%+v\n", mediapl)
case m3u8.MASTER:
masterpl := p.(*m3u8.MasterPlaylist)
fmt.Printf("%+v\n", masterpl)
}
}
Loading

0 comments on commit fdfe4d4

Please sign in to comment.