Git Product home page Git Product logo

tizonia / tizonia-openmax-il Goto Github PK

View Code? Open in Web Editor NEW
1.7K 41.0 86.0 38.66 MB

Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.

Home Page: https://tizonia.org

License: GNU Lesser General Public License v3.0

C 55.42% C++ 23.22% Perl 0.21% Shell 3.50% Python 4.42% Makefile 2.29% M4 8.94% Emacs Lisp 0.01% Meson 0.84% Roff 1.15%
openmax-il music-player soundcloud spotify multimedia-framework music-streaming-client youtube linux terminal google-play-music

tizonia-openmax-il's Introduction

Tizonia logo

The Tizonia Project

  • A command-line streaming music client/server for Linux.
  • Support for Spotify (Premium), Google Play Music (free and paid tiers), YouTube, SoundCloud, TuneIn and iHeart Internet Radio directories, Plex servers and Chromecast devices.
  • The first open-source implementation of OpenMAX IL 1.2.


News

Latest news

  • [2020-05-22] Tizonia v0.22.0. Added support for iHeart radio, new command-line options to play Spotify recommendations by artist and album name, new keyboard shortcuts and a good number of other fixes and improvements.

See Tizonia's website: Tizonia 0.22.0

Show more
  • [2020-03-08] Tizonia v0.21.0. A maintenance release with fixes for YouTube API quota issues, among others.

See Tizonia's website: Tizonia 0.21.0 brings changes to minimize the YouTube API quota issues

  • [2020-01-19] Tizonia v0.20.0. Added support for TuneIn Internet radios, color-themes and a new build system based on Meson (thanks @lgbaldoni!). A man page has been added and the documentation site has been refreshed. Also tizonia-remote is now distributed in the Debian package plus a good number of fixes, including reviving Chromecast support (still more work needed).

See Tizonia's website: TuneIn Internet radio and podcasts, and color-themes in Tizonia 0.20.0

  • [2019-12-13] Tizonia v0.19.0. Another maintenance release with a good bunch of improvements and bug fixes: Dirble removal (the service is sadly gone), Python 3 migration (please see the section Upgrade (Debian / Ubuntu / Raspbian) to learn how to install the new Python 3 dependencies!).

See Tizonia's website: Global Spotify playlist search and other improvements in Tizonia 0.19.0

  • [2019-03-13] Tizonia v0.18.0. Various improvements and bug fixes in Google Music and Spotify.

See Tizonia's website: Fixed 'Google Play Music tracks cut short' in Tizonia 0.18.0

  • [2019-01-17] Tizonia v0.17.0. Fixed Spotify login issues. A regression introduced in v0.16.0. This issue was identified and fixed thanks to the great feedback provided by the users in issue #531.

See Tizonia's website: Spotify login issues fixed in Tizonia 0.17.0

  • [2018-12-03] Tizonia v0.16.0. Improved Spotify support with more options to dicover new music rather than just playing the content that you know and love. Last but not least, docker-tizonia has been updated! (many thanks to Josh5).

See Tizonia's website: More ways to discover music on Spotify with Tizonia 0.16.0

  • [2018-06-15] Tizonia v0.15.0. Reworked Spotify support to overcome playlist search problems that arised in libspotify. Now spotipy is being used to retrieve track, artist, album, and playlist metadata from Spotify.

See Tizonia's website: Totally revamped Spotify support in Tizonia 0.15.0

  • [2018-04-20] Tizonia v0.14.0. Added support for Google Play Music stations for non-subscribers and YouTube channels (uploads and playlists). Also added option to play the user's entire Google Play Music library.

See Tizonia's website: Tizonia v0.14.0 adds YouTube Channels and Google Play Music stations for non-subscribers

See Tizonia's website: Tizonia v0.13.0 adds support for Plex media servers

See Tizonia's website: Snap package and Docker image available now!

  

Installation

Debian / Ubuntu / Raspbian

Run the following command to install Tizonia on a Debian-compatible system:

$ curl -kL https://github.com/tizonia/tizonia-openmax-il/raw/master/tools/install.sh | bash
# Or its shortened version:
$ curl -kL https://goo.gl/Vu8qGR | bash

NOTE: This script installs the latest release and all the dependencies.

DISCLAIMER: Trust no-one. Please have a look at the installation script before running it on your system!.

Debian packages are stored on Bintray, with the following distro/arch combinations:

Ubuntu Bionic Ubuntu Focal Debian Buster Debian Bullseye Raspbian Buster
(18.04) (20.04) (10) (11) (10)
amd64, armhf amd64 amd64, armhf amd64 armhf

