summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_ts.c17
-rw-r--r--src/input/input_dvb.c7
-rw-r--r--src/input/input_v4l.c31
3 files changed, 35 insertions, 20 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 2192c67e3..192a5970e 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.c
@@ -245,7 +245,7 @@ typedef struct {
int64_t pts;
buf_element_t *buf;
unsigned int counter;
- uint8_t descriptor_tag;
+ uint16_t descriptor_tag; /* +0x100 for PES stream IDs (no available TS descriptor tag?) */
int64_t packet_count;
int corrupted_pes;
uint32_t buffered_bytes;
@@ -958,7 +958,7 @@ static void demux_ts_pes_new(demux_ts_t*this,
unsigned int mediaIndex,
unsigned int pid,
fifo_buffer_t *fifo,
- uint8_t descriptor) {
+ uint16_t descriptor) {
demux_ts_media *m = &this->media[mediaIndex];
@@ -1214,6 +1214,15 @@ printf("Program Number is %i, looking for %i\n",program_number,this->program_num
}
}
+ /*
+ * Forget the current video, audio and subtitle PIDs; if the PMT has not
+ * changed, we'll pick them up again when we parse this PMT, while if the
+ * PMT has changed (e.g. an IPTV streamer that's just changed its source),
+ * we'll get new PIDs that we should follow.
+ */
+ this->audio_tracks_count = 0;
+ this->videoPid = INVALID_PID;
+ this->spu_pid = INVALID_PID;
/*
* ES definitions start here...we are going to learn upto one video
@@ -1820,7 +1829,7 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
} else if (!found) {
this->videoPid = pid;
this->videoMedia = this->media_num;
- demux_ts_pes_new(this, this->media_num++, pid, this->video_fifo, pes_stream_id);
+ demux_ts_pes_new(this, this->media_num++, pid, this->video_fifo, 0x100 + pes_stream_id);
}
if (this->videoPid != INVALID_PID) {
@@ -1846,7 +1855,7 @@ static void demux_ts_parse_packet (demux_ts_t*this) {
this->audio_tracks[this->audio_tracks_count].media_index = this->media_num;
this->media[this->media_num].type = this->audio_tracks_count;
demux_ts_pes_new(this, this->media_num++, pid,
- this->audio_fifo,pes_stream_id);
+ this->audio_fifo, 0x100 + pes_stream_id);
this->audio_tracks_count++;
}
}
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index baf6b3780..e36ec14e7 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -373,6 +373,7 @@ static const Param bw_list [] = {
{ "BANDWIDTH_6_MHZ", BANDWIDTH_6_MHZ },
{ "BANDWIDTH_7_MHZ", BANDWIDTH_7_MHZ },
{ "BANDWIDTH_8_MHZ", BANDWIDTH_8_MHZ },
+ { "BANDWIDTH_AUTO", BANDWIDTH_AUTO },
{ NULL, 0 }
};
@@ -395,6 +396,7 @@ static const Param guard_list [] = {
{"GUARD_INTERVAL_1_32", GUARD_INTERVAL_1_32},
{"GUARD_INTERVAL_1_4", GUARD_INTERVAL_1_4},
{"GUARD_INTERVAL_1_8", GUARD_INTERVAL_1_8},
+ {"GUARD_INTERVAL_AUTO", GUARD_INTERVAL_AUTO},
{ NULL, 0 }
};
@@ -403,6 +405,7 @@ static const Param hierarchy_list [] = {
{ "HIERARCHY_2", HIERARCHY_2 },
{ "HIERARCHY_4", HIERARCHY_4 },
{ "HIERARCHY_NONE", HIERARCHY_NONE },
+ { "HIERARCHY_AUTO", HIERARCHY_AUTO },
{ NULL, 0 }
};
@@ -421,12 +424,14 @@ static const Param qam_list [] = {
{ "QAM_256", QAM_256 },
{ "QAM_32", QAM_32 },
{ "QAM_64", QAM_64 },
+ { "QAM_AUTO", QAM_AUTO },
{ NULL, 0 }
};
static const Param transmissionmode_list [] = {
{ "TRANSMISSION_MODE_2K", TRANSMISSION_MODE_2K },
{ "TRANSMISSION_MODE_8K", TRANSMISSION_MODE_8K },
+ { "TRANSMISSION_MODE_AUTO", TRANSMISSION_MODE_AUTO },
{ NULL, 0 }
};
@@ -2750,7 +2755,7 @@ static int dvb_plugin_open(input_plugin_t * this_gen)
xine_config_lookup_entry(this->stream->xine, "media.dvb.gui_enabled", &gui_enabled);
this->dvb_gui_enabled = gui_enabled.num_value;
xprintf(this->class->xine, XINE_VERBOSITY_LOG, _("input_dvb: DVB GUI %s\n"), this->dvb_gui_enabled ? "enabled" : "disabled");
-
+
xine_config_lookup_entry(this->stream->xine, "media.dvb.adapter", &adapter);
if (!(tuner = tuner_init(this->class->xine,adapter.num_value))) {
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index bbd594418..302b96b57 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -110,9 +110,6 @@ static const resolution_t resolutions[] = {
{ 160, 120 }
};
-static const char *const tv_standard_names[] = { "PAL", "NTSC", "SECAM", NULL };
-static const int tv_standard_values[] = { VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_SECAM };
-
#define NUM_RESOLUTIONS (sizeof(resolutions)/sizeof(resolutions[0]))
#define RADIO_DEV "/dev/radio0"
#define VIDEO_DEV "/dev/video0"
@@ -120,6 +117,9 @@ static const int tv_standard_values[] = { VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO
#define AUDIO_DEV "plughw:0,0"
#endif
+static const char *const tv_standard_names[] = { "AUTO", "PAL", "NTSC", "SECAM", "OLD", NULL };
+static const int tv_standard_values[] = { VIDEO_MODE_AUTO, VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_SECAM, -1 };
+
#if !defined(NDELAY) && defined(O_NDELAY)
#define FNDELAY O_NDELAY
#endif
@@ -694,11 +694,14 @@ static int search_by_channel(v4l_input_plugin_t *this, char *input_source)
tv_standard_entry = this->stream->xine->config->lookup_entry(this->stream->xine->config,
"media.video4linux.tv_standard");
this->tuner_name = input_source;
- this->video_channel.norm = tv_standard_values[ tv_standard_entry->num_value ];
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
- "input_v4l: TV Standard configured as STD %s (%d)\n",
- tv_standard_names[ tv_standard_entry->num_value ], this->video_channel.norm );
- ret = ioctl(fd, VIDIOCSCHAN, &this->video_channel);
+ if (tv_standard_entry->num_value != 0) {
+ this->video_channel.norm = tv_standard_values[ tv_standard_entry->num_value ];
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "input_v4l: TV Standard configured as STD %s (%d)\n",
+ tv_standard_names[ tv_standard_entry->num_value ], this->video_channel.norm );
+ ret = ioctl(fd, VIDIOCSCHAN, &this->video_channel);
+ } else
+ ret = ioctl(fd, VIDIOCSCHAN, &this->input);
lprintf("(%d) Set channel to %d\n", ret, this->input);
@@ -1912,12 +1915,6 @@ static void *init_video_class (xine_t *xine, void *data)
_("v4l video device"),
_("The path to your Video4Linux video device."),
10, NULL, NULL);
-
- config->register_enum (config, "media.video4linux.tv_standard", 0,
- tv_standard_names, _("v4l TV standard"),
- _("Selects the TV standard of the input signals. "
- "Either: PAL, NTSC and SECAM. "), 20, NULL, NULL);
-
#ifdef HAVE_ALSA
config->register_filename (config, "media.video4linux.audio_device",
AUDIO_DEV, 0,
@@ -1925,7 +1922,11 @@ static void *init_video_class (xine_t *xine, void *data)
_("The name of the audio device which corresponds "
"to your Video4Linux video device."),
10, NULL, NULL);
-#endif
+#endif
+ config->register_enum (config, "media.video4linux.tv_standard", 0 /* auto */,
+ tv_standard_names, _("v4l TV standard"),
+ _("Selects the TV standard of the input signals. "
+ "Either: AUTO, PAL, NTSC or SECAM. "), 20, NULL, NULL);
return this;
}