[Redbutton-devel] SF.net SVN: redbutton: [290] redbutton-download/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-04-24 10:38:55
|
Revision: 290
http://svn.sourceforge.net/redbutton/?rev=290&view=rev
Author: skilvington
Date: 2007-04-24 03:38:53 -0700 (Tue, 24 Apr 2007)
Log Message:
-----------
find the original_network_id
Modified Paths:
--------------
redbutton-download/trunk/command.c
redbutton-download/trunk/findmheg.c
redbutton-download/trunk/module.h
Modified: redbutton-download/trunk/command.c
===================================================================
--- redbutton-download/trunk/command.c 2007-04-24 10:24:53 UTC (rev 289)
+++ redbutton-download/trunk/command.c 2007-04-24 10:38:53 UTC (rev 290)
@@ -815,11 +815,8 @@
SEND_RESPONSE(200, "OK");
-/* TODO */
-printf("TODO: cmd_service network_id\n");
+ fprintf(client, "dvb://%x..%x\n", car->network_id, car->service_id);
- fprintf(client, "dvb://..%x\n", car->service_id);
-
return false;
}
Modified: redbutton-download/trunk/findmheg.c
===================================================================
--- redbutton-download/trunk/findmheg.c 2007-04-24 10:24:53 UTC (rev 289)
+++ redbutton-download/trunk/findmheg.c 2007-04-24 10:38:53 UTC (rev 290)
@@ -101,6 +101,7 @@
find_mheg(unsigned int adapter, unsigned int timeout, uint16_t service_id, int carousel_id)
{
unsigned char pmt[MAX_TABLE_LEN];
+ unsigned char *sdt = pmt;
uint16_t section_length;
uint16_t offset;
uint8_t stream_type;
@@ -119,6 +120,7 @@
_car.service_id = service_id;
/* unknown */
+ _car.network_id = 0;
_car.carousel_id = 0;
_car.boot_pid = 0;
_car.audio_pid = 0;
@@ -136,6 +138,12 @@
_car.nmodules = 0;
_car.modules = NULL;
+ /* find the original_network_id from the SDT */
+ if(!read_sdt(_car.demux_device, timeout, sdt))
+ fatal("Unable to read SDT");
+ _car.network_id = (sdt[8] << 8) + sdt[9];
+ vverbose("original_network_id=%u", _car.network_id);
+
/* get the PMT */
if(!read_pmt(_car.demux_device, service_id, timeout, pmt))
fatal("Unable to read PMT");
Modified: redbutton-download/trunk/module.h
===================================================================
--- redbutton-download/trunk/module.h 2007-04-24 10:24:53 UTC (rev 289)
+++ redbutton-download/trunk/module.h 2007-04-24 10:38:53 UTC (rev 290)
@@ -60,8 +60,9 @@
char dvr_device[PATH_MAX]; /* dvr device path */
unsigned int timeout; /* timeout for the DVB devices */
pid_t downloader; /* ID of the process downloading the carousel */
- uint16_t service_id;
- uint32_t carousel_id;
+ uint16_t network_id; /* Original Network ID */
+ uint16_t service_id; /* Service ID we are downloading the carousel from */
+ uint32_t carousel_id; /* Carousel ID we are downloading */
uint16_t boot_pid; /* PID containing DSI */
uint16_t audio_pid; /* PID of default audio stream for this service_id */
uint8_t audio_type; /* type ID of default audio stream */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|