NOTE: Elementary OS, Linux Mint, Kali Linux are supported on releases based on Ubuntu 'Xenial' or 'Bionic', Debian 'Buster' or 'Bullseye'. To install Tizonia on other versions of Debian or Ubuntu-based distros, use the Snap package or have a look at #631.

Arch User Repository (AUR)

Show details
# Please note that if you are upgrading your existing
# Tizonia installation, you *need* to uninstall it before building a new version.
# See GitHub issue https://github.com/tizonia/tizonia-openmax-il/issues/485

# For the latest stable release
$ git clone https://aur.archlinux.org/tizonia-all.git
$ cd tizonia-all
$ makepkg -si

# There is also a -git package:
$ git clone https://aur.archlinux.org/tizonia-all-git.git
$ cd tizonia-all
$ makepkg -si

Snap Package

NOTE: Unfortunately, the snap package is taking too much of my time to maintain, given the number of other release tasks that I need to deal with during a normal release cycle of Tizonia. So I'm calling for maintainers for the Snap package. Please see message in the Snap package repo at https://github.com/tizonia/tizonia-snap/

A 'snap' package is available to download from the 'Global' snap store ('stable' channel). For more details visit:

Show details

To install, first visit Install Snapd and make sure that your Linux distro is supported. Follow the instructions to get the 'snapd' service running on your system, and finally use this command to install Tizonia:

$ sudo snap install tizonia

Tizonia's snapcraft.yaml file is hosted in a separate repository:

Docker Image

Tizonia may also be run from a Docker container. A Docker image is available from the Docker hub:

  

Configuration

To use Spotify, Google Play Music, SoundCloud and Plex you need to introduce your credentials in Tizonia's config file. No credentials needed to stream from YouTube or TuneIn.

Show details
( On first use, Tizonia outputs its configuration file, if it is not there yet )

$ tizonia --help

( now edit $HOME/.config/tizonia/tizonia.conf )

( NOTE: If Tizonia was installed from the 'snap' package, use this path instead )
( $HOME/snap/tizonia/current/.config/tizonia/tizonia.conf )

NOTE: See full instructions inside tizonia.conf.

  

Upgrade

Debian / Ubuntu / Raspbian

To upgrade Tizonia and all its dependencies, simply re-run the installation script.

If you prefer to do it manually, it is a two-step process. Run 'apt-get' as usual to upgrade the Debian packages. Finally make sure that the various Python dependencies are up-to-date.

Show details
# Step1: update Tizonia's Debian packages
$ sudo apt-get update && sudo apt-get upgrade

# Step2: update Tizonia's Python dependencies
# (Note that new versions of some of these Python dependencies are released often,
# so you should do this frequently, even if there isn't a new Tizonia release)

# For Tizonia v0.19.0 or newer: Python 3 dependencies
$ sudo -H pip3 install --upgrade gmusicapi soundcloud youtube-dl pafy pycountry titlecase pychromecast plexapi spotipy fuzzywuzzy eventlet python-Levenshtein

# For Tizonia v0.18.0 or older: Python 2 dependencies
$ sudo -H pip2 install --upgrade gmusicapi soundcloud youtube-dl pafy pycountry titlecase pychromecast plexapi fuzzywuzzy eventlet python-Levenshtein && sudo -H pip2 install git+https://github.com/plamere/spotipy.git --upgrade

  

Uninstall

Debian / Ubuntu / Raspbian

To uninstall Tizonia and all its dependencies, run the following commands

Show details
# Remove/purge all tizonia packages installed in the system
sudo apt-get -y remove --purge tizonia-all && sudo apt-get -y autoremove

  

Hall of Fame

If you are interested in participating, please read our contribution guidelines and don't hesitate to ask (via the bug tracker, chat or any other means!).

Here are some of our contributors:

tizonia-openmax-il's People

Contributors

5nafu avatar aldin-sxr avatar bitdeli-chef avatar dbart avatar ddelazerda avatar djsiddz2 avatar edward-p avatar eusid avatar gpalsingh avatar jadacyrus avatar juanrubio avatar lgbaldoni avatar nlwstein avatar sanjarcode avatar seferergun avatar seifane avatar sjugge avatar solaraquarion avatar sylveon avatar vladiwostok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tizonia-openmax-il's Issues

Demuxer port

The container demuxer class contains a pcm and a raw video ports that need to support the usual indexes. In addition, the following two indexes also need to be supported:
OMX_IndexParamNumAvailableStreams (r)
OMX_IndexParamActiveStream (r/w)

With the above requirements, create a generic demuxer port that can be instantiated for either audio or video domains.

tplay: Require Boost >= 1.54 in configure.ac

Current requirement is boost >= 1.46 (a.k.a. Ubuntu 12.04). Hoewever there a number of bugs in boost meta state machine that have been fixed since then and one of them seems to be affecting tplay's streaming use case:

