Commit Graph

127 Commits

Author SHA1 Message Date
Cameron Gutman 732ea8a3ac Optimize the reinitialization of the buffer descriptor in the receive threads 2013-11-24 17:29:12 -05:00
Cameron Gutman 9a3c5dac0a Suppress connection failure warnings when closing gracefully 2013-11-24 21:52:33 -05:00
Cameron Gutman 7d39ac2a45 Reuse a single AvByteBufferDescriptor when depacketizing H264 instead of allocating many of them per packet 2013-11-24 21:51:09 -05:00
Cameron Gutman fb8b6fd7f5 Add configurable ffmpeg performance options 2013-11-24 21:46:47 -05:00
Cameron Gutman c8b94217cf Set the datagram destination manually for ping packets rather than connecting the datagram socket explicitly. This prevents the ICMP port unreachable message from being propagated to the receive thread which causes an IOException. 2013-11-23 17:07:33 -05:00
Cameron Gutman 0fe7549942 Loosen the connection timeouts. Remove the HTTP request timeout because it depends on how long it takes for the requested app to start. 2013-11-23 16:48:46 -05:00
Cameron Gutman 022866288d Add more logging for exceptions. 2013-11-23 14:06:51 -05:00
Cameron Gutman 125bcb370f Limit the size of queues. Switch to a blacklist instead of a whitelist for hardware decoding. Currently, Nvidia, TI, and Google H264 codecs are on the blacklist. Reenable large heap since we're allocating more objects now. 2013-11-23 02:44:10 -05:00
Cameron Gutman 4d5849f448 Add UI indications of the connection status and failure 2013-11-23 01:03:37 -05:00
Cameron Gutman c88d23001e Commit forgotten ConnectionStatusListener interface. Thanks to danielb7390 for pointing this out. 2013-11-22 22:13:39 -05:00
Cameron Gutman 2946966456 Whitelist the Exynos hardware H264 decoder 2013-11-22 02:13:02 -05:00
Cameron Gutman d00474c1cd Fix warning. 2013-11-22 00:31:39 -05:00
Cameron Gutman 49b2332f14 Make the IP textview single line with no suggestions. Set focus to the start streaming button by default. 2013-11-22 00:31:25 -05:00
Cameron Gutman db78af916d Handle decode units larger than the size of the decode unit buffer 2013-11-22 00:29:48 -05:00
Cameron Gutman e1a8f86d4f Make the virtual and hardware back buttons on the devices themselves work as the in-game back button. This is required for Shield's back button to work. 2013-11-21 19:56:44 -05:00
Cameron Gutman 80fdae3673 Request an IDR frame if a previous frame was lost or 2013-11-21 19:55:40 -05:00
Cameron Gutman e52b85a883 Restore the performance level fed into the AvcDecoder 2013-11-21 16:59:04 -05:00
Cameron Gutman 6bb215eddf Remove pooling code due to higher concurrency latency that resulted in a net loss of performance. 2013-11-21 16:40:27 -05:00
Cameron Gutman 1d7460e8b3 Revert "WIP optimization of object allocation and pools. There's currently a double free on the AvByteBufferDescriptor that I'm trying to track down."
This reverts commit 6600329580aace81321220d2e4000099ad27f4f7.
2013-11-21 16:25:10 -05:00
Cameron Gutman 3efa356bb8 Revert "Add double-free detection code to the pools"
This reverts commit 9cdcfd2522febcc2eb7f65d926a37cfa05f21323.
2013-11-21 16:25:01 -05:00
Cameron Gutman 45120e79e4 Revert "Fix the double-free bug and disable double free debugging."
This reverts commit 9bb395501172f754baacc1efe6f09af55627fa15.
2013-11-21 16:24:52 -05:00
Cameron Gutman ff50b5fdab Revert "Fix memory leaks of special NAL sequences"
This reverts commit d9987105d0d9c27e920b4113875e82b315d050a4.
2013-11-21 16:24:47 -05:00
Cameron Gutman e6959e66e4 Fix memory leaks of special NAL sequences 2013-11-21 14:36:17 -05:00
Cameron Gutman d5f59bb972 Remove large heap flag. 2013-11-21 13:08:07 -05:00
Cameron Gutman 9e4364f672 Fix the double-free bug and disable double free debugging. 2013-11-21 13:05:01 -05:00
Cameron Gutman acb3dc8881 Add double-free detection code to the pools 2013-11-21 12:55:05 -05:00
Cameron Gutman 7951c0fa13 WIP optimization of object allocation and pools. There's currently a double free on the AvByteBufferDescriptor that I'm trying to track down. 2013-11-21 12:24:45 -05:00
Cameron Gutman c42d40b8f6 Remove an extra frame copy that wasn't needed. Only update the stored frame if the previous frame had been displayed. Don't render the same frame again if there's no new frame to update. 2013-11-21 09:55:57 -05:00
Cameron Gutman ab9b7b5164 Discard the alpha channel of the surface since it's not used. Always use MED_PERF for the AvcDecoder configuration because it now works well enough on Tegra 3 that the image quality improvements are worth it. 2013-11-21 08:45:25 -05:00
Cameron Gutman 45664dac2a Draw directly to the surface buffer. Improve amount of decoding and rendering that can be done in parallel. Add performance levels and choose them by cpuinfo. Improves Tegra 3 performance significantly. 2013-11-21 08:38:49 -05:00
Cameron Gutman 54839e672d Fix multithreaded decoding to significantly improve Tegra 3 decoding performance. It's not as smooth as Tegra 4 CPU decoding or Snapdragon hardware decoding, but it's much better than it was before. 2013-11-20 03:07:52 -05:00
Cameron Gutman 9b46155af2 Log a message based on what type of decoding is being used 2013-11-20 01:35:39 -05:00
Cameron Gutman 5a4a0d55e3 Enable both landscape orientations 2013-11-20 01:33:58 -05:00
Cameron Gutman bd6338730d Don't decode video on the emulator for performance reasons. 2013-11-20 01:33:38 -05:00
Cameron Gutman f672befaa7 Revert an earlier commit that introduced a bug that caused initialization to crash 2013-11-20 00:59:12 -05:00
Cameron Gutman 34905dd01e Fix crashes caused by rendering to a surface on teardown 2013-11-20 00:32:37 -05:00
Cameron Gutman 16d629f5cf Remove jlibrtp (finally). CPU decoding support (works great on Tegra 4, not so well on Tegra 3) 2013-11-20 00:00:00 -05:00
Cameron Gutman 0504bed5e9 Fix ffmpeg library loading. Create a DecoderRenderer interface and use it to move the MediaCodec code into for Qualcomm devices. 2013-11-19 02:49:33 -05:00
Cameron Gutman 2c2e713166 Rework our JNI interface and add ffmpeg bindings for AVC decoding (WIP) 2013-11-18 18:58:49 -05:00
Cameron Gutman cca7df6c25 Reassemble AVC NALs when padding is reached, rather than waiting through several packets until the next AVC frame start NAL. Improves video latency and vulnerability to packet loss. 2013-11-17 16:50:45 -05:00
Cameron Gutman 10165f3166 Fix frame pacing issues on Snapdragon. Improve latency on Tegra (not perfect still). 2013-11-15 23:42:00 -05:00
Cameron Gutman 79db2ed584 Fix a bug with MAC address selection that caused it to always select the first adapter 2013-11-14 17:30:40 -05:00
Cameron Gutman 690df6e42c Add armeabi and x86 versions of libopus.a and build the libnv_opus_dec.so shared library for those platforms. Update armeabi-v7a library. Libopus.a binaries from https://github.com/brooss/krcam 2013-11-14 15:17:02 -05:00
Cameron Gutman ae65bbe3ca Add Moga controller support. 2013-11-12 03:10:23 -05:00
Cameron Gutman aa4e07ea2f Free audio packets back to the packet pool after decoding. 2013-11-12 02:19:58 -05:00
Cameron Gutman 4eaf68ae58 Lower the buffer size of the Opus decoder based on the data we're actual receiving. Handle invocations of the decoder with null data for packet loss indication. 2013-11-12 02:04:08 -05:00
Cameron Gutman 77786f9693 Display a warning if the active connection is metered. Find a proper MAC address for pairing (might require re-pair). Fix a possible infinite loop in the NvControl code. 2013-11-11 18:42:07 -05:00
Cameron Gutman 83ad55e436 Fix some ANRs and force-close errors when connection failures occur. 2013-11-11 17:21:50 -05:00
Cameron Gutman 4d80373f25 Shutdown streaming when the input connection breaks 2013-11-11 15:40:16 -05:00
Cameron Gutman 08f8942548 Fix Xbox 360 controller D-pad 2013-11-11 15:39:55 -05:00