Skip to content

Commit 0746339

Browse files
authored
Merge pull request #2 from membraneframework-labs/plug-demuxing-engine-into-client
Plug demuxing engine into HLS Client
2 parents 1f71810 + bf78d23 commit 0746339

File tree

15 files changed

+583
-184
lines changed

15 files changed

+583
-184
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ExHLS
22

3-
[![Hex.pm](https://img.shields.io/hexpm/v/membrane_template_plugin.svg)](https://hex.pm/packages/ex_hls)
3+
[![Hex.pm](https://img.shields.io/hexpm/v/ex_hls.svg)](https://hex.pm/packages/ex_hls)
44
[![API Docs](https://img.shields.io/badge/api-docs-yellow.svg?style=flat)](https://hexdocs.pm/ex_hls)
5-
[![CircleCI](https://circleci.com/gh/membraneframework/membrane_template_plugin.svg?style=svg)](https://circleci.com/gh/membraneframework/ex_hls)
5+
[![CircleCI](https://circleci.com/gh/membraneframework/ex_hls.svg?style=svg)](https://circleci.com/gh/membraneframework/ex_hls)
66

77
This repository contains ExHLS - an Elixir package for handling HLS streams
88

fixture/fileSequence0.m4s

686 KB
Binary file not shown.

fixture/init.mp4

1.34 KB
Binary file not shown.

fixture/output.m3u8

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#EXTM3U
2+
#EXT-X-VERSION:7
3+
#EXT-X-TARGETDURATION:10
4+
#EXT-X-MEDIA-SEQUENCE:0
5+
#EXT-X-PLAYLIST-TYPE:VOD
6+
#EXT-X-MAP:URI="init.mp4"
7+
#EXTINF:10.001628,
8+
fileSequence0.m4s
9+
#EXT-X-ENDLIST

lib/ex_hls.ex

Lines changed: 0 additions & 2 deletions
This file was deleted.

lib/ex_hls/chunk.ex

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
defmodule ExHLS.Chunk do
2+
@moduledoc """
3+
A struct representing a media chunk in the ExHLS demuxing engine.
4+
"""
5+
@enforce_keys [:payload, :pts_ms, :dts_ms, :track_id]
6+
defstruct @enforce_keys ++ [metadata: %{}]
7+
8+
@type t :: %__MODULE__{
9+
payload: binary(),
10+
pts_ms: integer(),
11+
dts_ms: integer(),
12+
track_id: term(),
13+
metadata: map()
14+
}
15+
16+
# timestamps need to be represented in milliseconds
17+
@time_base 1000
18+
19+
@spec time_base() :: integer()
20+
def time_base(), do: @time_base
21+
end

0 commit comments

Comments
 (0)