From V2.21 to V2.22 (Boost 1.48)

  • Fixed rare bugs causing multiple processing of the same event in a submachine whose transition table contains this event and a base event of it.

From now on, tplay should require a pretty recent version of Boost, e.g. Boost >= 1.54 (a.k.a. Ubuntu 14.04) to avoid these issues.

http_renderer: it dies with signal SIGPIPE when the other end breaks the connection

send calls in the http renderer should use the MSG_NOSIGNAL flag to avoid the SIGPIPE signal when the other ends breaks the connection. Still will need to check for EPIPE error, but this will be a non-fatal one, and the listener will simply be removed from the internal structures.

For details on MSG_NOSIGNAL:
http://linux.die.net/man/2/send

Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 0x7fffe96b3700 (LWP 5744)]
0x00007ffff5e1195b in __libc_send (fd=13, buf=0x7fffd000a9ac, n=512, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/send.c:31
31 ../sysdeps/unix/sysv/linux/x86_64/send.c: No such file or directory.
(gdb) bt
#0 0x00007ffff5e1195b in __libc_send (fd=13, buf=0x7fffd000a9ac, n=512, flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/send.c:31
#1 0x00007fffe96bbbff in write_omx_buffer (ap_key=0x7fffd000edf4, ap_value=0x7fffd000ed80, ap_arg=0x7fffd000e8f0) at icernet.c:1406
#2 0x00007ffff58f093a in map_iter_function (key=0x7fffd000ee30, iter_arg=0x7fffd000e8f0) at tizmap.c:107
#3 0x00007ffff58e6744 in iterate_inorder_helper (node=0x7fffd00100e0, iter_fun=0x7ffff58f087c <map_iter_function>, iter_arg=0x7fffd000e8f0) at avl/avl.c:635
#4 0x00007ffff58e67cc in avl_iterate_inorder (tree=0x7fffd000a400, iter_fun=0x7ffff58f087c <map_iter_function>, iter_arg=0x7fffd000e8f0) at avl/avl.c:656
#5 0x00007ffff58f10fd in tiz_map_for_each (ap_map=0x7fffd000a3c0, a_pf_for_each=0x7fffe96bb948 <write_omx_buffer>, ap_arg=0x7fffd000e8f0) at tizmap.c:282
#6 0x00007fffe96bcf39 in icer_net_write_to_listeners (ap_server=0x7fffd000e8f0) at icernet.c:1851
#7 0x00007fffe96bdb15 in stream_to_clients (ap_prc=0x7fffd0009af0) at icerprc.c:72
#8 0x00007fffe96beeaa in icer_prc_io_ready (ap_prc=0x7fffd0009af0, ap_ev_io=0x7fffd000eea0, a_fd=13, a_events=2) at icerprc.c:439
#9 0x00007fffea0cc3dd in tiz_prc_io_ready (ap_obj=0x7fffd0009af0, ap_ev_io=0x7fffd000eea0, a_fd=13, a_events=2) at tizprc.c:882
#10 0x00007fffea09dde6 in do_eio (ap_sched=0x7fffe4009870, ap_state=0x7fffe400a960, ap_msg=0x7fffc4000920) at tizscheduler.c:1219
#11 0x00007fffea0a019f in dispatch_msg (ap_sched=0x7fffe4009870, ap_state=0x7fffe400a960, ap_msg=0x7fffc4000920) at tizscheduler.c:1885
#12 0x00007fffea0a0662 in il_sched_thread_func (p_arg=0x7fffe4009870) at tizscheduler.c:1972
#13 0x00007ffff5e0a182 in start_thread (arg=0x7fffe96b3700) at pthread_create.c:312
#14 0x00007ffff4ca930d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

FLAC port

Add a FLAC port and corresponding AUDIO extensions.:

  • OMX_IndexParamAudioFlac
  • OMX_AUDIO_CodingFLAC
  • struct OMX_AUDIO_PARAM_FLACTYPE

References:

libtizonia: Re-factor OMX_IndexParamContentURI get/set logic

There are a number of ports (tizdemuxercfgport, frcfgport, and fwcfgport) that share the same need to read and write OMX_IndexParamContentURI.

The goals of this issue is are:

  • Create a new config port that encapsulates this param: e.g. something like a tizuricfgport
  • Make tizdemuxercfgport inherit from it.
  • Use the new tizuricfgport directly in the file reader and file writer components and delete frcfgport and fwcfgport config ports.

libtizonia: scheduler never destroys the object system

  • tizscheduler.c:deinit_servants needs to call tiz_os_destroy
  • This is the memory leak location as reported by Valgrind
   (1) ==9712== 182,648 (528 direct, 182,120 indirect) bytes in 11 blocks are definitely lost in loss record 266 of 266
   (1) ==9712==    at 0x4C2C510: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   (1) ==9712==    by 0x6287015: tiz_mem_calloc (tizosalmem.c:69)
   (1) ==9712==    by 0x628F8BF: map_calloc (tizosalmap.c:97)
   (1) ==9712==    by 0x628F978: tiz_map_init (tizosalmap.c:116)
   (1) ==9712==    by 0xDC35BB3: tiz_os_init (tizobjsys.c:470)
   (1) ==9712==    by 0xDC33F75: init_servants (tizscheduler.c:2118)
   (1) ==9712==    by 0xDC2F00B: do_init (tizscheduler.c:621)
   (1) ==9712==    by 0xDC330CE: dispatch_msg (tizscheduler.c:1885)
   (1) ==9712==    by 0xDC33591: il_sched_thread_func (tizscheduler.c:1972)
   (1) ==9712==    by 0x74D5181: start_thread (pthread_create.c:312)
   (1) ==9712==    by 0x720230C: clone (clone.S:111)

tplay: remove metadata from streamed mp3 files

A new component needs to be created to read the mp3 data from file and remove the metadata before it is streamed. This component is being named "OMX.Aratelia.audio_metadata_eraser.mp3"

The http server graph in tplay needs to migrate to use this component instead of the binary audio reader.

tplay: playlist should allow removal of files with unknown codec

When an unknown codec is found, the file is skipped and the playlist moves forward. But manually skipping backwards stops working correctly as the file with the unknown codec is still present in the playlist.

To solve this issue it is necessary to remove the broken file from the playlist.

http renderer: processor doesn't flush its buffers

On transitions Exe->Idle or to port Disabled, the icerprc object does not flush its buffers. This hangs tplay when stopping the application as the component's kernel awaits for a buffer that is actually held by the processor.

23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel_helpers.inl:all_buffers_returned:1264] --- Port [0] : awaiting buffers (only [1] out of [2] have arrived)
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel_helpers.inl:all_buffers_returned:1271] --- HEADER [0x7fbc600a08c0] BUFFER [0x7fbc6400c980]
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizfsm.c:fsm_GetState:647] --- GetState [ESubStateExecutingToIdle]
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [icerprc.c:icer_prc_stop_and_return:345] --- p_inhdr_ [0x7fbc6009f500]
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [icernet.c:stop_server_io_watcher:467] --- stopping io watcher on fd [12]
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizfsm.c:fsm_complete_transition:1057] --- Servant [icerprc] notifies transition complete (to state [OMX_StateIdle])
23-03-2014 03:01:06.375 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizfsm.c:fsm_dispatch_msg:920] --- Processing [ETIZFsmMsgTransComplete]...
23-03-2014 03:01:06.376 - [PID:10393][TID:10468] [DEBUG] [OMX.Aratelia.ice_renderer.http] [tizexecutingtoidle.c:executingtoidle_trans_complete:99] --- Trans complete to state [OMX_StateIdle]...
23-03-2014 03:01:06.376 - [PID:10393][TID:10468] [DEBUG] [OMX.Aratelia.ice_renderer.http] [tizexecuting.c:executing_trans_complete:263] --- Trans complete to state [OMX_StateIdle]...
23-03-2014 03:01:06.376 - [PID:10393][TID:10468] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizstate.c:state_trans_complete:414] --- Transition to [OMX_StateIdle] is NOW complete at [icerprc]...Servant count is now [1]...

