From a49124efd091fce35a197ce508cb1b994631f873 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 28 Mar 2012 13:40:05 +0000 Subject: [PATCH 1/4] sectionsd/dmxapi.h: comment linux/dvb/dmx.h include git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2165 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cf2952353fa794822f6173f0db8431c46158e70b Author: [CST] Focus Date: 2012-03-28 (Wed, 28 Mar 2012) --- src/sectionsd/dmxapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sectionsd/dmxapi.h b/src/sectionsd/dmxapi.h index 25d1a0e6f..b8055a50d 100644 --- a/src/sectionsd/dmxapi.h +++ b/src/sectionsd/dmxapi.h @@ -29,7 +29,7 @@ #endif #include -#if !HAVE_TRIPLEDRAGON +#if 0 // !HAVE_TRIPLEDRAGON #include #endif From 630dc09d5b6cb4844149842b7b8a0f622dc6edbb Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 28 Mar 2012 16:16:09 +0000 Subject: [PATCH 2/4] libcs headers update git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2167 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6be9b772ae8bb73af3263d1eb08e8eb7c9f0aaad Author: [CST] Focus Date: 2012-03-28 (Wed, 28 Mar 2012) --- lib/libcoolstream/audio_cs.h | 3 ++- lib/libcoolstream/dmx_cs.h | 8 ++++++-- lib/libcoolstream/playback_cs.h | 10 ++++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/libcoolstream/audio_cs.h b/lib/libcoolstream/audio_cs.h index 049407260..b79689eab 100644 --- a/lib/libcoolstream/audio_cs.h +++ b/lib/libcoolstream/audio_cs.h @@ -141,12 +141,13 @@ public: void getAudioInfo(int &Type, int &Layer, int &Freq, int &Bitrate, int &Mode); void SetSRS(int iq_enable, int nmgr_enable, int iq_mode, int iq_level); bool IsHdmiDDSupported(void); - void SetHdmiDD(HDMI_ENCODED_MODE type); + void SetHdmiDD(bool On); void SetSpdifDD(bool Enable); void ScheduleMute(bool On); void EnableAnalogOut(bool Enable); bool GetHdmiAudioCaps(cs_audio_caps_t &caps); bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format); + void SetHdmiDD(HDMI_ENCODED_MODE type); }; #endif //__AUDIO_CS_H_ diff --git a/lib/libcoolstream/dmx_cs.h b/lib/libcoolstream/dmx_cs.h index 8e1304853..b74bb528e 100644 --- a/lib/libcoolstream/dmx_cs.h +++ b/lib/libcoolstream/dmx_cs.h @@ -5,6 +5,7 @@ /* */ /* (C) 2008 CoolStream International */ /* */ +/* $Id:: $ */ /*******************************************************************************/ #ifndef __DEMUX_CS_H_ #define __DEMUX_CS_H_ @@ -14,9 +15,12 @@ #define DEMUX_POLL_TIMEOUT 0 // timeout in ms #define MAX_FILTER_LENGTH 12 // maximum number of filters -#ifndef DMX_FILTER_SIZE -#define DMX_FILTER_SIZE MAX_FILTER_LENGTH + +#ifdef DMX_FILTER_SIZE +#error #endif +#define DMX_FILTER_SIZE MAX_FILTER_LENGTH + #define MAX_DMX_UNITS 4 typedef enum { diff --git a/lib/libcoolstream/playback_cs.h b/lib/libcoolstream/playback_cs.h index 6cdfa05f7..a9192bfdc 100644 --- a/lib/libcoolstream/playback_cs.h +++ b/lib/libcoolstream/playback_cs.h @@ -5,6 +5,7 @@ /* */ /* (C) 2008 CoolStream International */ /* */ +/* $Id:: $ */ /*******************************************************************************/ #ifndef __PLAYBACK_CS_H_ #define __PLAYBACK_CS_H_ @@ -18,6 +19,14 @@ typedef enum { class cPlaybackData; +typedef struct { + bool enabled; + uint16_t pid; + uint16_t ac3flags; + std::string lang; + std::string codec_name; +} playback_audio_pid_info_t; + class cPlayback { private: cPlaybackData * pd; @@ -50,6 +59,7 @@ public: bool SetPosition(int position, bool absolute = false); bool IsPlaying(void) const { return playing; } bool IsEnabled(void) const { return enabled; } + void FindAllPids(playback_audio_pid_info_t *audiopids, uint16_t size, uint16_t *numpida); void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language); }; From 6e5e27512706f6049351cd16fdb7921783181216 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 28 Mar 2012 16:16:32 +0000 Subject: [PATCH 3/4] lib/libdvbsub/dvbsubtitle.cpp: fix API use to new ffmpeg git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2168 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/fad27bc5a642ea8d613c051871ad3fb73c1e75de Author: [CST] Focus Date: 2012-03-28 (Wed, 28 Mar 2012) --- lib/libdvbsub/dvbsubtitle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index 8bea202f9..43297eade 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -183,8 +183,8 @@ cDvbSubtitleConverter::cDvbSubtitleConverter(void) dbgconverter("cDvbSubtitleConverter: unable to get dvb subtitle codec!\n"); return; } - avctx = avcodec_alloc_context(); - if (avcodec_open(avctx, avcodec) < 0) + avctx = avcodec_alloc_context3(avcodec); + if (avcodec_open2(avctx, avcodec, NULL) < 0) dbgconverter("cDvbSubtitleConverter: unable to open codec !\n"); av_log_set_level(AV_LOG_PANIC); From c90e6c0c7240a2e1cd128c4ab53c5829803f6628 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 26 Mar 2012 17:22:31 +0400 Subject: [PATCH 4/4] src/zapit.cpp: move TP_params TP inside class, add method to start manual TP scan Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0380fc8f9ba0ab90b7479d5cb4189e6c99cea24e Author: [CST] Focus Date: 2012-03-26 (Mon, 26 Mar 2012) --- src/zapit/include/zapit/zapit.h | 2 ++ src/zapit/src/zapit.cpp | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 67c1032b2..4ee25b8f1 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -79,6 +79,7 @@ class CZapit : public OpenThreads::Thread CZapitChannel * current_channel; t_channel_id live_channel_id; + TP_params TP; audio_map_t audio_map; bool current_is_nvod; @@ -140,6 +141,7 @@ class CZapit : public OpenThreads::Thread bool PrepareChannels(); bool StartScan(int scan_mode); + bool StartScanTP(TP_params * TPparams); bool StartFastScan(int scan_mode, int opid); void addChannelToBouquet(const unsigned int bouquet, const t_channel_id channel_id); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 78e9bae00..8eade5cef 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -97,7 +97,7 @@ transponder_list_t transponders; CZapitClient::bouquetMode bouquetMode = CZapitClient::BM_UPDATEBOUQUETS; CZapitClient::scanType scanType = CZapitClient::ST_TVRADIO; -static TP_params TP; +//static TP_params TP; static bool update_pmt = true; /******************************************************************************/ @@ -701,6 +701,14 @@ bool CZapit::StartScan(int scan_mode) return true; } +bool CZapit::StartScanTP(TP_params * TPparams) +{ + PrepareScan(); + + CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) TPparams); + return true; +} + bool CZapit::StartFastScan(int scan_mode, int opid) { fast_scan_type_t scant; @@ -1059,8 +1067,11 @@ printf("[zapit] TP_id %d freq %d rate %d fec %d pol %d\n", TP.TP_id, TP.feparams //if(satellitePositions.find(current_channel->getSatellitePosition()) != satellitePositions.end()) current_channel = 0; } +#if 0 PrepareScan(); CServiceScan::getInstance()->Start(CServiceScan::SCAN_TRANSPONDER, (void *) &TP); +#endif + StartScanTP(&TP); break; }