Giter VIP home page Giter VIP logo

airplayreceiver's People

Contributors

ponypc avatar steebono 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

airplayreceiver's Issues

How to play audio data?

Can anyone provide a example of how to play the raw pcm data stream using NAudio or something similar?

new email

@SteeBono: Hello, I have sent a second mail, have you received?
Please reply in private.
Thanks in advance.

How to view incoming video

I have managed to successfully compile this software and dependencies, and I have been able to connect my device to this software. How would I view the incoming video/audio?

why does pts always equal 0?

OnH264DataReceived: frameType=5, length=5076, pts=0
OnH264DataReceived: frameType=1, length=250, pts=0
OnH264DataReceived: frameType=1, length=384, pts=0
OnH264DataReceived: frameType=1, length=2393, pts=0
OnH264DataReceived: frameType=1, length=3616, pts=0
OnH264DataReceived: frameType=1, length=3747, pts=0

Failed to build ALAC Codec

I follow your step carefully, I successfully built AAC Codec, but failed to build ALAC codec. I'm having below error, not sure you have any clue? Thank you.

$ make
make  all-recursive
make[1]: Entering directory '/home/Jing/alac'
Making all in codec
make[2]: Entering directory '/home/Jing/alac/codec'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -Wno-multichar   -g -O2 -MT libalac_la-LibALAC.lo -MD -MP -MF .deps/libalac_la-LibALAC.Tpo -c -o libalac_la-LibALAC.lo `test -f 'LibALAC.cpp' || echo './'`LibALAC.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -Wno-multichar -g -O2 -MT libalac_la-LibALAC.lo -MD -MP -MF .deps/libalac_la-LibALAC.Tpo -c LibALAC.cpp  -DDLL_EXPORT -DPIC -o .libs/libalac_la-LibALAC.o
LibALAC.cpp:10:1: warning: 'typedef' was ignored in this declaration
   10 | typedef struct EncoderInfo
      | ^~~~~~~
LibALAC.cpp:17:1: warning: 'typedef' was ignored in this declaration
   17 | typedef struct DecoderInfo
      | ^~~~~~~
LibALAC.cpp:42:7: warning: 'void* InitializeEncoder(int, int, int, int, bool)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   42 | void* InitializeEncoder(int sampleRate, int channels, int bitsPerSample, int framesPerPacket, bool useFastMode)
      |       ^~~~~~~~~~~~~~~~~
LibALAC.cpp: In function 'void* InitializeEncoder(int, int, int, int, bool)':
LibALAC.cpp:54:48: error: 'calloc' was not declared in this scope
   54 |         EncoderInfo * encoder = (EncoderInfo *)calloc(sizeof(EncoderInfo), 1);
      |                                                ^~~~~~
LibALAC.cpp: At global scope:
LibALAC.cpp:91:5: warning: 'int GetMagicCookieSize(void*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   91 | int GetMagicCookieSize(void* encoder)
      |     ^~~~~~~~~~~~~~~~~~
LibALAC.cpp:98:5: warning: 'int GetMagicCookie(void*, unsigned char*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   98 | int GetMagicCookie(void* encoder, unsigned char * outCookie)
      |     ^~~~~~~~~~~~~~
LibALAC.cpp:107:5: warning: 'int Encode(void*, unsigned char*, unsigned char*, int*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  107 | int Encode(void* encoder, unsigned char * inBuffer, unsigned char * outBuffer, int * ioNumBytes)
      |     ^~~~~~
LibALAC.cpp:114:5: warning: 'int FinishEncoder(void*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  114 | int FinishEncoder(void* encoder)
      |     ^~~~~~~~~~~~~
LibALAC.cpp: In function 'int FinishEncoder(void*)':
LibALAC.cpp:120:9: error: 'free' was not declared in this scope
  120 |         free(encoder);
      |         ^~~~
LibALAC.cpp:9:1: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
    8 | #include "EndianPortable.h"
  +++ |+#include <cstdlib>
    9 |
LibALAC.cpp: At global scope:
LibALAC.cpp:124:7: warning: 'void* InitializeDecoder(int, int, int, int)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  124 | void* InitializeDecoder(int sampleRate, int channels, int bitsPerSample, int framesPerPacket)
      |       ^~~~~~~~~~~~~~~~~
LibALAC.cpp: In function 'void* InitializeDecoder(int, int, int, int)':
LibALAC.cpp:136:48: error: 'calloc' was not declared in this scope
  136 |         DecoderInfo * decoder = (DecoderInfo *)calloc(sizeof(DecoderInfo), 1);
      |                                                ^~~~~~
