aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/dvb.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2008-11-17 00:08:58 +0100
committerFelix Domke <tmbinc@elitedvb.net>2008-11-17 00:08:58 +0100
commit58ee3c3a218a0aa5d45e9c465eb9759375b4129c (patch)
tree728d39c1614b0cf36e424486b7166c09a980b906 /lib/dvb/dvb.cpp
parentbe092c47edfd4babfd3b4c5ea511710e6458343f (diff)
downloadenigma2-58ee3c3a218a0aa5d45e9c465eb9759375b4129c.tar.gz
enigma2-58ee3c3a218a0aa5d45e9c465eb9759375b4129c.zip
By Anders Holst:
* I have checked the effect on DM800 of the margin before GOP:s, introduced by the "timing bugs" patch and needed for DM7025. As was previously noted, the margins are not needed on DM800. Fortunately it turns out also not to have any significant adverse effects: When jumping back or forward I expected some flickering, but there are none at all! There is only one small effect as far as I have found: When a cut list is used, there are somewhat more flickering at the cut points than without the margins. Since there are flickering also without the margins, this may be considered a less serious effect. If you consider this effect serious enough though, or think that it is cleaner to separate the code for DM7025 and DM800 since the margin is needed for one but not the other, then I can try to produce such a patch. Otherwise I suggest to wait with this. * In the original timing bugs patch there were a fix to stop playback after the last OUT cut. It did this by setting the size of the next source span to 0. But this turned out not to be a good idea: It seems that playback stops immediately when the next size is set to zero, and not when the buffer is used up. Therefore playback may stop some seconds before the actual end. If instead a jump is made to the last position in the file and a non-zero size is used there, then for some reason it plays up the whole buffer. Don't ask me why it is like this. A modification to this effect is anyway included below. * Rewind did not work at all for HD movies on DM800. The picture just freezes. It is because HD movies have another sequence at beginning of frames than normal movies. There is a rather simple fix, looking for both HD and normal sequences, in the trickmode playback code. (If the HD movie sequence condition seems complicated, it is because it has to make sure not to be accidentally triggered by normal movies.)
Diffstat (limited to 'lib/dvb/dvb.cpp')
-rw-r--r--lib/dvb/dvb.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index 6edf9e87..7b05feb4 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -985,9 +985,9 @@ int eDVBChannelFilePush::filterRecordData(const unsigned char *_data, int len, s
unsigned char *ts = data + ts_offset;
int pid = ((ts[1] << 8) | ts[2]) & 0x1FFF;
- if ((d[3] == 0) && (m_pid == pid)) /* picture start */
+ if ((d[3] == 0 || d[3] == 0x09 && d[-1] == 0 && (ts[1] & 0x40)) && (m_pid == pid)) /* picture start */
{
- int picture_type = (d[5] >> 3) & 7;
+ int picture_type = (d[3]==0 ? (d[5] >> 3) & 7 : (d[4] >> 5) + 1);
d += 4;
// eDebug("%d-frame at %d, offset in TS packet: %d, pid=%04x", picture_type, offset, offset % 188, pid);
@@ -1413,10 +1413,13 @@ void eDVBChannel::getNextSourceSpan(off_t current_offset, size_t bytes_read, off
start = current_offset;
size = max;
} else {
- off_t tmp = align(m_source_span.rbegin()->second, blocksize);
- if (current_offset == tmp) {
- start = current_offset;
- size = 0;
+ off_t tmp2, tmp = align(m_source_span.rbegin()->second, blocksize);
+ pts_t len;
+ getLength(len);
+ m_tstools.getOffset(tmp2, len, 1);
+ if (current_offset == tmp || current_offset == tmp2) {
+ start = tmp2;
+ size = max;
} else {
start = tmp - align(512*1024, blocksize);
size = align(512*1024, blocksize);