summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMXNodeInstance.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Cap pts gap between adjacent frames to specified valueChong Zhang2014-01-301-3/+23
| | | | | | | | | | | | | | | - In the scenario of cast mirroring, encoding could be suspended for prolonged periods. Limiting the pts gap to workaround the problem where encoder's rate control logic produces huge frames after a long period of suspension. - Repeat last frame a couple more times to get better quality on static scenes. - Fix the timestamp on repeat frames (it was not set) Bug: 11971963 Change-Id: I1d68ab3d269874bf3921aa429a985c5f63e428c7
* Properly handle executing->idle in GraphicBufferSourceAndreas Huber2013-11-071-7/+12
| | | | | | | | | | ACodec has initiated the transition from exectuing->idle and is waiting for the component to return all buffers so they can be freed. It's counter productive and with some vendors harmful to submit additional buffers to the component from this point on. Change-Id: I332be254a1faf94902c77b5792a373ab447e44d3 related-to-bug: 11573543
* IOMX: Add prepareForAdaptivePlayback methodLajos Molnar2013-10-031-0/+34
| | | | | | | | | | | | | prepareForAdaptivePlayback is the fallback mechanism to support seamless resolution change for devices that do not support dynamic output buffers. It is up to the codecs to handle this appropriately, but codecs that do not handle dynamic output buffers would request enough buffers up to the requested size in this method to avoid port reconfiguration on resolution changes. Change-Id: I58d4aa8ef1359ea3472735bbe9140c3132039b3d Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10192531 Related-to-bug: 7093648
* Optionally repeat the previously submitted frame to the encoderAndreas Huber2013-08-131-5/+16
| | | | | | | if no new frame has been delivered by surface flinger within the timeout interval. Change-Id: I282f1b726dfe5646b178d7858d6f5d4f5a264fde
* IOMX: add updateGraphicBufferInMeta method for metadata modeLajos Molnar2013-08-061-0/+20
| | | | | | | | | This is used to set the handle in the metadata buffer that is valid in the mediaserver process, as well as to keep a reference for the graphic buffers in BufferMeta. Change-Id: I46bb68d8bed894f357eeeb25368360d11b276634 Signed-off-by: Lajos Molnar <lajos@google.com>
* Update error messageAndy McFadden2013-07-241-1/+2
| | | | | | | | The color format used for surfaces has two different names. The one in the error message is the "native" name, which doesn't mean anything to external developers. Change-Id: Ic0561f4ad12970b0e0a60bd17b4e3997af1a9f0e
* Support "suspension" of a video encoder in "surface-input" mode.Andreas Huber2013-07-171-10/+47
| | | | | | i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
* Avoid a deadlock during EmptyBufferDoneAndreas Huber2013-05-201-11/+17
| | | | | | | | The deadlock happens withen in the case where we use an OMX encoder with a GraphicBufferSource. Bug: 8329090 Change-Id: Icec58bb85ff3839ad1a2e3eca02fa9d6d133ca45
* OMXNodeInstance: actually fix OMX_GetExtIndex loggingJamie Gennis2013-04-181-4/+5
| | | | | Bug: 8538872 Change-Id: I228746e8eb502af4bba4054caa4d8569fab35025
* OMXNodeInstance: fix OMX_GetExtensionIndex loggingJamie Gennis2013-04-091-17/+15
| | | | | | | | This change fixes the logging of OMX_GetExtensionIndex errors. Under certain circumstances these errors are not harmful and should not be logged. Bug: 8538872 Change-Id: I19a13d29ca6263454a9a7a8be205e10363725f31
* GraphicBufferSource fixesAndy McFadden2013-03-121-1/+2
| | | | | | | | | | | | | | Various fixes: - Set the maximum number of BQ buffers we're allowed to acquire equal to the actual number of codec buffers. That way we keep the codec as full as possible, and never try to acquire more than we're allowed from the BufferQueue. - Actually use "end of stream sent" flag. - Name the BufferQueue (for debug messages). Bug 8359403 Change-Id: I3b8c1f679bbebf6a89e623e13ca029eda7f657ba
* Correct MediaCodec + Surface behaviorAndy McFadden2013-03-051-5/+12
| | | | | | | | | | | | | | | | | Assorted tweaks: - Allow signalEndOfInputStream() before ACodec is in Executing state (added message to two more states). - Return an error if signalEndOfInputStream() is called a second time on the same stream. - Require AndroidOpaque color format in createInputSurface(). - Disallow dequeueInputBuffer() after an input surface has been created (boolean flag in MediaCodec tracks it). - Discard input surface when encoder is re-configure()ed (drop OMXNodeInstance's ref when we go back to Loaded). Bug 7991062 Change-Id: Iff30f3036e14eb5a2f6536910dcf11aba33031ee
* Implement Surface input to MediaCodec.Andy McFadden2013-03-041-0/+136
| | | | | | | | | Also, renamed a CHECK_INTERFACE macro that was clashing with the Binder version. Bug 7991062 Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
* Switched to use the header files in /frameworks/nativeJames Dong2012-03-121-1/+1
| | | | | | | | and deleted the duplicate header files in /frameworks/base o related-to-bug: 6044887 Change-Id: I17e0692d9a9b5c8796ded36677c833ca8ab36795
* Move away from MediaDebug and use ADebug insteadJames Dong2012-02-101-3/+3
| | | | Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-17/+17
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-1/+1
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-6/+6
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Stagefright: idle OMX after ANW errorsJamie Gennis2011-10-191-0/+8
| | | | | | | | | | | | | | This change fixes an issue in Stagefright where the state of an OMXCodec object can get out of sync with the state of the OMX component. In particular, if one of the ANativeWindow functions failed and put the OMXCodec into the ERROR state, this would cause Stagefright to skip doing the Executing -> Idle transition. Without this transition the freeBuffersOnPort call would never be made, and the MediaBuffers would end up being leaked (which would also leak the Gralloc buffers they reference). Bug: 5333695 Change-Id: I85ea0cf92d18e7ef6d35c7d1e2a7b4e2c9745d34
* Merge "Remove useAndroidNativeBuffer(2) warning message."Chih-Chung Chang2011-08-211-3/+0
|\
| * Remove useAndroidNativeBuffer(2) warning message.Chih-Chung Chang2011-08-181-3/+0
| | | | | | | | Change-Id: I3e9765e7271d80fda302e521501720bf8c13e5c7
* | Stagefright: fix a compiler warningJamie Gennis2011-08-111-1/+1
|/ | | | Change-Id: Ia6b2027dfe80960450156d918bdd7fe1567cafea
* Stagefright: add support for gralloc OMX_UseBuffer.Anu Sundararajan2011-06-231-0/+65
| | | | | | | | | | | | | | | XXX: This change should go along with a documentation change to HardwareAPI.h that describes the new extension. This change adds support for passing a buffer_handle_t to OMX_UseBuffer during OMXCodec initialization. This new way of passing the buffer_handle_t's replaces the old OMX_SetParameter-based approach, and this change deprecates that interface, but still supports it for OMX IL implementations that do not support the new interface. Change-Id: If9c1cb3c6c349c54dab094aeb8af13eae9f85271 Signed-off-by: Jamie Gennis <jgennis@google.com> Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
* Squashed commit of the following:Andreas Huber2011-05-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c80992e419ed567abef451042f09c4958534b90d Author: Andreas Huber <andih@google.com> Date: Wed May 11 14:00:07 2011 -0700 Support for the mp3 audio decoder as a software OMX component. Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807 commit a358d0e1bf2a88897887445f42ccdda0f5f2f528 Author: Andreas Huber <andih@google.com> Date: Wed May 11 13:11:23 2011 -0700 Support for G.711 alaw and mulaw decoders as software OMX components Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03 commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553 Author: Andreas Huber <andih@google.com> Date: Thu May 5 15:43:32 2011 -0700 Instead of using an RGB surface and conversion yuv420->rgb565 convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead. Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5 related-to-bug: 4394005 commit 69469d3bd84425777b11b9fc938c5e0c61af26a7 Author: Andreas Huber <andih@google.com> Date: Tue May 10 15:46:42 2011 -0700 voip mustn't link against libstagefright.so Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3 Author: Andreas Huber <andih@google.com> Date: Tue May 10 14:37:10 2011 -0700 Remove most non-OMX software decoders by default Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0 commit a4de62c37b335c318217765403a9fb282b20a216 Author: Andreas Huber <andih@google.com> Date: Mon May 9 16:50:02 2011 -0700 Conditionally build the old-style software decoders. Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846 Author: Andreas Huber <andih@google.com> Date: Mon May 9 16:13:12 2011 -0700 Support for MPEG4 and H.263 video decoders as soft OMX components. Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0 Author: Andreas Huber <andih@google.com> Date: Mon May 9 11:49:10 2011 -0700 Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder. Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8 commit c0574362f8dc3319ce84d981097867062a698527 Author: Andreas Huber <andih@google.com> Date: Mon May 9 11:28:53 2011 -0700 Support for the AMR decoders (NB and WB) as Soft OMX components. Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754 commit 3e5575a8f0e27a490cb7bde77bd9456087837f08 Author: Andreas Huber <andih@google.com> Date: Wed May 4 13:41:25 2011 -0700 Signal an error if the aac decoder failed to initialize from codec specific data. Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209 related-to-bug: 4272179 commit f94aeaa9886e772ff4823e671ed237096649f4af Author: Andreas Huber <andih@google.com> Date: Tue May 3 13:07:38 2011 -0700 Software OMX nodes don't (yet?) support native_window mode. Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d commit eefdfabac8dc659e00daa56da69aea705c49cb67 Author: Andreas Huber <andih@google.com> Date: Tue May 3 12:57:16 2011 -0700 Fixing the OMX tests to refer to appropriate files from test content. Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff commit f31b7326aef14b6a1b7946520a9688f092e844d5 Author: Andreas Huber <andih@google.com> Date: Tue May 3 11:08:38 2011 -0700 Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against. Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9 commit b7f0343879e4df06f0a1c9bfece24df557954e2f Author: Andreas Huber <andih@google.com> Date: Mon May 2 15:58:36 2011 -0700 Support for the AVC software decoder as an OMX component. Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2 commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977 Author: Andreas Huber <andih@google.com> Date: Fri Apr 29 12:05:37 2011 -0700 Fix Vorbis OMX decoder's component role. Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5 commit 089c91f2333062e196c7afd5fb0ca914878aa474 Author: Andreas Huber <andih@google.com> Date: Fri Apr 29 12:05:18 2011 -0700 Support vorbis_decoder OMX testing. Change-Id: I1985be178a12ae3f8768bc72067d9236238be170 commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad Author: Andreas Huber <andih@google.com> Date: Fri Apr 29 12:01:46 2011 -0700 SoftVorbis OMX component now respects the number of valid frames per page. Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03 commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b Author: Andreas Huber <andih@google.com> Date: Fri Apr 29 10:59:38 2011 -0700 Support for the vorbis audio decoder as a soft OMX component. Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492 commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16 Author: Andreas Huber <andih@google.com> Date: Fri Apr 29 10:07:50 2011 -0700 VPX decoder now properly resizes buffers after a port settings change. Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831 commit 35c7168243cb69849d88911144a2c7fdfed5c54e Author: Andreas Huber <andih@google.com> Date: Thu Apr 28 13:23:34 2011 -0700 Support for the VPX video decoder as a Software OMX component. Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71 commit 923b2534b4211fc5405377b5190bfa6f2dd27f32 Author: Andreas Huber <andih@google.com> Date: Thu Apr 28 11:34:40 2011 -0700 Table-based registration of soft omx components. Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937 commit 04a88f3edb2266a463da9c4481b80178be460902 Author: Andreas Huber <andih@google.com> Date: Thu Apr 28 11:22:31 2011 -0700 Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port. Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb commit 9d70ca68445e7c40f5c9b2d12466e468f514de88 Author: Andreas Huber <andih@google.com> Date: Wed Apr 27 15:03:18 2011 -0700 Use the new soft OMX aac decoder for HTTP live playback. Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f commit 213fe4a10ea93cce08e8622dc3908053f29878a1 Author: Andreas Huber <andih@google.com> Date: Tue Apr 12 16:39:45 2011 -0700 Foundation for supporting software decoders as OMX components Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816 Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
* Ignore OMX codec messages once we're in ERROR state.Andreas Huber2011-03-281-1/+1
| | | | | Change-Id: I2bdf58ed705a641be1f3aec89fa41cada6acfc96 related-to-bug: 4175573
* Add an OMX IL API for querying buffer usage flags.Jamie Gennis2011-02-281-0/+39
| | | | | | | | | | This change defines an OpenMAX IL API for querying from the IL component the gralloc buffer usage flags that should be used to allocate the buffers. It also adds the Stagefright plumbing for using the new OMX IL API. Change-Id: I046b5e7be70ce61e2a921dcdc6e3aa9324d19ea6 Related-Bug: 3479027
* More instrumentation to track down the hardware decoder not shutting down bug.Andreas Huber2011-01-261-1/+19
| | | | | Change-Id: I3f31b6fdf5c90b436567bbce578dcbc4666ed7c2 related-to-bug: 3362836
* OMX extension to support storing meta data in video input buffers during ↵James Dong2010-10-211-0/+31
| | | | | | | | recording bug - 3042125 Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
* Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-031-1/+98
| | | | | | | | | | | This change defines the two OMX_SetParameter calls that enable OMX codecs to interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and OMXNodeInstance classes to use these new APIs. This is try 2 for this change, after reverting the first one because it broke the build. Change-Id: I94249b72bdb5d5719360f03d7935fcca4ece5028
* Revert "Merge "Add the new Stagefright ANativeWindow OMX codec API.""Jamie Gennis2010-09-011-87/+1
| | | | | This reverts commit 8a643b411e1802977f742709113ce01b06a18e12, reversing changes made to 73ea9beaf8eb3d0027e78cbc0ac5e626c3f8deb4.
* Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-011-1/+87
| | | | | | | | This change defines the two OMX_SetParameter calls that enable OMX codecs to interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and OMXNodeInstance classes to use these new APIs. Change-Id: Ibfbf893dc3513db0b3d3221bec5708c77287cddc
* Various fixes to enable recording on passion and nexus1.Andreas Huber2010-04-091-0/+6
| | | | Change-Id: I75a461c9882e2449082ad754ee7b231c1ceec039
* Properly handle errors during the codec configuration phase, attempt to ↵Andreas Huber2010-03-161-1/+9
| | | | | | | revert to next available (likely software-) codec if configuration fails. Change-Id: Id1c699711e30139c9cc29df972254b5ba026e6fb related-to-bug: 2517098
* During shutdown, don't loop forever on a state transition to OMX_StateInvalid.Andreas Huber2010-02-081-2/+8
| | | | related-to-bug: 2420917
* Fix no-copy-overhead OMXCodec implementation to actually work.Andreas Huber2010-01-201-1/+3
|
* Squashed commit of the following:Andreas Huber2009-12-171-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:28:23 2009 -0800 This H264 file shows a certain problem even better. commit 3245f1f3b7471975aeeb824a756c987abd610f55 Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:20:08 2009 -0800 Using only the QA testfiles now. commit 074817eb3816c5dd70858a3594e3b92d799d873b Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 16:17:39 2009 -0800 Yay, roles are back again now that the API is in place. commit 6d847e4932cc38301ae27cb7283b7f1553a95457 Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 13:01:20 2009 -0800 Added commandline option for specifying the random seed for reproducable tests. commit 62ab37b26336eaa67e49791c41c996acb6acee3f Author: Andreas Huber <andih@google.com> Date: Mon Dec 14 10:53:27 2009 -0800 When issuing a seek it is important that only the first MediaSource::read call has the seek option. commit e77c46644b2fb6862bafa3569f7d304252074f1e Author: Andreas Huber <andih@google.com> Date: Mon Dec 7 16:39:07 2009 -0800 Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource> commit 6df56915bd55a9445b3c6f953d3cc251d81579b8 Author: Andreas Huber <andih@google.com> Date: Thu Dec 3 14:25:36 2009 -0800 Temporarily disable support for querying the roles of OMX components. commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 13:36:52 2009 -0800 Disregard EOS events, slightly change the way the EOS flag on output buffers is handled. commit 4c382fbc9aebee8197d5988d04378062809e7c48 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 09:37:24 2009 -0800 New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec. commit c762eac3e44309592b61a168d66e091cf609fa03 Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 14:13:43 2009 -0800 Fix a typo. commit 50540a59b65c7d476b0193c7494cd75895e6ca6d Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 09:48:35 2009 -0800 Some more fine tuning of the unit tests, make MPEG4Extractor less verbose. commit 1157a7e52a0636706caa235abe16d2ff8a0b8140 Author: Andreas Huber <andih@google.com> Date: Wed Oct 28 12:01:01 2009 -0700 Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default. commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a Author: Andreas Huber <andih@google.com> Date: Mon Oct 26 09:45:26 2009 -0700 Initial check-in of unit tests for OMX components.
* Enable proper cleanup of OMX nodes managed through stagefright.Andreas Huber2009-12-041-5/+7
|
* Squashed commit of the following:Andreas Huber2009-12-031-2/+3
| | | | | | | | | | | | | | commit 543e192bf2ae13f573dc4c4e53b239ed4ea00e81 Author: Andreas Huber <andih@google.com> Date: Thu Dec 3 11:33:57 2009 -0800 stagefright now acts as the OMX Master, vendors supply their own plugins through libstagefrighthw. In OpenCore-enabled builds we now sit on top of PVMaster... commit 3cbfdbd9cecadbb77b63125c62883bf1065884fe Author: Andreas Huber <andih@google.com> Date: Wed Dec 2 12:39:07 2009 -0800 More OMX infrastructure, stagefright is now taking over the OMX Master, multiplexing all contributing OMX implementations under a common interface.
* Handle OMX_StateInvalid in emergency shutdown properly (by ignoring it and ↵Andreas Huber2009-11-061-0/+1
| | | | hoping for the best) instead of asserting.
* When freeing an OMX node, attempt to transition it from its current state ↵Andreas Huber2009-10-261-0/+89
| | | | all the way to "Loaded" in order to properly free any allocated buffers.
* Make stagefright a little less verbose. Fix heap corruption for real.Andreas Huber2009-10-231-5/+2
|
* Still don't know why the heap gets corrupted, but not deleting the ↵Andreas Huber2009-10-221-1/+2
| | | | OMXNodeInstance appears to prevent this from happening.
* Reimplement the OMX backend for stagefright.Andreas Huber2009-10-161-0/+373
Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup. Changed APIs to conform to the rest of the system.