From 75ee954ea2fe2d5717f6965ba98148f7a059de7f Mon Sep 17 00:00:00 2001 From: Ilya Smelykh Date: Sun, 30 Jun 2013 18:17:05 +0700 Subject: examples: enable audio in testegl example --- examples/egl/testegl.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/egl/testegl.c b/examples/egl/testegl.c index 7b4ccf4..0e9b5c2 100644 --- a/examples/egl/testegl.c +++ b/examples/egl/testegl.c @@ -227,6 +227,21 @@ TRACE_VC_MEMORY_DEFINE_ID (gid0); TRACE_VC_MEMORY_DEFINE_ID (gid1); TRACE_VC_MEMORY_DEFINE_ID (gid2); +typedef enum +{ + GST_PLAY_FLAG_VIDEO = (1 << 0), + GST_PLAY_FLAG_AUDIO = (1 << 1), + GST_PLAY_FLAG_TEXT = (1 << 2), + GST_PLAY_FLAG_VIS = (1 << 3), + GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4), + GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5), + GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6), + GST_PLAY_FLAG_DOWNLOAD = (1 << 7), + GST_PLAY_FLAG_BUFFERING = (1 << 8), + GST_PLAY_FLAG_DEINTERLACE = (1 << 9), + GST_PLAY_FLAG_SOFT_COLORBALANCE = (1 << 10) +} GstPlayFlags; + static gboolean got_gl_error (const char *wtf) { @@ -1355,7 +1370,8 @@ init_playbin_player (APP_STATE_T * state, const gchar * uri) /* Instantiate and configure playbin */ state->pipeline = gst_element_factory_make ("playbin", "player"); g_object_set (state->pipeline, "uri", uri, - "video-sink", vsink, "audio-sink", asink, "flags", (1 << 6), NULL); + "video-sink", vsink, "audio-sink", asink, "flags", + GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_AUDIO, NULL); return TRUE; } -- cgit v1.2.3