Posts List

Profiling native NDK code in Android

This week I had the dubius honor of trying to find out why a native subsystem of PSPDFKit is performing orders of magnituted slower than it should. As it turns out, NDK tooling on Android is exceptionally bad. A quick Google search found two ways of profiling NDK code running on an Android device: 1. Using android-ndk-profiler project from GitHub. This project provides missing gnu_mcount method implementation needed by -pg compile flag instrumentation.

Encoding videos for YouTube with FFMpeg

One of the most commonly asked questions on Freenode/#ffmpeg is how to use it to encode videos for YouTube in accordance to Googles Recommended upload encoding settings. Conforming to the guideline is rather simple, but not straightforward for the newcomer. 1. Get newish ffmpeg Get decently new and updated ffmpeg - the current stable release is 2.7. OS X: brew install ffmpeg Windows: Get a 64-bit static build from Zeranoe’s site.

Project spotlight: PySolarized Solr library

There are numerous Python/Solr libraries out there, each having a different subset of functionality. Obviously, as per Murphy’s law, none of them had a set of features I required. So I rolled my own - PySolarized! I wrote PySolarized because I needed a Solr connector which would dispatch and query documents to multiple cores.

Playing video with effects using OpenGL on Android

The trick to playing video with effects on Android is to use OpenGL for actual frame display and then use (API 11+) SurfaceTexture class to render video as a texture on screen. See GitHub for full app demo. The process has two steps: 1. Initialize OpenGL Context to render on a SurfaceTexture Since there is no SurfaceTexture equivalent of GLSurfaceView we have to initialize an OpenGL context manually. In bottom example we initialize OpenGL ES 2.0 context with disabled depth buffer prepared for 2D video rendering. We also define abstract draw metod to be extended with our drawing logic.

Solr slovenian lemmatizer updated with easier installation

I’ve just uploaded 1.1 update for Lemmagen lemmatizer for Solr, which is now a pure Java .JAR library and does not require installation of any additional files on your server. New version also updates package name and configuration attribute to be more consistent.