Commit graph

3567 commits

Author SHA1 Message Date
Adam Sutton
21b16e5687 subscription: ensure that direct service subs work properly 2013-09-06 00:15:52 +01:00
Adam Sutton
a149908184 debug: hide thread start messages
we get a lot of spam due to HTTP server setup so this needs to be debug
2013-09-06 00:15:02 +01:00
Adam Sutton
831990453e mpegts: ensure muxes are properly stopped when unsubscribing svcs 2013-09-05 23:48:02 +01:00
Adam Sutton
997ccee895 subscriptions: stop re-entrant call to subs_reschedule()
THe problem is that mux subs have been done such that unsubscribe
(which in turn calls subs_reschedule()) can itelf be called in line
from subs_reschedule().

Really this is a bit of a mess but this simple hack fixes things.
2013-09-05 23:46:43 +01:00
Adam Sutton
2b909fe580 debug: add wrapper for pthread_create to add a meaningful name
This is very useful for debugging. Though tbh I need to do this code
properly.
2013-09-05 22:19:25 +01:00
Adam Sutton
83f0e0cdf2 epggrab: further fixes to stop chicken/egg scenarios
too many A calls B calls A depending on state etc... but can't be
bothered at this stage to re-engineer the lot!
2013-09-05 15:21:49 +01:00
Adam Sutton
e087621fed opentv: ensure that we can't double delete table
THis might happen if registering that the scan is complete removes
the table.
2013-09-05 15:21:34 +01:00
Adam Sutton
d9b710ecf9 epggrab: change order of init to ensure things work properly 2013-09-05 15:14:41 +01:00
Adam Sutton
f31ee8fdcf epggrab: sort out configuration for epggrab ota muxes 2013-09-04 22:15:10 +01:00
Adam Sutton
23751f8373 epggrab: corrections to the way the whole ota mux system works 2013-09-04 21:23:44 +01:00
Adam Sutton
97e9c725f0 mpegts: improvements to DVB SI processing
I've made the table extraid 64 bits, as some entries require 32+X bits
so a 32-bit field wasn't enough.

