LOCAL_LDLIBS := -landroid
include $(BUILD_SHARED_LIBRARY)
-GSTREAMER_PLUGINS = coreelements audiotestsrc videotestsrc ogg theora vorbis ffmpegcolorspace playback app audioconvert audiorate audioresample adder coreindexers gdp gio uridecodebin videorate videoscale typefindfunctions libvisual pango subparse
+GSTREAMER_PLUGINS = coreelements audiotestsrc videotestsrc ogg theora vorbis ffmpegcolorspace playback app audioconvert audiorate audioresample adder coreindexers gdp gio uridecodebin videorate videoscale typefindfunctions libvisual pango subparse eglglessink
GSTREAMER_STATIC_PLUGINS_PATH=/home/fluendo/cerbero/dist/android_arm/lib/gstreamer-0.10/static
GSTREAMER_MK_PATH=/home/fluendo/cerbero/data/ndk-build/
include $(GSTREAMER_MK_PATH)/gstreamer.mk
#include <android/native_window_jni.h>
#include <gst/gst.h>
#include <pthread.h>
+#include <gst/interfaces/xoverlay.h>
GST_DEBUG_CATEGORY_STATIC (debug_category);
#define GST_CAT_DEFAULT debug_category
GST_DEBUG ("Creating pipeline in CustomData at %p", data);
- data->pipeline = gst_parse_launch ("videotestsrc num-buffers=1000 ! fakesink", NULL);
+ data->pipeline = gst_parse_launch ("videotestsrc ! eglglessink", NULL);
/* Instruct the bus to emit signals for each received message, and connect to the interesting signals */
bus = gst_element_get_bus (data->pipeline);
}
data->native_window = ANativeWindow_fromSurface(env, surface);
GST_DEBUG ("Got Native Window %p", data->native_window);
+
+ gst_x_overlay_set_window_handle (GST_X_OVERLAY (data->pipeline), (guintptr)data->native_window);
}
void gst_native_surface_finalize (JNIEnv *env, jobject thiz) {
GST_DEBUG ("Releasing Native Window %p", data->native_window);
ANativeWindow_release (data->native_window);
data->native_window = NULL;
+
+ gst_x_overlay_set_window_handle (GST_X_OVERLAY (data->pipeline), (guintptr)NULL);
}
static JNINativeMethod native_methods[] = {