Code Monkey home page Code Monkey logo

core's Introduction

Welcome to the Peer-to-Peer Straightforward Protocol (P2PSP) Project!

Join the chat at https://gitter.im/P2PSP/p2psp

P2PSP is a protocol for the streaming of real-time video/audio sequences on Peer-to-Peer (P2P) networks. In this repository you can find an implementation.

This is a description of the files/directories:

  • doc: information about compiling, using, etc. P2PSP.

  • README.md: this file.

  • src: the implementation.

  • tools: some useful scripts.

More information about the protocol at:

Thanks for downloading the P2PSP and happy broadcasting!

The P2PSP team.

core's People

Contributors

0x6773 avatar abhay44 avatar agauniyal avatar antoniovm avatar clicksaswat avatar cristobalmedinalopez avatar daniildmitriev avatar gitter-badger avatar grakshith avatar ishakirov avatar jamnaranjo avatar jghinestrosa avatar josejuansanchez avatar jpgarciaortiz avatar kshi219 avatar l2dy avatar maniotrix avatar mcavdar avatar mertemba avatar prudhvid avatar sachinsngh165 avatar sunilmahendrakar avatar vicente-gonzalez-ruiz 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

Watchers

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

core's Issues

Automatic selection of Set of Rules by magic flags from splitter

A peer should be able to automatically select the needed peer class (Set of Rules) based on the magic flags sent by the splitter.
The following method is proposed:

  • An initial/startup peer class ("InitPeer", or just "Peer", or "Player"?) handles the connection to splitter, and loading configuration, header and list of peers from splitter.
  • The startup peer class creates an instance of the needed peer class derived from PeerIMS, in a similar way like the splitter currently is implemented. This instance is provided by the (Init)Peer class to get access to its methods.

A possible implementation proposal will follow. Any comments or suggestions are highly appreciated.

Error: glade requires gtk+ 3.12

On every machine that I try to run the GUI I get this error:

Traceback (most recent call last):
  File "p2psp_application_gui.py", line 12, in <module>
    App_Window = Main_Window()
  File "/home/cmedina/p2psp/src/view/main_window.py", line 14, in __init__
    self.interface = file_util.get_user_interface('glade', '../data/glade/mainwindow.glade')
  File "/home/cmedina/p2psp/src/common/file_util.py", line 16, in get_user_interface
    builder.add_from_file(fName)
gi._glib.GError: ../data/glade/mainwindow.glade: required gtk+ version 3.12, current version is 3.10

Why gtk+ 3.12 is required? Is there an easy way to resolve it?

The way to resolve it that I've found is not so easy for regular users (it's a little bit tedious)

use python2 explicitly in make.py

using python gives following error -

Enter yes if you want to download the boost libraries and use the updated boost libraries...
Traceback (most recent call last):
  File "./make.py", line 23, in <module>
    user_input = raw_input()
NameError: name 'raw_input' is not defined

Since lot of installations default to python3 as default python, it would be wise to set python2 shebang explicitly πŸ˜…

Add RESTSplitter function in C++ source of Peer

The RESTSplitter() will be invoked in tracker mode to set the splitter address. It should connect to the crossroad server and send a GET request to obtain the splitter address and port and set them for the peer.

There is an error when the peer.py is executed from the console

 File "/p2psp/src/core/peer_ims.py", line 339, in buffer_data
    buffering_adapter.update_widget(BUFFER_STATUS)
NameError: global name 'buffering_adapter' is not defined

The problem is in a method that only should be used in the desktop app.
We should try to find a solution to run the peer in console and GUI mode.

Splitter does not detect that a peer has not been able to join the team

C++ version. When the splitter accepts to server a incoming peer (this is TCP) and the communication switches to UDP, due to, for example, a UDP NAT traversal problem, the peer does not receives chunks and the user stops (CTRL+C) the peer ... the splitter does not realise that the peer has been gone. This is an annoying issue that disables the team because the chunks that are sent to the gone peer are lost :-/

The bug can be in the monitor peer (that does not report the lost chunks) or in the splitter (that does not delete the gone peer in the list of peers).

Chromecast integration

Reference:

  • pychromecast
    Library for Python 2 and 3 to communicate with the Google Chromecast. It currently supports:
    • Auto discovering connected Chromecasts on the network
    • Start the default media receiver and play any online media
    • Control playback of current playing media
    • Implement Google Chromecast api v2
    • Communicate with apps via channels
    • Easily extendable to add support for unsupported namespaces

Deprecation warnings while compiling sources

The cpp sources are producing tons of deprecation warnings while compiling the project. The warnings look like - warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated].

Maybe something to look in near future :)

Core dumped produced by splitter after aborting the process with CTRL+C (the process should exit gracefully)

