You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jianglk.darker 7ee447c011
v811_spc009_project
4 months ago
..
cast_core/api v811_spc009_project 4 months ago
common v811_spc009_project 4 months ago
protocol v811_spc009_project 4 months ago
receiver v811_spc009_project 4 months ago
sender v811_spc009_project 4 months ago
standalone_receiver v811_spc009_project 4 months ago
standalone_sender v811_spc009_project 4 months ago
streaming v811_spc009_project 4 months ago
test v811_spc009_project 4 months ago
third_party v811_spc009_project 4 months ago
DEPS v811_spc009_project 4 months ago
README.md v811_spc009_project 4 months ago

README.md

libcast

libcast is an open source implementation of the Cast protocol supporting Cast applications and streaming to Cast-compatible devices.

Using the standalone implementations

To run the standalone sender and receivers together, first you need to install the following dependencies: FFMPEG, LibVPX, LibOpus, LibSDL2, as well as their headers (frequently in a separate -dev package). From here, you just need a video to use with the cast_sender, as the cast_receiver can generate a self-signed certificate and private key for each session. You can also generate your own RSA private key and either create or have the receiver automatically create a self signed certificate with that key. If the receiver generates a root certificate, it will print out the location of that certificate to stdout.

Note that we assume that the private key is a PEM-encoded RSA private key, and the certificate is X509 PEM-encoded. The certificate must also have the CA bit set in the basic constraints. The easiest way to test with a key and certificate is to use ones generated by the cast_receiver standalone application.

Developer certificate generation and use

The easiest way to generate a private key and certificate is to just run the cast_receiver with -g, and both should be written out to files:

  $ /path/to/out/Default/cast_receiver -g
    [INFO:../../cast/receiver/channel/static_credentials.cc(161):T0] Generated new private key for session: ./generated_root_cast_receiver.key
    [INFO:../../cast/receiver/channel/static_credentials.cc(169):T0] Generated new root certificate for session: ./generated_root_cast_receiver.crt

These generated credentials can be passed in to start a session, e.g.

./out/Default/cast_receiver -d generated_root_cast_receiver.crt -p generated_root_cast_receiver.key lo0 -x

And then passed to the cast sender to connect and start a streaming session:

  $ ./out/Default/cast_sender -d generated_root_cast_receiver.crt ~/video-1080-mp4.mp4

When running on Mac OS X, also pass the -x flag to the cast receiver to disable DNS-SD/mDNS, since Open Screen does not currently integrate with Bonjour.

When connecting to a receiver that's not running on the loopback interface (typically lo or lo0), pass the -r <receiver IP endpoint> flag to the cast_sender binary.