tplay: the second instance of tplay -s hangs while trying to open the default tcp port

If an instance of tplay -s is running, this first instance has port 8010 open. A second instance will try to open the same port and the renderer reports OMX_ErrorInsufficientResources. After this, tplay hangs as it can't find a valid transition from STATE [configuring](event omx_err_evt received).

12-04-2014 02:51:58.463 - [PID:8987][TID:9061] [NOTICE] [tiz.play.graph] [tizgraph.cpp:omx_evt:197] --- [httpservgraph] : [OMX.Aratelia.file_reader.binary] -> [OMX_EventCmdComplete] [OMX_CommandStateSet] [OMX_StateIdle]
12-04-2014 02:51:58.463 - [PID:8987][TID:9062] [TRACE] [OMX.Aratelia.ice_renderer.http] [icercfgport.c:icer_cfgport_GetParameter:86] --- [OMX_TizoniaIndexParamHttpServer]...
12-04-2014 02:51:58.464 - [PID:8987][TID:9062] [TRACE] [OMX.Aratelia.ice_renderer.http] [icerprc.c:icer_prc_allocate_resources:235] --- nListeningPort = [8010] nMaxClients = [1]
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [NOTICE] [tiz.play.graph.cmd] [tizgraphcmd.hpp:inject:86] --- GRAPH : Injecting CMD [omx_trans_evt] in STATE [configuring]...
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:operator():97] --- is_initial_configuration [YES]
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:operator():97] --- is_initial_configuration [YES]
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [TRACE] [tiz.play.graph.ops] [tizgraphops.cpp:is_trans_complete:404] --- handle [0x7fe0c8012860] to_state [OMX_StateIdle]...
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [TRACE] [tiz.play.graph.guard] [tizgraphguard.hpp:operator():153] --- GUARD [N3tiz5graph17is_trans_completeE] -> [NO]
12-04-2014 02:51:58.464 - [PID:8987][TID:9062] [ERROR] [OMX.Aratelia.ice_renderer.http] [icernet.c:icer_net_server_init:1581] --- [OMX_ErrorInsufficientResources] : creating the server socket.
12-04-2014 02:51:58.464 - [PID:8987][TID:9062] [NOTICE] [tiz.play.graph] [tizgraph.cpp:omx_evt:197] --- [httpservgraph] : [OMX.Aratelia.ice_renderer.http] -> [OMX_EventError] [OMX_ErrorInsufficientResources] [0]
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [NOTICE] [tiz.play.graph.cmd] [tizgraphcmd.hpp:inject:86] --- GRAPH : Injecting CMD [omx_err_evt] in STATE [configuring]...
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [ERROR] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:no_transition:553] --- no transition from state [configuring] on event [N3tiz5graph11omx_err_evtE]
12-04-2014 02:51:58.464 - [PID:8987][TID:9026] [ERROR] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:no_transition:553] --- no transition from state [AllOk] on event [N3tiz5graph11omx_err_evtE]

