experimentally implement vobsub display (fixes Ã#537, requires gst-plugin-dvdsub)
authorFraxinas <andreas.frisch@multimedia-labs.de>
Wed, 26 May 2010 14:45:23 +0000 (16:45 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Wed, 9 Jun 2010 08:06:26 +0000 (10:06 +0200)
lib/service/servicemp3.h

index 56a068b..d38dbb8 100644 (file)
@@ -47,9 +47,15 @@ public:
 typedef struct _GstElement GstElement;
 
 typedef enum { atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC } audiotype_t;
-typedef enum { stPlainText, stSSA, stSRT } subtype_t;
+typedef enum { stUnknown, stPlainText, stSSA, stSRT, stVOB } subtype_t;
 typedef enum { ctNone, ctMPEGTS, ctMPEGPS, ctMKV, ctAVI, ctMP4, ctVCD, ctCDA } containertype_t;
 
+struct SubtitlePage
+{
+       ePangoSubtitlePage *pango_page;
+       eVobSubtitlePage *vob_page;
+};
+
 class eServiceMP3: public iPlayableService, public iPauseableService,
        public iServiceInformation, public iSeekableService, public iAudioTrackSelection, public iAudioChannelSelection, 
        public iSubtitleOutput, public iStreamedService, public iAudioDelay, public Object
@@ -198,6 +204,7 @@ private:
        };
        int m_state;
        GstElement *m_gst_playbin;
+       GstElement *m_gst_subtitlebin;
        GstTagList *m_stream_tags;
        eFixedMessagePump<int> m_pump;
        std::string m_error_message;
@@ -206,10 +213,11 @@ private:
        void gstBusCall(GstBus *bus, GstMessage *msg);
        static GstBusSyncReply gstBusSyncHandler(GstBus *bus, GstMessage *message, gpointer user_data);
        static void gstCBsubtitleAvail(GstElement *element, gpointer user_data);
+       static void gstCBsubtitleCAPS(GObject *obj, GParamSpec *pspec, gpointer user_data);
        GstPad* gstCreateSubtitleSink(eServiceMP3* _this, subtype_t type);
        void gstPoll(const int&);
 
-       std::list<ePangoSubtitlePage> m_subtitle_pages;
+       std::list<SubtitlePage> m_subtitle_pages;
        ePtr<eTimer> m_subtitle_sync_timer;
        void pushSubtitles();
        void pullSubtitle();