C++ version

root@io:~# uname -a
Linux io 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

root@io:~# /root/p2psp/bin/splitter --source_port 4551 --channel BBB-480.ogg --port 4554
2016-02-20 09:06:46.929373 Initialized IMS
2016-02-20 09:06:46.929791 max_chunk_loss = 32
2016-02-20 09:06:46.929863 mcast_addr = 0.0.0.0
2016-02-20 09:06:46.929914 Initialized DBS
2016-02-20 09:06:46.929964 Initialized ACS
2016-02-20 09:06:46.930054 Initialized LRS
2016-02-20 09:06:46.930118 STrPe
2016-02-20 09:06:46.930199 Start
2016-02-20 09:06:46.930370 | Received | Sent | Number losses/ losses
2016-02-20 09:06:46.930436 Time | (kbps) | (kbps) | peers (peer) sents threshold period kbps
2016-02-20 09:06:46.930483 ---------+-----------+-----------+-----------------------------------...
2016-02-20 09:06:46.930556 Requesting the stream header ...
2016-02-20 09:06:46.931005 127.0.0.1 connected to (127.0.0.1, 4551)
2016-02-20 09:06:46.931217 127.0.0.1IMS: GET_message = GET /BBB-480.ogg HTTP/1.1

2016-02-20 09:06:46.931265 Loading the video header
2016-02-20 09:06:47.908044 Stream header received!
2016-02-20 09:06:47.908153 waiting for the monitor peers ...
2016-02-20 09:06:47.930681 |0|0|
2016-02-20 09:06:47.930841 Size peer list: 0
2016-02-20 09:06:48.931011 |0|0|
2016-02-20 09:06:48.931152 Size peer list: 0
2016-02-20 09:06:49.931309 |0|0|
2016-02-20 09:06:49.931445 Size peer list: 0
^C2016-02-20 09:06:50.215905 Keyboard interrupt detected ... Exiting!
2016-02-20 09:06:50.931598 |0|0|
2016-02-20 09:06:50.931728 Size peer list: 0
2016-02-20 09:06:50.931762 Ending
2016-02-20 09:06:50.931853 Bytes transferred saying goodbye: 1
2016-02-20 09:06:50.932118 Accepted connection from peer 127.0.0.1:33010
2016-02-20 09:06:50.932338 Communicating the multicast channel (0.0.0.0, 4554)
2016-02-20 09:06:50.932469 Communicating the header size 10
2016-02-20 09:06:50.932530 Error: Broken pipe
2016-02-20 09:06:50.932605 Sending a chunk_size of 1024 bytes
2016-02-20 09:06:50.932658 Error: Broken pipe
2016-02-20 09:06:50.932707 Sending a header of 10240 bytes
2016-02-20 09:06:50.932765 Error: Broken pipe
2016-02-20 09:06:50.932814 Sending a buffer_size of 256 bytes
Segmentation fault (core dumped)
root@io:~#

Core dumped produced by splitter after binding (without success) a port (the process should exit gracefully)

root@io:~# uname -a
Linux io 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

root@io:# /root/p2psp/bin/splitter --source_port 4551 --channel BBB-134.ogv --port 4552
2016-02-20 09:05:03.817840 Initialized IMS
2016-02-20 09:05:03.818249 max_chunk_loss = 32
2016-02-20 09:05:03.818320 mcast_addr = 0.0.0.0
2016-02-20 09:05:03.818372 Initialized DBS
2016-02-20 09:05:03.818426 Initialized ACS
2016-02-20 09:05:03.818526 Initialized LRS
2016-02-20 09:05:03.818592 STrPe
2016-02-20 09:05:03.818680 Start
2016-02-20 09:05:03.818855 | Received | Sent | Number losses/ losses
2016-02-20 09:05:03.818922 Time | (kbps) | (kbps) | peers (peer) sents threshold period kbps
2016-02-20 09:05:03.819053 ---------+-----------+-----------+-----------------------------------...
2016-02-20 09:05:03.819220 Requesting the stream header ...
terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injector<boost::system::system_error >'
what(): bind: Address already in use
Aborted (core dumped)
root@io:
#

Peer does not get to know if it has been removed from peer_list

The peer just waits for data from the team socket. Suppose the splitter removes the peer because it reached the threshold for max chunk losses, then the other peers also receive the new peer_list and no data is sent to this peer. The peer is just waiting for data while there will be no data coming.
#105

This pull request solves the issue

Channel health indicator

Maybe it could be interesting to display (with color or something like that) the percentage of chunks lost in a period of time. It is an indicator of the channel quality.

player does not restart

First the player is paused. After that it is stopped. Now if play_back_toggle button is pressed,nothing happens.

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.