mp3_metadata: processor does not release buffers correctly

mpg123_framebyframe_next can return one of the following error codes:

MPG123_OK
MPG123_DONE
MPG123_NEW_FORMAT
MPG123_NEED_MORE

Currently MPG123_NEED_MORE is not being handled and this leads to an OMX header that gets lost and never returned by the component's processor. This produces random (but frequent) graph deadlocks during port disable or Exe->Idle transitions.

The component's processor class needs to be updated to release its currently claimed buffers during port disable and Exe->Idle transitions.

tplay: use ax_boost m4 macros

Use the following m4 functions in tplay's configure.ac

AX_BOOST_BASE([1.46],, [AC_MSG_ERROR([tplay needs Boost 1.46])])
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_THREAD

This will allow for better detection of the required boost libraries.

libtizonia: Integration of the resource management proxy library (libtizrmproxy) in libztizonia

Resource Management is still work in progress. The implementation of the Resource Management framework is pretty much complete (the tizrmd D-Bus daemon and the libtizrmproxy client library).

However, the integration of the client library within the libtizonia base component library is still in progress (e.g. transitions to/from OMX_WaitForResources are not happening just yet).

Demuxer config port

Create a demuxer config port to be used in container demuxer components. The demuxer config ports has to support the following indexes:

OMX_IndexConfigTimePosition (r/w)
OMX_IndexConfigTimeSeekMode (r/w)
OMX_IndexParamContentURI (r/w)

plugins: libmpg123 (LGPL) based mp3 decoder component

The existing mp3 decoder omx component is based on libmad, which is GPL.

Implement a new decoder component based on libmpg123, which is LGPL.

This issue should be used to fix the decoding of mp3 files that contain embedded cover art (currently, these are not handled very well by the mad-based decoder).

libtizonia: Deprecate tiz_krn_select and friends

Friends are:
TIZ_PD_ZERO
TIZ_PD_SET
TIZ_PD_CLR
TIZ_PD_ISSET

'tiz_krn_select' was being used to learn which ports had buffers available to be "claimed" by the processor object. Then if buffers were available to be claimed, 'tiz_krn_claim_buffer' had to be used to actually receive them.

The dual api workflow can in practice be simplified to use one api only, that is using 'tiz_krn_claim_buffer' plus a check to see if this function returned a non-null header (previously it was guaranteed non-null pointer since 'tiz_krn_select' was being used prior to 'tiz_krn_claim_buffer' ).

'tiz_krn_select' won't be deleted just yet. Further analysis needed to understand if there is a use case for this api.

plugins: ogg demuxer component

Create an ogg demuxer component based on liboggz. Should support opus, vp8 (and vp9 if supported by oggz) demuxing.

NOTE: The ogg container demuxer component is currently not defined in the standard section of the 1.2 spec.

libtizonia: add a Vorbis port

Add a specialisation of the audio port class to support the following IL 1.2 elements:

  • the OMX_AUDIO_CodingVORBIS coding type ,
  • the OMX_IndexParamAudioVorbis index (a.k.a. OMX_AUDIO_PARAM_VORBISTYPE struct).

