X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3882780399736a3d9ca6c2ad70fa806322fe52b9..404743faf9cbf0c70d68ca047f2a8e914a0d94b5:/lib/service/servicemp3.cpp diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp index 45ec5959..569272b0 100644 --- a/lib/service/servicemp3.cpp +++ b/lib/service/servicemp3.cpp @@ -321,11 +321,11 @@ eServiceMP3::eServiceMP3(const char *filename): m_filename(filename), m_pump(eAp switch (sourceinfo.containertype) { case ctMPEGTS: - demux_type = "flutsdemux"; + demux_type = "mpegtsdemux"; break; case ctMPEGPS: case ctVCD: - demux_type = "flupsdemux"; + demux_type = "mpegpsdemux"; break; case ctMKV: demux_type = "matroskademux"; @@ -838,6 +838,7 @@ int eServiceMP3::getInfo(int w) case sGenre: case sVideoType: case sTimeCreate: + case sUser+10: case sUser+12: return resIsString; case sCurrentTitle: @@ -886,6 +887,9 @@ std::string eServiceMP3::getInfoString(int w) case sGenre: tag = GST_TAG_GENRE; break; + case sUser+10: + tag = GST_TAG_AUDIO_CODEC; + break; case sVideoType: tag = GST_TAG_VIDEO_CODEC; break; @@ -1025,7 +1029,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)); @@ -1047,11 +1051,26 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg) gst_message_parse_error (msg, &err, &debug); g_free (debug); - eWarning("Gstreamer error: %s (%i)", err->message, err->code ); - if ( err->domain == GST_STREAM_ERROR && err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ) + eWarning("Gstreamer error: %s (%i) from %s", err->message, err->code, sourceName ); + if ( err->domain == GST_STREAM_ERROR ) { - if ( g_strrstr(sourceName, "videosink") ) - m_event((iPlayableService*)this, evUser+11); + if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND ) + { + if ( g_strrstr(sourceName, "videosink") ) + m_event((iPlayableService*)this, evUser+11); + else if ( g_strrstr(sourceName, "audiosink") ) + m_event((iPlayableService*)this, evUser+10); + } + else if ( err->code == GST_STREAM_ERROR_FAILED && g_strrstr(sourceName, "file-source") ) + { + eWarning("error in tag parsing, linking mp3parse directly to file-sink, bypassing id3demux..."); + GstElement *source = gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"file-source"); + GstElement *parser = gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"audiosink"); + gst_element_set_state(m_gst_pipeline, GST_STATE_NULL); + gst_element_unlink(source, gst_bin_get_by_name(GST_BIN(m_gst_pipeline),"id3demux")); + gst_element_link(source, parser); + gst_element_set_state (m_gst_pipeline, GST_STATE_PLAYING); + } } g_error_free(err); break;