Added callback for registering destruction (for dealloc'ing memory
alloc'd for opaque).

Added method of registering desciptor tag handlers, saves duplicating
BAT processing used for OpenTV, which uses 1 custom descriptor.

Improved the table completion detection and reduced level of debug
that could swamp tvhlog queue.
2013-09-04 21:23:24 +01:00
Adam Sutton
b56a203fb5 opentv: updated to new APIs
This uses a significantly simpler setup, table is processed in a
linear fashion.
2013-09-04 21:23:24 +01:00
Adam Sutton
cd1adfbbfc subscriptions: corrections to the way ota muxes are unlinked 2013-09-04 21:23:24 +01:00
Adam Sutton
c83c5eb917 tvhlog: ensure the logging Q is bounded in size, else it can become a leak
If processing because so high that the log queue becomes swamped we can
end up with a sort of avalanche scenario where everything gradually slows
down and the size of the buffer continues to grow. The main culprits of
this have been eliminated at source, however this is still a useful
safe guard.
2013-09-04 21:19:44 +01:00
Adam Sutton
709f86057d tvhlog: performance improvement when trace/debug is disabled.
The processing performed in the hexdump routine, commonly used in
SI table trace output. Was having a significant impact on performance
as it was not pre-processing the config to see if trace was even
enabled before continuing to build up the (large and frequent) hex
strings.
2013-09-04 21:19:43 +01:00
Adam Sutton
84677dd6c1 linuxdvb: fixed leaving dangling file handles and stop FE on stop
Note: really we don't want to close the FE if we're planning to
retune, but I need to change the API to support that operation.
2013-09-02 11:21:58 +01:00
Adam Sutton
16f9e11fd8 subscription: some minor corrections for mux sub 2013-09-02 11:12:26 +01:00
Adam Sutton
8dce44a9bf webui: make it possible to subscribe to a mux
I'm not entirely convinced this is fully working. I'm sure the data
rate was too low.
2013-09-02 11:02:03 +01:00
Adam Sutton
7a84ac6d50 epggrab: updated to the new mux sub API 2013-09-02 11:01:18 +01:00
Adam Sutton
4eb97a20f3 subscription: Created a proper mux subscription mechanism
It's a bit ugly to link subs and mpegts directly, but its not the end
of the world (and probably unavoidable without lots of duplication).

I'm still not convinced its robust to mux deletions if subs exist on
that mux. Probably needs mmi to be ref counted.

There is also a special kind of sub that expects to receive no stream
data, i.e. all data will come from the SI tables only. This special
sub is automatically unsubscribed (but that might need changing).
2013-09-02 10:58:22 +01:00
Adam Sutton
5564cdce6e mpegts: fix service enumeration, failing to store weight
This caused oscillation between competing subscriptions!
2013-08-31 22:45:40 +01:00
Adam Sutton
13fa0533f3 mpegts: ensure mux is stopped if force is set 2013-08-31 22:25:33 +01:00
Adam Sutton
2fb096d4b2 linuxdvb: fix a couple of diseqc mistakes
I'd set the 22KHz continuous tone instread of toneburst. And also sending
the diseqc repeat flag when it wasn't a repeat.
2013-08-31 21:08:49 +01:00
Adam Sutton
b43f84a807 support: some minor corrections to config migration
Fix symbol rate mux config and ignore services with no channel mapping. It
can cause mappings to be missed.
2013-08-31 20:32:48 +01:00
Adam Sutton
f942f18aa3 idnode: reduce short ID to 31 bits to its a +ve 32bit signed int
Unfortunately this is what XBMC requires. Why signed I have no idea!
2013-08-30 23:24:27 +01:00
Adam Sutton
4142ad4366 webui: some fixes to get channel list back in the EPG tab 2013-08-30 23:24:27 +01:00
Adam Sutton
ce08b84949 epg: uncomment the channel loop in epg_query so we actually get results 2013-08-30 23:24:27 +01:00
Adam Sutton
e7cc34be74 tvhlog: ensure the tvhlog thread completes before exit
Note: I think my thinking for needing this logging thread is possibly
no longer valid. So this might be removed at some point (or at least
made optional).
2013-08-30 23:24:26 +01:00
Adam Sutton
75fa931667 epg: forgot to uncomment the broadcast save loop 2013-08-30 23:24:26 +01:00
Adam Sutton
32edfc623f support: Configuration migration script
This attmepts to rebuild the DVB network (not including satconf/adapters)
and also the channel list. This is 90+% of the work and should be enough
for most users to get up and running a bit more quickly.
2013-08-30 23:18:56 +01:00
Adam Sutton
21c7aa7252 eit: fix bug from last set of merges from my epg-update branch 2013-08-28 20:18:01 +01:00
Adam Sutton
df44bad3e9 epggrab: complete update to OTA mux and EIT
Still haven't touched OpenTV and there are several hacks in here for which
a proper solution is required.
(cherry picked from commit 9212120eb4c92aacb0d9cb75624961bf27e2ef5a)
2013-08-28 20:13:38 +01:00
Adam Sutton
c022ab7c75 mpegts: allow out of sequence table processing
also corrected invalid length check and added lots of extra debug
(cherry picked from commit 1c40381adb4f95cae3bb7d366d56bf68c3c06a9e)
2013-08-28 20:12:45 +01:00
Adam Sutton
b8e9a65e99 linuxdvb: ensure that PID filters are not installed early
I thought this was causing stale data to enter the pipelines, turns
out this was not the case (it was just a NIT entry for a mux that
didn't exist colliding with one that did).

However still a useful mod.
(cherry picked from commit a7c7b76e8f8f10ece3af3132964c8afd19b26391)
2013-08-28 20:12:45 +01:00
Adam Sutton
3a1cbb9f53 mpegts: add the concept of a mux level subscription
This is necessary so that things like EPG grabbing can make
subscriptions that take precedence over initial scan but not
over standard subscriptions.

Will also be used for the debug mux dump from UI feature.
(cherry picked from commit 35a58bdf85008b819504e86e26f1072f79e79af3)
2013-08-28 20:12:45 +01:00
Adam Sutton
e5140a9c75 mpegts: fix debug display bug and event firing
(cherry picked from commit 293542812ac05ee6b806444b9def7212f28ae9b2)
2013-08-28 20:12:45 +01:00
Adam Sutton
fab386a14b tvhlog: move output to a thread
I'm hoping this will give a small performance boost with heavy levels
of trace. This is because I'm finding that data appears to be missing
when testing EIT, but to test I need to enable debug and I think that
debug may be part of the problem!
(cherry picked from commit d59421f91896fe30cd6ba6507f90ad0766903ae3)
2013-08-28 20:12:45 +01:00
Adam Sutton
58a3779654 mpegts: fix updates made for tvhpoll in merge 2013-08-28 20:04:37 +01:00
Adam Sutton
d91c02d520 Merge branch 'feature/dvb-rewrite'
Conflicts:
	Makefile
	configure
	src/dvb/diseqc.h
	src/dvb/dvb.h
	src/dvb/dvb_adapter.c
	src/dvb/dvb_fe.c
	src/dvb/dvb_input_filtered.c
	src/dvb/dvb_tables.c
	src/input/mpegts/dvb_psi.c
	src/input/mpegts/iptv/iptv_mux.c
	src/iptv_input.c
	src/service_mapper.h
	src/webui/static/app/tvadapters.js
	src/webui/webui.c
2013-08-28 17:08:39 +01:00
Adam Sutton
b6a0658bad iptv: further fixes to input processing
I had forgotten to make the read() buffers mux specific. Without this they
effectively end up using the same buffer for all active sessions and will
trample all over each other!
2013-08-22 22:38:42 +01:00
Adam Sutton
88fddda7e1 mpegts: ensure that partial (TS packet) reads are properly handled 2013-08-22 22:04:23 +01:00
Adam Sutton
ea99e7b3c6 iptv: sort out service configuration 2013-08-22 22:01:38 +01:00
Adam Sutton
20f7e3c8e7 channel: provide a link in the channel grid to allow playback. 2013-08-22 16:51:53 +01:00
Adam Sutton
65c304fb9a channel: migrated channel_t to an idnode
Also since the channel name is no longer unique various other things have
had to be updated.
2013-08-22 15:15:08 +01:00
Adam Sutton
b9c1171a7d api: include access to the service mapper 2013-08-22 15:15:08 +01:00
Adam Sutton
d8973cba3e service_mapper: New service mapper code
This will now allow the mappings between services and channels to be created.
Some basic options have been created for the purpose of allowing certain
level of control of how the mapping is done.
2013-08-22 15:15:08 +01:00
Adam Sutton
ca35906be5 mpegts: debug statement fix 2013-08-22 15:15:08 +01:00
Adam Sutton
69aa247167 iptv: make it possibel for HTTP reception to be used in IPTV 2013-08-20 20:12:04 +01:00
Adam Sutton
1c2a0b05a1 iptv: updated to work with new API
This isn't fully tested and no doubt there are configuration issues to
be resolved. But I was able to receive an RTP stream using negge's server.
2013-08-17 19:50:52 +01:00
Adam Sutton
275845ca19 idnode: some additional debug 2013-08-17 19:50:18 +01:00