tplay: hangs when OMX_ErrorInsufficientResources is received in STATE [executing]

08-04-2014 17:21:41.793 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel_helpers.inl:all_buffers_returned:1242] --- HEADER [0x7f7ef800a060] BUFFER [0x7f7efc010600]
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [ERROR] [OMX.Aratelia.file_reader.binary] [frprc.c:read_buffer:141] --- An error occurred while reading
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [ERROR] [tiz.file_reader.prc] [frprc.c:fr_prc_buffers_ready:263] --- [OMX_ErrorInsufficientResources]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [NOTICE] [tiz.play.graph] [tizgraph.cpp:omx_evt:197] --- [httpservgraph] : [OMX.Aratelia.file_reader.binary] -> [OMX_EventError] [OMX_ErrorInsufficientResources] [0]
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [NOTICE] [tiz.play.graph.cmd] [tizgraphcmd.hpp:inject:86] --- GRAPH : Injecting CMD [omx_err_evt] in STATE [executing]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [TRACE] [tiz.play.graph.state] [tizgraphstate.hpp:on_exit:143] --- STATE [N3tiz5graph9executingE]
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:on_entry:371] --- [N3tiz5graph5hsfsm4fsm_9skipping_16skipping_initialE]
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:on_exit:373] --- [N3tiz5graph5hsfsm4fsm_9skipping_16skipping_initialE]
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:operator():414] --- [N3tiz5graph5hsfsm4fsm_9skipping_17do_disable_tunnelE]
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizfsm.c:validate_portdisable:310] --- [OMX_CommandPortDisable] pid [0] cur_state_id_ [OMX_StateExecuting]
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizfsm.c:fsm_dispatch_msg:920] --- Processing [ETIZFsmMsgSendCommand]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizstate.c:state_SendCommand:101] --- SendCommand [OMX_CommandPortDisable] PORT [0]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel.c:krn_SendCommand:522] --- SendCommand [OMX_CommandPortDisable]
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel.c:krn_dispatch_msg:849] --- Processing [ETIZKrnMsgSendCommand]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel_dispatch.inl:dispatch_sc:897] --- Processing [OMX_CommandPortDisable]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel_dispatch.inl:dispatch_port_disable:52] --- Port Disable on port [0]
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel_helpers.inl:flush_egress:610] --- pid [0] loop index=[0] egress length [0] - p_thdl [0x7f7f1001b870]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31621] [TRACE] [OMX.Aratelia.file_reader.binary] [tizkernel_dispatch.inl:dispatch_port_disable:201] --- port [0] going to disabled - claimed [1]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizfsm.c:validate_portdisable:310] --- [OMX_CommandPortDisable] pid [0] cur_state_id_ [OMX_StateExecuting]
08-04-2014 17:21:41.794 - [PID:31578][TID:31603] [TRACE] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:on_entry:392] --- [N3tiz5graph5hsfsm4fsm_9skipping_16disabling_tunnelE]
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizfsm.c:fsm_dispatch_msg:920] --- Processing [ETIZFsmMsgSendCommand]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizstate.c:state_SendCommand:101] --- SendCommand [OMX_CommandPortDisable] PORT [0]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel.c:krn_SendCommand:522] --- SendCommand [OMX_CommandPortDisable]
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel.c:krn_dispatch_msg:849] --- Processing [ETIZKrnMsgSendCommand]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel_dispatch.inl:dispatch_sc:897] --- Processing [OMX_CommandPortDisable]...
08-04-2014 17:21:41.794 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [tizkernel_dispatch.inl:dispatch_port_disable:52] --- Port Disable on port [0]
08-04-2014 17:21:41.881 - [PID:31578][TID:31622] [NOTICE] [OMX.Aratelia.ice_renderer.http] [icerprc.c:icer_prc_timer_ready:447] --- Received timer event
08-04-2014 17:21:41.882 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [icernet.c:icer_net_write_to_listeners:1820] --- total [395213750] last [1400] burst [1400] cache [-728] srate [44100] brate [128000] pkts/s [11.493209] wait [0.087008] socket [1937421]
08-04-2014 17:21:41.882 - [PID:31578][TID:31622] [TRACE] [OMX.Aratelia.ice_renderer.http] [icernet.c:icer_net_write_to_listeners:1840] --- no more buffers available
09-04-2014 09:07:26.155 - [PID:31578][TID:31578] [NOTICE] [tiz.play.graphmgr] [tizgraphmgr.cpp:deinit:135] --- Waiting until stopped...
09-04-2014 09:07:26.155 - [PID:31578][TID:31582] [NOTICE] [tiz.play.graphmgr.fsm] [tizgraphmgrcmd.cpp:inject:83] --- GRAPH MGR : Injecting CMD [stop_evt] in STATE [running]...
09-04-2014 09:07:26.155 - [PID:31578][TID:31582] [TRACE] [tiz.play.graphmgr.fsm] [tizgraphmgrfsm.hpp:on_exit:226] --- [N3tiz8graphmgr4fsm_7runningE]
09-04-2014 09:07:26.155 - [PID:31578][TID:31582] [TRACE] [tiz.play.graphmgr.fsm] [tizgraphmgrfsm.hpp:operator():483] --- [N3tiz8graphmgr4fsm_9do_unloadE]
09-04-2014 09:07:26.155 - [PID:31578][TID:31582] [TRACE] [tiz.play.graphmgr.fsm] [tizgraphmgrfsm.hpp:on_entry:354] --- [N3tiz8graphmgr4fsm_15unloading_graphE]
09-04-2014 09:07:26.155 - [PID:31578][TID:31603] [NOTICE] [tiz.play.graph.cmd] [tizgraphcmd.hpp:inject:86] --- GRAPH : Injecting CMD [unload_evt] in STATE [skipping]...
09-04-2014 09:07:26.155 - [PID:31578][TID:31603] [ERROR] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:no_transition:552] --- no transition from state [skipping] on event [N3tiz5graph10unload_evtE]
09-04-2014 09:07:26.155 - [PID:31578][TID:31603] [ERROR] [tiz.play.graph.httpservfsm] [tizhttpservgraphfsm.hpp:no_transition:552] --- no transition from state [AllOk] on event [N3tiz5graph10unload_evtE]

