X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fservice%2Fservicemp3.cpp;h=fafbb3a6b273da81f47d489fb41bfcd70b19a4c6;hp=5fe15c1e5d762a97a40c3815d19fe1c60c6fef37;hb=30da484f79db1d8210a3dcb31b359484873dc240;hpb=da583812c4b20dcf72b69415d65dc1398fd849ce diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 5fe15c1..fafbb3a 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -1,5 +1,3 @@ -#ifdef HAVE_GSTREAMER - /* note: this requires gstreamer 0.10.x and a big list of plugins. */ /* it's currently hardcoded to use a big-endian alsasink as sink. */ #include @@ -52,7 +50,6 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mp4"); extensions.push_back("mov"); extensions.push_back("m4a"); - extensions.push_back("m2ts"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -336,7 +333,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref) g_object_set (G_OBJECT (m_gst_playbin), "uri", uri, NULL); - int flags = 0x47; // ( == GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_TEXT ) + int flags = 0x47; // ( GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_TEXT ); g_object_set (G_OBJECT (m_gst_playbin), "flags", flags, NULL); g_free(uri); @@ -362,8 +359,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) gst_bin_add(GST_BIN(m_gst_subtitlebin), appsink); } -// GstPad *ghostpad = gst_ghost_pad_new("sink", gst_element_get_static_pad (appsink, "sink")); - GstPadTemplate *templ; templ = gst_static_pad_template_get (&subsinktemplate); @@ -374,11 +369,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref) g_object_set (G_OBJECT (appsink), "caps", caps, NULL); gst_caps_unref(caps); -// GstCaps* caps2 = gst_caps_from_string("text/plain; text/x-pango-markup; video/x-dvd-subpicture"); -// int ret = gst_pad_set_caps (ghostpad, caps2); -// gst_caps_unref(caps2); - - g_object_set (G_OBJECT (appsink), "async", FALSE, NULL); g_object_set (G_OBJECT (appsink), "sync", TRUE, NULL); g_object_set (G_OBJECT (appsink), "emit-signals", TRUE, NULL); @@ -1222,7 +1212,7 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) source = GST_MESSAGE_SRC(msg); sourceName = gst_object_get_name(source); -#if 0 +#if 1 if (gst_message_get_structure(msg)) { gchar *string = gst_structure_to_string(gst_message_get_structure(msg)); @@ -1259,16 +1249,16 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) } break; case GST_STATE_CHANGE_READY_TO_PAUSED: { -// GstElement *appsink = gst_bin_get_by_name(GST_BIN(m_gst_subtitlebin), "subtitle_sink"); + GstElement *appsink = gst_bin_get_by_name(GST_BIN(m_gst_subtitlebin), "subtitle_sink"); // GstElement *appsink = gst_bin_get_by_name(GST_BIN(m_gst_playbin), "subtitle_sink"); -// if (appsink) -// { -// g_object_set (G_OBJECT (appsink), "max-buffers", 2, NULL); -// g_object_set (G_OBJECT (appsink), "sync", FALSE, NULL); -// g_object_set (G_OBJECT (appsink), "emit-signals", TRUE, NULL); -// eDebug("eServiceMP3::appsink properties set!"); -// gst_object_unref(appsink); -// } + if (appsink) + { + g_object_set (G_OBJECT (appsink), "max-buffers", 2, NULL); + g_object_set (G_OBJECT (appsink), "sync", FALSE, NULL); + g_object_set (G_OBJECT (appsink), "emit-signals", TRUE, NULL); + eDebug("eServiceMP3::appsink properties set!"); + gst_object_unref(appsink); + } setAC3Delay(ac3_delay); setPCMDelay(pcm_delay); } break; @@ -1385,7 +1375,6 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) continue; GstStructure* str = gst_caps_get_structure(caps, 0); const gchar *g_type = gst_structure_get_name(str); - eDebug("AUDIO STRUCT=%s", g_type); audio.type = gstCheckAudioPad(str); g_codec = g_strdup(g_type); g_lang = g_strdup_printf ("und"); @@ -2040,7 +2029,6 @@ void eServiceMP3::pushSubtitles() { if ( frontpage.pango_page != 0) { -// eDebug("immediate show pango subtitle line"); m_subtitle_widget->setPage(*(frontpage.pango_page)); } else if ( frontpage.vob_page != 0) @@ -2156,6 +2144,7 @@ PyObject *eServiceMP3::getSubtitleList() Py_DECREF(tuple); stream_idx++; } + eDebug("eServiceMP3::getSubtitleList finished"); return l; } @@ -2274,6 +2263,3 @@ void eServiceMP3::setPCMDelay(int delay) } } -#else -#warning gstreamer not available, not building media player -#endif