LibALAC.cpp:163:9: error: 'free' was not declared in this scope
  163 |         free(theMagicCookie);
      |         ^~~~
LibALAC.cpp:163:9: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
LibALAC.cpp: At global scope:
LibALAC.cpp:167:7: warning: 'void* InitializeDecoderWithCookie(void*, int)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  167 | void* InitializeDecoderWithCookie(void * inMagicCookie, int inMagicCookieSize)
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
LibALAC.cpp: In function 'void* InitializeDecoderWithCookie(void*, int)':
LibALAC.cpp:181:48: error: 'calloc' was not declared in this scope
  181 |         DecoderInfo * decoder = (DecoderInfo *)calloc(sizeof(DecoderInfo), 1);
      |                                                ^~~~~~
LibALAC.cpp: At global scope:
LibALAC.cpp:190:5: warning: 'int Decode(void*, unsigned char*, unsigned char*, int*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  190 | int Decode(void* decoder, unsigned char * inBuffer, unsigned char * outBuffer, int * ioNumBytes)
      |     ^~~~~~
LibALAC.cpp:202:5: warning: 'int FinishDecoder(void*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  202 | int FinishDecoder(void* decoder)
      |     ^~~~~~~~~~~~~
LibALAC.cpp: In function 'int FinishDecoder(void*)':
LibALAC.cpp:207:9: error: 'free' was not declared in this scope
  207 |         free(decoder);
      |         ^~~~
LibALAC.cpp:207:9: note: 'free' is defined in header '<cstdlib>'; did you forget to '#include <cstdlib>'?
LibALAC.cpp: At global scope:
LibALAC.cpp:211:5: warning: 'int ParseMagicCookie(void*, int, int*, int*, int*, int*)' redeclared without dllimport attribute after being referenced with dll linkage
  211 | int ParseMagicCookie(void * inMagicCookie, int inMagicCookieSize, int * outSampleRate, int * outChannels, int * outBitsPerSample, int * outFramesPerPacket)
      |     ^~~~~~~~~~~~~~~~
make[2]: *** [Makefile:602: libalac_la-LibALAC.lo] Error 1
make[2]: Leaving directory '/home/Jing/alac/codec'
make[1]: *** [Makefile:404: all-recursive] Error 1
make[1]: Leaving directory '/home/Jing/alac'
make: *** [Makefile:336: all] Error 2

Curve25519 lib error

I hit below error for some reason when connecting from my mobile.
Do you have any clue? Nuget seems restore the Curve25519 lib successfully.
I ran in windows 10 using VS2022.