Add API for notification of SetConfig(OMX_IndexConfig..) events to processor implementations

Currently, when SetConfig is called on a component, the processor servant is not notified and hence, no action will be taken.

The processor base class ( tizproc.h / tizproz_decls.h / tizproc.c ) needs to be updated so that a new callback method exists for reception of SetConfig events. The kernel servant needs to be modified in order to do the forwarding of the SetConfig event to the processor.

tplay: will crash if the playlist is exhausted

To reproduce, simply try to stream a folder without any CBR files (e.g. a folder where all files are ABR encoded). The initial playlist will be processed and each of the files will end up being removed. After that tplay will crash with this stack trace:

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffea4f2700 (LWP 7190)]
0x00000000004184bc in tiz::playlist::skip (this=0x6ef230, jump=1) at tizplaylist.cpp:259
259 current_index_ %= list_size;
(gdb) bt
#0 0x00000000004184bc in tiz::playlist::skip (this=0x6ef230, jump=1) at tizplaylist.cpp:259
#1 0x0000000000437b70 in tiz::graph::ops::do_skip (this=0x7fffe0005a70) at tizgraphops.cpp:268
#2 0x000000000046509f in operator()boost::msm::back::state_machine<tiz::graph::hsfsm::fsm_::configuring_, boost::msm::front::none, tiz::graph::hsfsm::fsm_::configuring_::probing, tiz::graph::hsfsm::fsm_::configuring_::probing> (this=, evt=..., fsm=...) at tizgraphaction.hpp:84

tplay hangs after "OMX_ErrorContentURIError : Unable to probe uri" in do_probe

The program hangs after the do_probe action concludes with an error (OMX_ErrorContentURIError). This typically happens when the probe object fails to validate the codec of the current stream.

