Revert "ServiceMP3: send evUpdatedInfo only the first time bitrate changes"
authorAthanasios Oikonomou <athoik@gmail.com>
Sat, 5 Dec 2015 07:51:58 +0000 (09:51 +0200)
committerErik Slagter <erik@openpli.org>
Sat, 5 Dec 2015 09:20:39 +0000 (10:20 +0100)
This reverts commit 1986a5aabf24d5fb95865a7a11c08498d7665964.

There are problems with shoutcast, missing information like title because bitrate is included
in mesage tag. More info here: http://forums.openpli.org/topic/29501-gstreamer-10/page-107#entry517381

A proper patch for sending bitrate changes was included for review in GStreamer: https://bugzilla.gnome.org/attachment.cgi?id=315996&action=diff

(cherry picked from commit c6998f01ee69b0fadcbe5a63a41a1e1d1476ab53)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/service/servicemp3.cpp
lib/service/servicemp3.h

index 5000224..b180476 100644 (file)
@@ -403,7 +403,6 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        m_subtitle_sync_timer = eTimer::create(eApp);
        m_streamingsrc_timeout = 0;
        m_stream_tags = 0;
-       m_bitrate = 0;
        m_currentAudioStream = -1;
        m_currentSubtitleStream = -1;
        m_cachedSubtitleStream = 0; /* report the first subtitle stream to be 'cached'. TODO: use an actual cache. */
@@ -1868,22 +1867,6 @@ void eServiceMP3::gstBusCall(GstMessage *msg)
                                if (m_stream_tags)
                                        gst_tag_list_free(m_stream_tags);
                                m_stream_tags = result;
-
-                               /* send evUpdatedInfo only when bitrate changes from 0 in order to reduce events */
-                               guint value;
-                               if(gst_tag_list_get_uint(m_stream_tags, GST_TAG_BITRATE, &value))
-                               {
-                                       if(!m_bitrate && value)
-                                       {
-                                               m_bitrate = value;
-                                       }
-                                       else
-                                       {
-                                               m_bitrate = value;
-                                               gst_tag_list_free(tags);
-                                               break;
-                                       }
-                               }
                        }
 
                        const GValue *gv_image = gst_tag_list_get_value_index(tags, GST_TAG_IMAGE, 0);
index 55df3f7..ef243bc 100644 (file)
@@ -322,7 +322,6 @@ private:
        int m_state;
        GstElement *m_gst_playbin, *audioSink, *videoSink;
        GstTagList *m_stream_tags;
-       guint m_bitrate;
 
        eFixedMessagePump<ePtr<GstMessageContainer> > m_pump;