+48 22 5128 100  
info@il-pib.pl

Szachowa 1,
04-894 Warszawa

|
Webmaster

loga

QTSamplePlayer – DASH player from bitmovin with HTTP 2.0 extension and Server Push handling

This application is designated to test Server Push mechanism, provided by HTTP 2.0 protocol, in DASH-based media streaming. This is an extension of open-source SPDY-based QTSamplePlayer provided by bitmovin.

Our version of QTSamplePlayer is compliant with IETF HTTP 2.0 Draft v13. It utilizes nghttp2 v0.5.1 library.

Handling of HTTP 2.0 connections is implemented in HTTP2Connection class (libdash/qtsampleplayer/libdashframework/Input/). In this class, callback function Http2OnDataChunkRecvCallback() is called whenever data pushed by a server are received. Next, function Http2OnDataChunkRecvCallback() calls AdaptationAlert() function provided by the DASHReceiver module (libdash/qtsampleplayer/libdashframework/Input/); AdaptationAlert() interrupts the current segment downloading process – you should put here an appropriate mechanism for handling pushed messages (for demonstration purposes we simple change content server and/or media representation according to data received from the server).

zip_ico SOURCE CODE

How to build

The player was tested on Ubuntu 14.04

Prerequisite: nghttp2 must be built as described in the nghttp2 build instructions.

  1. Unzip libdashhttp2 folder
  2. Go to libdashhttp2/libdash
  3. Build libdash library according to instructions provided on libdash page:
    1. sudo apt-get install git-core build-essential cmake libxml2-dev libcurl4-openssl-dev
    2. mkdir build
    3. cd build
    4. cmake ../
    5. make
  4. Go to libdashhttp2/libdash/qtsampleplayer
  5. Build QTSamplePlayer according to instructions provided on libdash page:
    1. sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
    2. sudo apt-add-repository ppa:canonical-qt5-edgers/qt5-proper
    3. sudo apt-get update
    4. sudo apt-get install qtmultimedia5-dev qtbase5-dev libqt5widgets5 libqt5core5 libqt5gui5 libqt5multimedia5 libqt5multimediawidgets5 libqt5opengl5 libav-tools libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev
    5. mkdir build
    6. cd build
    7. cmake ../
    8. make

To run the player:

./qtsampleplayer

Note

Current version of our HTTP 2.0 extension for QTSamplePlayer works with HTTP 2.0 servers only - it skipped the HTTP Upgrade mechanism required for switching connection from HTTP 1.1 to HTTP 2.0. Moreover, it communicates using “http” URI scheme only (not “https”).

Licence

This extension of the QTSamplePlayer is open source available and licensed under LGPL:

“This library 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.1 of the License, or (at your option) any later version. This library 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; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA“

Contact person

Piotr Krawiec, PhD: Ten adres pocztowy jest chroniony przed spamowaniem. Aby go zobaczyć, konieczne jest włączenie w przeglądarce obsługi JavaScript.

National Institute of Telecommunications, Warsaw, Poland

 

HTTP 2.0 Content Server

The HTTP 2.0 Content Server (CS) application is designed to test Server Push mechanism, provided by HTTP 2.0 protocol. It is an extension of the open-source HTTP 2.0 nghttpd server provided within nghttp2 version v0.5.1 library, which is compliant with IETF HTTP 2.0 Draft v13.

We introduced new AlertModule, which contains JSON-RPC server for receiving congestion alerts from an external module:

HTTP2.0 DASH Client ------ content requests ----> HTTP2.0 Content Server <------ alert message ----- JSON-RPC client

The havePushData() method of the AlertModule is called by the main thread of Content Server whenever a new request for media segment arrives (which means opening a new stream). This method checks if a congestion alert from the external module exists and, in positive case, it returns a path to the file which should be pushed to the client. When the response of the havePushData() is positive, the server triggers Push procedure and, at the same time, cancels the stream related with media segment request.

An external module sends to Content Server message (string) about congestion alert, jointly with an integer, which indicates validity time of this congestion alert (in seconds).

zip_ico SOURCE CODE

 

How to build

The server was tested on Ubuntu 14.04

Prerequisite: libjson-rpc-cpp must be built as described in the libjson-rpc-cpp build instructions.

sudo apt-get install libcurl4-openssl-dev cmake

cd libjason-rpc_directory/build

cmake ../

make

sudo make install

sudo ldconfig

If you don’t have installed nghttp2 library yet, unzip provided http2cs sources and next build Content Server as described in the nghttp2 build instructions:

  1. Install Spydlay library according to instructions
    1. sudo apt-get install autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libevent-dev
    2. autoreconf -i
    3. automake
    4. autoconf
    5. ./configure
    6. make

    To build documentation:

    1. sudo apt-get install python-sphinx
    2. make html

    To install:

    1. sudo make install
    2. sudo ldconfig
  1. Go to nghttp2cs directory and install nghttp2 library:
    1. sudo apt-get install libjansson-dev libjemalloc-dev cython python3.4-dev
    2. autoreconf -i
    3. automake
    4. autoconf
    5. ./configure PYTHON=/usr/bin/python3.4
    6. make
    7. make html

    To install:

    1. sudo make install
    2. sudo ldconfig

If you have installed nghttp2 library earlier, please copy the following files from the http2cs directory to the corresponding nghttp2 directories:

  • configure.ac from the main directory
  • Makefile.am from the src directory
  • abstractalertmoduleserver.h, alert.json, alertclient.h, alertClientApp.cc, HttpServer.cc and HttpServer.h from the src directory.

Then recompile nghttp2.

How to run

To run Content Server, please execute the following command in the src directory:

./nghttpd --no-tls -v 8500

This command run HTTP 2.0 server on port 8500 and JSON-RPC server on port 8501 (i.e. larger by one than the HTTP 2.0 listening port number).

To run dummy external module for sending alert to Content Server, please execute the following command in the src directory:

./alertclientapp

 

You can specify the text of alert message and the validity time by modifying the alertClientApp.cc file.

To define your own format for an alert message, you should modify alert.json file (src directory); next generate the stubs for client and server:

jsonrpcstub -s alert.json AlertModule

jsonrpcstub -c alert.json Alert

Then make the appropriate changes in the HTTPServer and alertClientApp files (src directory).

Licence

This extention of the nghttpd server is open source available and licensed under MIT License:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contact

Piotr Krawiec, PhD: Ten adres pocztowy jest chroniony przed spamowaniem. Aby go zobaczyć, konieczne jest włączenie w przeglądarce obsługi JavaScript.

National Institute of Telecommunications, Warsaw, Poland