19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.playlist] [tizplaylist.cc:skip:225] --- jump [1] current_index_ [32]...
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.playlist] [tizplaylist.cc:skip:239] --- jump [1] new current_index_ [33]...
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.fsm] [tizgraphfsm.h:on_entry:250] --- [N3tiz5graph4fsm_9skipping_9skip_exitE]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.ops] [tizgraphops.cc:is_end_of_play:414] --- is_end_of_play [NO]...
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.guard] [tizgraphguard.h:operator():199] --- GUARD [N3tiz5graph14is_end_of_playE] -> [NO]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.fsm] [tizgraphfsm.h:on_entry:117] --- [N3tiz5graph4fsm_12configuring_15disabling_portsE]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.guard] [tizgraphguard.h:operator():97] --- GUARD [N3tiz5graph24is_disabled_evt_requiredE] -> [NO]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.fsm] [tizgraphfsm.h:on_exit:124] --- [N3tiz5graph4fsm_12configuring_15disabling_portsE]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.action] [tizgraphaction.h:operator():55] --- ACTION [N3tiz5graph8do_probeE]
19-03-2014 00:32:09.434 - [PID:11582][TID:11621] [TRACE] [tiz.play.playlist] [tizplaylist.cc:get_current_uri:246] --- uri list size [59] current_index_ [33]...
19-03-2014 00:32:11.281 - [PID:11582][TID:11583] [NOTICE] [tiz.play.graphmgr.fsm] [tizgraphmgrcmd.cc:inject:82] --- GRAPH MGR : Injecting CMD [next_evt] in STATE [running]...
19-03-2014 00:32:11.281 - [PID:11582][TID:11583] [TRACE] [tiz.play.graphmgr.fsm] [tizgraphmgrfsm.h:operator():372] --- [N3tiz8graphmgr4fsm_7do_nextE]
19-03-2014 00:32:13.618 - [PID:11582][TID:11621] [ERROR] [tiz.play.graph.mp3decoder] [tizmp3graph.cc:do_probe:126] --- [OMX_ErrorContentURIError] : Unable to probe uri.
19-03-2014 00:32:13.618 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.fsm] [tizgraphfsm.h:on_entry:130] --- [N3tiz5graph4fsm_12configuring_7probingE]
19-03-2014 00:32:13.618 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.guard] [tizgraphguard.h:operator():113] --- GUARD [N3tiz5graph29is_port_settings_evt_requiredE] -> [NO]
19-03-2014 00:32:13.618 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.fsm] [tizgraphfsm.h:on_exit:132] --- [N3tiz5graph4fsm_12configuring_7probingE]
19-03-2014 00:32:13.618 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.action] [tizgraphaction.h:operator():68] --- ACTION [N3tiz5graph12do_configureE]
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.action] [tizgraphaction.h:operator():146] --- ACTION [N3tiz5graph18do_omx_loaded2idleE]
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [TRACE] [tiz.play.graph.state] [tizgraphstate.h:on_entry:102] --- STATE [N3tiz5graph11config2idleE]
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [ERROR] [tiz.play.graph.fsm] [tizgraphfsm.h:no_transition:356] --- no transition from state 2 on event N3tiz5graph7err_evtE
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [NOTICE] [tiz.play.graph.cmd] [tizgraphcmd.h:inject:86] --- GRAPH : Injecting CMD [skip_evt] in STATE [configuring]...
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [ERROR] [tiz.play.graph.fsm] [tizgraphfsm.h:no_transition:356] --- no transition from state 2 on event N3tiz5graph8skip_evtE
19-03-2014 00:32:13.842 - [PID:11582][TID:11621] [ERROR] [tiz.play.graph.fsm] [tizgraphfsm.h:no_transition:356] --- no transition from state 2 on event N3tiz5graph7err_evtE

OMX_SetConfig (OMX_IndexConfigTunneledPortStatus) during port enable and disable

Currently, support for OMX_SetConfig (OMX_IndexConfigTunneledPortStatus) (a.k.a. IL 1.2 solution for avoidance of state machine race conditions during tunnelling) is implemented for all the usual state transitions where this is required, that is:

    • OMX_StateLoaded -> OMX_StateIdle
    • OMX_StateIdle-> OMX_StateExecuting
    • OMX_StateExecuting -> OMX_StateIdle

However, OMX_SetConfig (OMX_IndexConfigTunneledPortStatus) needs to be supported also during port disable and port enable scenarios. This still needs to be
implemented.

tplay, plugins: path limits are not handled correctly

Currently, paths in uris are limited to OMX_MAX_STRINGNAME_SIZE characters.

p_uritype = (OMX_PARAM_CONTENTURITYPE *) 
tiz_mem_calloc (1, sizeof(OMX_PARAM_CONTENTURITYPE) + OMX_MAX_STRINGNAME_SIZE)))

This is clearly insufficient. The system limits like PATH_MAX, NAME_MAX, or pathconf should be used to calculate the limits when allocating memory for uris.

tplay: Add support for multi-format plalists (a.k.a. the graph manager thread)

Currently, tplay only assembles single-format playlists, therefore playlists with only mp3 or opus files can be played back.

The idea is to add a graph manager thread that will be in charge of instantiating the necessary graphs given a multi-format playlist, i.e., files of various encodings in the same playlist (e.g. a folder with opus and mp3 files in it).

opus decoder component

Create an opus decoder component based on the latest version of libopus (currently 1.1-beta).

NOTE: The opus decoder component is currently not defined in the standard section of the 1.2 spec. The appropriate extensions will have to be defined in OMX_TizoniaExt.h.

tplay: filter out non-CBR streams

Currently, ABR, or VBR streams are not being handled very well, so better avoid those streams to be able to keep certain quality.

Implement pause/resume in processor class

At the moment, the base component is able to transition correctly to OMX_StatePause, and that has the effect of preventing buffers from reaching the processor servant. However, there is no indication in the processor servant of the actual pause/resume events, and hence, components like pcm renderer will underflow as they are buffer-starved when the transition to OMX_StatePause takes place.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.