X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fservice%2Fservicemp3.cpp;h=bb75a063f13911f5c29d215b646cd97baa512730;hp=6aac29e193f4e884f7e21c01352a590d5405ff3c;hb=3d5f795eba816f4ef9e487cefe6e12f1b5c589c4;hpb=418bb7f62c7a102f16dfd6a509680b6921486a6c diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp old mode 100644 new mode 100755 index 6aac29e..bb75a06 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -47,6 +47,10 @@ eServiceFactoryMP3::eServiceFactoryMP3() extensions.push_back("mp4"); extensions.push_back("mov"); extensions.push_back("m4a"); + extensions.push_back("flv"); + extensions.push_back("3gp"); + extensions.push_back("3g2"); + extensions.push_back("dts"); sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions); } @@ -326,7 +330,8 @@ eServiceMP3::eServiceMP3(eServiceReference ref) uri = g_filename_to_uri(filename, NULL, NULL); - eDebug("eServiceMP3::playbin2 uri=%s", uri); + //eDebug("eServiceMP3::playbin2 uri=%s", uri); + eDebug("eServiceMP3::playbin2"); m_gst_playbin = gst_element_factory_make("playbin2", "playbin"); if (!m_gst_playbin) @@ -449,7 +454,8 @@ RESULT eServiceMP3::stop() //GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(m_gst_playbin),GST_DEBUG_GRAPH_SHOW_ALL,"e2-playbin"); - eDebug("eServiceMP3::stop %s", m_ref.path.c_str()); + //eDebug("eServiceMP3::stop %s", m_ref.path.c_str()); + eDebug("eServiceMP3::stop service.."); gst_element_set_state(m_gst_playbin, GST_STATE_NULL); m_state = stStopped; @@ -696,8 +702,6 @@ RESULT eServiceMP3::isCurrentlySeekable() return 0; if (m_state != stRunning) return 0; - if (m_sourceinfo.is_streaming) - return 0; g_object_get (G_OBJECT (m_gst_playbin), "video-sink", &sink, NULL); @@ -1253,7 +1257,7 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) GError *err; gst_message_parse_error (msg, &err, &debug); g_free (debug); - eWarning("Gstreamer error: %s (%i) from %s", err->message, err->code, sourceName ); + eWarning("Gstreamer error: %s (domain:%i, code:%i) from %s", err->message, err->domain, err->code, sourceName ); if ( err->domain == GST_STREAM_ERROR ) { if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ) @@ -1264,6 +1268,11 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) m_event((iPlayableService*)this, evUser+10); } } + else //if( err->domain == 1232 ) + { + if ( err->code == 5 ) + m_event((iPlayableService*)this, evUser+20); + } g_error_free(err); break; } @@ -1404,18 +1413,21 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) { if ( gst_is_missing_plugin_message(msg) ) { - GstCaps *caps; - gst_structure_get (msgstruct, "detail", GST_TYPE_CAPS, &caps, NULL); - std::string codec = (const char*) gst_caps_to_string(caps); - gchar *description = gst_missing_plugin_message_get_description(msg); - if ( description ) + GstCaps *caps= NULL; + gboolean ret = gst_structure_get (msgstruct, "detail", GST_TYPE_CAPS, &caps, NULL); + if (ret) { - eDebug("eServiceMP3::m_errorInfo.missing_codec = %s", codec.c_str()); - m_errorInfo.error_message = "GStreamer plugin " + (std::string)description + " not available!\n"; - m_errorInfo.missing_codec = codec.substr(0,(codec.find_first_of(','))); - g_free(description); + std::string codec = (const char*) gst_caps_to_string(caps); + gchar *description = gst_missing_plugin_message_get_description(msg); + if ( description ) + { + eDebug("eServiceMP3::m_errorInfo.missing_codec = %s", codec.c_str()); + m_errorInfo.error_message = "GStreamer plugin " + (std::string)description + " not available!\n"; + m_errorInfo.missing_codec = codec.substr(0,(codec.find_first_of(','))); + g_free(description); + } + gst_caps_unref(caps); } - gst_caps_unref(caps); } else {