IP address fe80::2d6d:601:da5:809c%5
IP address 192.168.9.99
NIC 'Internet1'
Client connected: 192.168.9.152:53603
System.TypeLoadException: Could not load type 'org.whispersystems.curve25519.Curve25519' from assembly 'Curve25519, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null'.
   at AirPlay.Listeners.AirTunesListener.OnDataReceivedAsync(Request request, Response response, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at AirPlay.Listeners.AirTunesListener.OnDataReceivedAsync(Request request, Response response, CancellationToken cancellationToken)
   at AirPlay.Listeners.BaseTcpListener.ReadFormattedAsync(TcpClient client, NetworkStream stream, CancellationToken cancellationToken) in D:\Source\airplayreceiver\AirPlay\Listeners\Bases\BaseTcpListener.cs:line 174
   at AirPlay.Listeners.BaseTcpListener.HandleClientAsync(TcpClient client, CancellationToken cancellationToken) in D:\Source\airplayreceiver\AirPlay\Listeners\Bases\BaseTcpListener.cs:line 89

Handling video requests

Hello. First of all, let me congratulate your for this amazing work.
I was messing a little bit with this library when I sew that video requests are not handled.
These requests are sent when you share a video in safari browser using airplay.
Do you have any information about them?

How to play the byte array received through media player?

How to programmatically play the video packets received in byte array through VLC or Media Element? I captured the 10-minute feed and later played it manually through the VLC player but the video saved was only 2 mins in very fast forwarding mode and some parts missing. So how to resolve it?

Instructions for inspecting the dump output?

I've got the code running and dumping out screen mirrored frames but I'm not sure how to look at these.

Can I concatenate these into a file viewable with Quicktime or something? Do I need to create a header?

need instructions on how to build airplayreceiver on Linux

Hi Stefano,

your project looks interesting, but there are no clues given about how to build it.
(or I couldn't find them). I am using OpenSuse 15.3 but could also use Ubuntu 20.04 if needed.

I am not familiar with C#, but have managed to install Microsoft dotnet sdk 5.0.0, mono-complete 6.12.0 and
monodevelop 7.8.4 on OpenSuse 15.3 which I suppose provides the C# development tools on linux..

But I have absolutely no idea what to actually do to build your app. (building the aac library seems clear, but the editing of alac makefiles is not (do you mean "edit" (changing them with an editor), or simple "replacement" with GiteKat's files).

Also, where should these AAC and ALAC libraries be built (which location relative to the airplayreceiver directory tree?, or should "sudo make install" be used).

You need to give full and absolutely-explicit recipe-style build instructions (for at least one Linux distribution such as ubuntu) for people to try out your app.

If you give me enough clues to how to build your app, and I succeed, I can write up clear instructions for e.g. ubuntu 20.04 and leave them as a Pull Request for your README.md.


I would like to see how well your app works. I have been maintaining the Linux/macOS UxPlay GStreamer-based airplay-mirror server http://github.com/FDH2/UxPlay (which has the history shairplay -> RPiPlay -> UxPlay ) and have been trying (struggling) to add back the ALAC support in the RAOP audio which was present in Shairplay (and still works there, but seems to be using the older airplay protocol) , but was cut out when the mirror-protocol-only RPiPlay was derived from it..

If your app works great, I might just leave off further development of UxPlay, and recommend your app, or at least I might be able to see if your code gives any clue to what I am not doing right in UxPlay for ALAC (AAC-ELD is working fine, and I haven't been able to test "legacy" AAC (AAC-LC) because my iPads only stream either AAC-ELD (with airplay-mirror protocol) or ALAC with (airplay only protocol).

Provide license

Hello, I am referencing your code recently. Could you provide the license of your repository? I found that your repository does not add any license. Thank you.

Wiki correction in "AirTunes Audio Data Setup"

Stephano, you have a "cut-and-paste" error in the Wiki document in the Air Tunes Audio Data Setup response section.

You repeated (by cut-and-paste?) the eventPort/timingPort port response from the first setup request.

After the "streams" request for type 96, the response should be dataPort/controlPort/96
(like the dataPort/110 "streams" response for type 110).

Can't run with debug mode

because DUMP feature is depending on your environment. For me, /Users/steebono is not exists.

// Replace '/Users/steebono/Desktop/dump/' in all source codes w/ your path
if (!Directory.Exists("/Users/steebono/Desktop/dump/"))
{
Directory.CreateDirectory("/Users/steebono/Desktop/dump/");
}
if (!Directory.Exists("/Users/steebono/Desktop/dump/frames/"))
{
Directory.CreateDirectory("/Users/steebono/Desktop/dump/frames/");
}
if (!Directory.Exists("/Users/steebono/Desktop/dump/out/"))
{
Directory.CreateDirectory("/Users/steebono/Desktop/dump/out/");
}
if (!Directory.Exists("/Users/steebono/Desktop/dump/pcm/"))
{
Directory.CreateDirectory("/Users/steebono/Desktop/dump/pcm/");
}

Error message:

System.UnauthorizedAccessException: Access to the path '/Users/steebono/Desktop/dump/' is denied. ---> System.IO.IOException: Permission denied

How to detect video in portrait or landscape mode

The video general in portrait mode.
But when I fullscreen the playing video and rotate the iPhone, the video change to landscape mode.
Currently, how to know the video in landscape mode and need to rotate the decode frame?
Any flag can distinguish this requirement?

Dear developer, I have a question. During the process of image projection, opening the iPhone Video playback software video will interrupt the current projection operation. What is the reason, or do you have relevant information. Thank you very much.

Dear developer, I have a question. During the process of image projection, opening the iPhone Video playback software video will interrupt the current projection operation. What is the reason, or do you have relevant information. Thank you very much.

Upload dll

Can you upload windows compiled dlls?
I've spent a bunch of hours but still can't compile. I am getting a lot of errors using your instructio
image_2022-01-06_14-35-10
n

airplay sender

Hello. Can you help me create client for your server? I can pay for help.

How to determine iPhone left or right rotate 90 degree?

Hi SteeBono,

Currently I can use the Width, Height, WidthSource and HeightSource to determine iPhone is default in Portrait mode or in Landscape (rotate 90 degree) mode.
But I don't know how to determine iPhone left or right rotate and than I can only rotate my video correctly in left rotate mode but up side down video in right rotate mode.
Have you know how to find the flag that indicate iPhone in left or right rotate mode?
Thank you.

Cannot receive audio data 0x56

How to receive audio session successfully?
I can only receive type 110 to start MirroringListener.
But never receive type 96 to start AudioListener.

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.