72 GstBuffer *bufferValue;
74 unsigned char *bufferData;
75 unsigned int bufferSize;
76 #if GST_VERSION_MAJOR >= 1
93 GstMessage *messagePointer;
95 GstBuffer *messageBuffer;
101 messagePointer = msg;
103 messageBuffer = buffer;
108 if (messagePointer) gst_message_unref(messagePointer);
109 if (messagePad) gst_object_unref(messagePad);
110 if (messageBuffer) gst_buffer_unref(messageBuffer);
113 operator GstMessage *() {
return messagePointer; }
114 operator GstPad *() {
return messagePad; }
115 operator GstBuffer *() {
return messageBuffer; }
120 typedef enum {
atUnknown,
atMPEG,
atMP3,
atAC3,
atDTS,
atAAC,
atPCM,
atOGG,
atFLAC,
atWMA,
atDRA }
audiotype_t;
122 typedef enum {
ctNone,
ctMPEGTS,
ctMPEGPS,
ctMKV,
ctAVI,
ctMP4,
ctVCD,
ctCDA,
ctASF,
ctOGG,
ctWEBM,
ctDRA }
containertype_t;
216 void AmlSwitchAudio(
int index);
217 unsigned int get_pts_pcrscr(
void);
297 static int pcm_delay;
298 static int ac3_delay;
299 int m_currentAudioStream;
300 int m_currentSubtitleStream;
301 int m_cachedSubtitleStream;
302 int selectAudioStream(
int i);
303 std::vector<audioStream> m_audioStreams;
304 std::vector<subtitleStream> m_subtitleStreams;
306 gdouble m_currentTrickRatio;
310 int m_ignore_buffering_messages;
312 bool m_subtitles_paused;
313 bool m_use_prefillbuffer;
317 bool m_cuesheet_loaded;
318 bool m_audiosink_not_running;
320 #if GST_VERSION_MAJOR >= 1
321 bool m_use_chapter_entries;
323 gint64 m_last_seek_pos;
324 pts_t m_media_lenght;
326 void playPositionTiming();
327 gint m_last_seek_count;
328 bool m_seeking_or_paused;
333 std::string m_download_buffer_path;
335 sigc::signal2<void,iPlayableService*,int> m_event;
338 stIdle, stRunning, stStopped,
343 GstTagList *m_stream_tags;
348 audiotype_t gstCheckAudioPad(GstStructure* structure);
349 void gstBusCall(GstMessage *msg);
350 void handleMessage(GstMessage *msg);
351 static GstBusSyncReply gstBusSyncHandler(GstBus *bus, GstMessage *message, gpointer user_data);
352 static void gstTextpadHasCAPS(GstPad *pad, GParamSpec * unused, gpointer user_data);
353 void gstTextpadHasCAPS_synced(GstPad *pad);
354 static void gstCBsubtitleAvail(
GstElement *element, GstBuffer *buffer, gpointer user_data);
357 static void playbinNotifySource(GObject *
object, GParamSpec *unused, gpointer user_data);
358 #if GST_VERSION_MAJOR < 1
359 static gint match_sinktype(
GstElement *element, gpointer type);
362 void HandleTocEntry(GstMessage *msg);
363 static gint match_sinktype(
const GValue *velement,
const gchar *type);
365 static void handleElementAdded(GstBin *bin,
GstElement *element, gpointer user_data);
367 struct subtitle_page_t
373 subtitle_page_t(uint32_t start_ms_in, uint32_t end_ms_in,
const std::string& text_in)
374 : start_ms(start_ms_in), end_ms(end_ms_in), text(text_in)
379 typedef std::map<uint32_t, subtitle_page_t> subtitle_pages_map_t;
380 typedef std::pair<uint32_t, subtitle_page_t> subtitle_pages_map_pair_t;
381 subtitle_pages_map_t m_subtitle_pages;
384 pts_t m_prev_decoder_time;
385 int m_decoder_time_valid_state;
387 void pushSubtitles();
388 void pullSubtitle(GstBuffer *buffer);
389 void sourceTimeout();
390 sourceStream m_sourceinfo;
391 gulong m_subs_to_pull_handler_id, m_notify_source_handler_id, m_notify_element_added_handler_id;
395 gint m_aspect, m_width, m_height, m_framerate, m_progressive, m_gamma;
396 std::string m_useragent;
397 std::string m_extra_headers;
398 RESULT trickSeek(gdouble ratio);
static int ptr
Definition: bcm.cpp:17
long long pts_t
Definition: cfile.h:7
Definition: servicemp3.h:91
GstMessageContainer(int type, GstMessage *msg, GstPad *pad, GstBuffer *buffer)
Definition: servicemp3.h:99
int getType()
Definition: servicemp3.h:112
~GstMessageContainer()
Definition: servicemp3.h:106
A messagepump with fixed-length packets.
Definition: message.h:42
Definition: servicemp3.h:16
eServiceFactoryMP3()
Definition: servicemp3.cpp:117
RESULT info(const eServiceReference &, ePtr< iStaticServiceInformation > &ptr)
Definition: servicemp3.cpp:238
RESULT play(const eServiceReference &, ePtr< iPlayableService > &ptr)
Definition: servicemp3.cpp:204
gint m_eServicemp3_counter
Definition: servicemp3.h:29
RESULT list(const eServiceReference &, ePtr< iListableService > &ptr)
Definition: servicemp3.cpp:232
RESULT offlineOperations(const eServiceReference &, ePtr< iServiceOfflineOperations > &ptr)
Definition: servicemp3.cpp:299
RESULT record(const eServiceReference &, ePtr< iRecordableService > &ptr)
Definition: servicemp3.cpp:221
virtual ~eServiceFactoryMP3()
Definition: servicemp3.cpp:159
Definition: servicemp3.h:127
void updateEpgCacheNowNext()
Definition: servicemp3.cpp:901
void setPCMDelay(int)
Definition: servicemp3.cpp:3517
void setAC3Delay(int)
Definition: servicemp3.cpp:3486
RESULT cueSheet(ePtr< iCueSheet > &ptr)
Definition: servicemp3.cpp:2022
int getCurrentChannel()
Definition: servicemp3.cpp:2094
RESULT audioChannel(ePtr< iAudioChannelSelection > &ptr)
Definition: servicemp3.cpp:2010
RESULT getLength(pts_t &SWIG_OUTPUT)
Definition: servicemp3.cpp:1120
RESULT timeshift(ePtr< iTimeshiftService > &ptr)
Definition: servicemp3.h:153
RESULT getEvent(ePtr< eServiceEvent > &evt, int nownext)
Definition: servicemp3.cpp:1681
int m_cutlist_enabled
Definition: servicemp3.h:293
RESULT subServices(ePtr< iSubserviceList > &ptr)
Definition: servicemp3.h:152
RESULT getSubtitleList(std::vector< SubtitleTrack > &sublist)
Definition: servicemp3.cpp:3369
std::string getInfoString(int w)
Definition: servicemp3.cpp:1799
RESULT isCurrentlySeekable()
Definition: servicemp3.cpp:1650
RESULT selectTrack(unsigned int i)
Definition: servicemp3.cpp:2052
int setBufferSize(int size)
Definition: servicemp3.cpp:3469
RESULT getCachedSubtitle(SubtitleTrack &track)
Definition: servicemp3.cpp:3351
RESULT frontendInfo(ePtr< iFrontendInformation > &ptr)
Definition: servicemp3.h:151
RESULT setTrickmode(int trick)
Definition: servicemp3.cpp:1644
RESULT tap(ePtr< iTapService > &ptr)
Definition: servicemp3.h:147
RESULT streamed(ePtr< iStreamedService > &ptr)
Definition: servicemp3.cpp:3400
RESULT setFastForward(int ratio)
Definition: servicemp3.cpp:1069
RESULT seekRelative(int direction, pts_t to)
Definition: servicemp3.cpp:1378
RESULT seekTo(pts_t to)
Definition: servicemp3.cpp:1189
RESULT selectChannel(int i)
Definition: servicemp3.cpp:2099
void setCutListEnable(int enable)
Definition: servicemp3.cpp:3464
RESULT disableSubtitles()
Definition: servicemp3.cpp:3336
ePtr< iStreamBufferInfo > getBufferCharge()
Definition: servicemp3.cpp:3406
RESULT audioDelay(ePtr< iAudioDelay > &ptr)
Definition: servicemp3.cpp:2034
int getPCMDelay()
Definition: servicemp3.cpp:3481
RESULT start()
Definition: servicemp3.cpp:956
ePtr< eServiceEvent > m_event_now
Definition: servicemp3.h:273
void setCutList(SWIG_PYOBJECT(ePyObject))
Definition: servicemp3.cpp:3427
RESULT getTrackInfo(struct iAudioTrackInfo &, unsigned int n)
Definition: servicemp3.cpp:2105
RESULT getName(std::string &name)
Definition: servicemp3.cpp:1666
int getAC3Delay()
Definition: servicemp3.cpp:3476
RESULT setTarget(int target, bool noaudio=false)
Definition: servicemp3.h:150
RESULT getPlayPosition(pts_t &SWIG_OUTPUT)
Definition: servicemp3.cpp:1521
RESULT rdsDecoder(ePtr< iRdsDecoder > &ptr)
Definition: servicemp3.h:161
PyObject * getCutList()
Definition: servicemp3.cpp:3411
virtual ~eServiceMP3()
Definition: servicemp3.cpp:841
RESULT keys(ePtr< iServiceKeys > &ptr)
Definition: servicemp3.h:162
RESULT audioTracks(ePtr< iAudioTrackSelection > &ptr)
Definition: servicemp3.cpp:2016
void loadCuesheet()
Definition: servicemp3.cpp:3548
RESULT unpause()
Definition: servicemp3.cpp:1092
RESULT enableSubtitles(iSubtitleUser *user, SubtitleTrack &track)
Definition: servicemp3.cpp:3295
RESULT setSlowMotion(int ratio)
Definition: servicemp3.cpp:1061
RESULT seek(ePtr< iSeekableService > &ptr)
Definition: servicemp3.cpp:1114
RESULT stream(ePtr< iStreamableService > &ptr)
Definition: servicemp3.h:163
int getNumberOfTracks()
Definition: servicemp3.cpp:2040
int m_cuesheet_changed
Definition: servicemp3.h:293
std::multiset< cueEntry > m_cue_entries
Definition: servicemp3.h:292
int getInfo(int w)
Definition: servicemp3.cpp:1689
void saveCuesheet()
Definition: servicemp3.cpp:3599
RESULT connectEvent(const sigc::slot2< void, iPlayableService *, int > &event, ePtr< eConnection > &connection)
Definition: servicemp3.cpp:950
void setQpipMode(bool value, bool audio)
Definition: servicemp3.h:165
RESULT pause()
Definition: servicemp3.cpp:1076
RESULT stop()
Definition: servicemp3.cpp:1007
ePtr< eTimer > m_nownext_timer
Definition: servicemp3.h:272
RESULT info(ePtr< iServiceInformation > &)
Definition: servicemp3.cpp:1660
ePtr< iServiceInfoContainer > getInfoObject(int w)
Definition: servicemp3.cpp:1946
int getCurrentTrack()
Definition: servicemp3.cpp:2045
ePtr< eServiceEvent > m_event_next
Definition: servicemp3.h:273
RESULT subtitle(ePtr< iSubtitleOutput > &ptr)
Definition: servicemp3.cpp:2028
Definition: servicemp3.h:68
eServiceMP3InfoContainer()
Definition: servicemp3.cpp:444
void setDouble(double value)
Definition: servicemp3.cpp:474
double getDouble(unsigned int index) const
Definition: servicemp3.cpp:463
~eServiceMP3InfoContainer()
Definition: servicemp3.cpp:449
void setBuffer(GstBuffer *buffer)
Definition: servicemp3.cpp:479
unsigned char * getBuffer(unsigned int &size) const
Definition: servicemp3.cpp:468
Definition: iservice.h:15
@ idServiceMP3
Definition: iservice.h:27
Definition: servicemp3.h:35
RESULT getEvent(const eServiceReference &ref, ePtr< eServiceEvent > &ptr, time_t start_time)
Definition: servicemp3.cpp:377
RESULT getName(const eServiceReference &ref, std::string &name)
Definition: servicemp3.cpp:321
long long getFileSize(const eServiceReference &ref)
Definition: servicemp3.cpp:367
int isPlayable(const eServiceReference &ref, const eServiceReference &ignore, bool simulate)
Definition: servicemp3.h:43
int getInfo(const eServiceReference &ref, int w)
Definition: servicemp3.cpp:341
int getLength(const eServiceReference &ref)
Definition: servicemp3.cpp:336
Definition: servicemp3.h:49
int getBufferPercentage() const
Definition: servicemp3.cpp:417
eStreamBufferInfo(int percentage, int inputrate, int outputrate, int space, int size)
Definition: servicemp3.cpp:408
int getBufferSpace() const
Definition: servicemp3.cpp:432
int getAverageOutputRate() const
Definition: servicemp3.cpp:427
int getBufferSize() const
Definition: servicemp3.cpp:437
int getAverageInputRate() const
Definition: servicemp3.cpp:422
Definition: iservice.h:587
Definition: iservice.h:600
Definition: iservice.h:562
virtual unsigned int n
Definition: iservice.h:570
Definition: iservice.h:700
Definition: iservice.h:499
Definition: iservice.h:978
Definition: iservice.h:528
Definition: iservice.h:1095
Definition: iservice.h:260
Definition: iservice.h:869
Definition: iservice.h:879
Definition: iservice.h:736
Definition: iservice.h:725
enable
Definition: Extensions/MiniTV/plugin.py:8
size
Definition: Plugins/SystemPlugins/PositionerSetup/log.py:16
name
Definition: newplugin.py:9
target
Definition: newplugin.py:59
list ref
Definition: create_picon_e1_to_e2.py:17
index
Definition: main.py:28
int RESULT
Definition: object.h:12
containertype_t
Definition: servicemp3.h:122
@ ctAVI
Definition: servicemp3.h:122
@ ctDRA
Definition: servicemp3.h:122
@ ctASF
Definition: servicemp3.h:122
@ ctMP4
Definition: servicemp3.h:122
@ ctMPEGTS
Definition: servicemp3.h:122
@ ctOGG
Definition: servicemp3.h:122
@ ctMKV
Definition: servicemp3.h:122
@ ctVCD
Definition: servicemp3.h:122
@ ctMPEGPS
Definition: servicemp3.h:122
@ ctCDA
Definition: servicemp3.h:122
@ ctWEBM
Definition: servicemp3.h:122
@ ctNone
Definition: servicemp3.h:122
struct _GstElement GstElement
Definition: servicemp3.h:118
subtype_t
Definition: servicemp3.h:121
@ stSSA
Definition: servicemp3.h:121
@ stSRT
Definition: servicemp3.h:121
@ stPGS
Definition: servicemp3.h:121
@ stVOB
Definition: servicemp3.h:121
@ stASS
Definition: servicemp3.h:121
@ stUnknown
Definition: servicemp3.h:121
@ stPlainText
Definition: servicemp3.h:121
audiotype_t
Definition: servicemp3.h:120
@ atMP3
Definition: servicemp3.h:120
@ atAC3
Definition: servicemp3.h:120
@ atDTS
Definition: servicemp3.h:120
@ atOGG
Definition: servicemp3.h:120
@ atUnknown
Definition: servicemp3.h:120
@ atFLAC
Definition: servicemp3.h:120
@ atWMA
Definition: servicemp3.h:120
@ atDRA
Definition: servicemp3.h:120
@ atPCM
Definition: servicemp3.h:120
@ atMPEG
Definition: servicemp3.h:120
@ atAAC
Definition: servicemp3.h:120
Definition: servicemp3.h:221
audiotype_t type
Definition: servicemp3.h:223
std::string language_code
Definition: servicemp3.h:224
GstPad * pad
Definition: servicemp3.h:222
std::string codec
Definition: servicemp3.h:225
audioStream()
Definition: servicemp3.h:226
Definition: servicemp3.h:255
gint64 bufferingLeft
Definition: servicemp3.h:259
gint avgOutRate
Definition: servicemp3.h:258
gint avgInRate
Definition: servicemp3.h:257
bufferInfo()
Definition: servicemp3.h:260
gint bufferPercent
Definition: servicemp3.h:256
Definition: servicemp3.h:278
unsigned int what
Definition: servicemp3.h:280
bool operator<(const struct cueEntry &o) const
Definition: servicemp3.h:282
pts_t where
Definition: servicemp3.h:279
cueEntry(const pts_t &where, unsigned int what)
Definition: servicemp3.h:286
Definition: servicemp3.h:266
std::string error_message
Definition: servicemp3.h:267
std::string missing_codec
Definition: servicemp3.h:268
Definition: servicemp3.h:242
sourceStream()
Definition: servicemp3.h:249
gboolean is_streaming
Definition: servicemp3.h:247
audiotype_t audiotype
Definition: servicemp3.h:243
containertype_t containertype
Definition: servicemp3.h:244
gboolean is_video
Definition: servicemp3.h:246
gboolean is_audio
Definition: servicemp3.h:245
gboolean is_hls
Definition: servicemp3.h:248
Definition: servicemp3.h:232
subtype_t type
Definition: servicemp3.h:234
std::string language_code
Definition: servicemp3.h:235
GstPad * pad
Definition: servicemp3.h:233
subtitleStream()
Definition: servicemp3.h:236
Definition: iservice.h:548
#define SWIG_OUTPUT
Definition: swig.h:20
#define SWIG_PYOBJECT(x)
Definition: swig.h:23