~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythtv/mpeg/mpegstreamdata.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey), Jamie Bennett, Mario Limonciello, Dave Walker (Daviey)
  • Date: 2010-03-23 19:32:33 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323193233-5sv9djoxtlmwt3ca
Tags: 0.23.0+fixes23789-0ubuntu1
[ Jamie Bennett ]
* Fix FTBFS on armel (LP: #537714)

[ Mario Limonciello ]
* mythtv-{common,backend}.{config,templates,postinst}: (LP: #483748)
  - Simplify debconf questions by avoiding showing the generated pw
  - Don't warn about mythtv group.
  - Don't notify about running mythtv-setup.  This is optional (but
    of course encouraged!)
* Set version to include a "+" delimitter.
* Restore libfaad-dev dependency. (LP: #546552)

[ Dave Walker (Daviey) ]
* New snapshot (r23789), based from 0.23-fixes.
* debian/control:
  - mythtv-frontend set to Conflict with mythflix, as it's dropped
    upstream. (LP: #544521)
  - Remove unnecessary and potentially problematic use of Pre-Depends.
  - Set the debug package to Priority extra.
  - Change *-perl Section's from libs to perl
  - add ${shlibs:Depends} for mythtv-common Depends field
  - Minor spelling fix.
  - Fixes the long description for one of the packages, ensuring the
    description doesn't exceed 80 characters.
  - Vcs-* set to -fixes, rather than -trunk.
* debian/rules:
  - Use debconf-updatepo to update translations when required
  - Ensure license files are not included in the binary packages, except 
    for debian/copyright.
  - Fixes the permissions of certain files in the packaging.
* debian/copyright:
  - updated to reflect that mythtv is GPL-2 only.
  - inserted better licence statement and Copyright reference.
* debian/mythtv-*.templates
  - Simplified strings; removed verbosity and improved readability.
* Prevent the maintainer scripts from failing in case any questions 
  can't be displayed.
* Added holding debian/mythtv-frontend.config, mainly to appease lintian.
* debian/mythtv-frontend.menu: Changed section to Applications/Graphics.
* debian/mythtv-backend.postinst: Load debconf libraries.
* debian/source.lintian-overrides: Removes the unecessary override of the 
  binNMU warnings.
* Fix perl binding installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
      _strip_pmt_descriptors(false),
75
75
      _normalize_stream_type(true),
76
76
      _pid_video_single_program(0xffffffff),
77
 
      _pid_pmt_single_program(0xffffffff),      
 
77
      _pid_pmt_single_program(0xffffffff),
78
78
      _pmt_single_program_num_video(1),
79
79
      _pmt_single_program_num_audio(0),
80
80
      _pat_single_program(NULL), _pmt_single_program(NULL),
289
289
        {
290
290
            if (partial->pesdata()[psip->SectionLength()] != 0xff)
291
291
            {
292
 
#if 0 /* This doesn't work, you can't start PES packet like this 
 
292
#if 0 /* This doesn't work, you can't start PES packet like this
293
293
         because the PayloadStart() flag won't be set in this TSPacket
294
294
         -- dtk  May 4th, 2007
295
295
       */
368
368
 
369
369
    PSIPTable *psip = new PSIPTable(*tspacket); // must be complete packet
370
370
 
371
 
    // There might be another section after this one in the 
372
 
    // current packet. We need room before the end of the 
 
371
    // There might be another section after this one in the
 
372
    // current packet. We need room before the end of the
373
373
    // packet, and it must not be packet stuffing.
374
374
    if ((offset + psip->SectionLength() < TSPacket::SIZE) &&
375
375
        (pesdata[psip->SectionLength() + 1] != 0xff))
376
376
    {
377
 
        // This isn't sutffing, so we need to put this 
 
377
        // This isn't sutffing, so we need to put this
378
378
        // on as a partial packet.
379
379
        PESPacket *pesp = new PESPacket(*tspacket);
380
380
        pesp->SetPSIOffset(offset + psip->SectionLength());
484
484
            desc_list_t vdesc = MPEGDescriptor::ParseOnlyInclude(
485
485
                vct[i]->GlobalDescriptors(),
486
486
                vct[i]->GlobalDescriptorsLength(),
487
 
                DescriptorID::caption_service); 
 
487
                DescriptorID::caption_service);
488
488
 
489
489
            if (vdesc.size())
490
490
                desc.insert(desc.end(), vdesc.begin(), vdesc.end());
603
603
        types.push_back(type);
604
604
    }
605
605
 
606
 
    if (video_cnt < _pmt_single_program_num_video) 
 
606
    if (video_cnt < _pmt_single_program_num_video)
607
607
    {
608
608
        VERBOSE(VB_RECORD, "Only "<<video_cnt<<" video streams seen in PMT, "
609
609
                "but "<<_pmt_single_program_num_video<<" are required.");
634
634
    int pcrpidIndex = pmt.FindPID(pmt.PCRPID());
635
635
    if (pcrpidIndex < 0)
636
636
    {
637
 
        // the timecode reference stream is not in the PMT, 
 
637
        // the timecode reference stream is not in the PMT,
638
638
        // add stream to misc record streams
639
639
        AddWritingPID(pmt.PCRPID());
640
640
    }
1017
1017
int MPEGStreamData::ResyncStream(const unsigned char *buffer, int curr_pos,
1018
1018
                                 int len)
1019
1019
{
1020
 
    // Search for two sync bytes 188 bytes apart, 
 
1020
    // Search for two sync bytes 188 bytes apart,
1021
1021
    int pos = curr_pos;
1022
1022
    int nextpos = pos + TSPacket::SIZE;
1023
1023
    if (nextpos >= len)
1024
1024
        return -1; // not enough bytes; caller should try again
1025
 
    
 
1025
 
1026
1026
    while (buffer[pos] != SYNC_BYTE || buffer[nextpos] != SYNC_BYTE)
1027
1027
    {
1028
1028
        pos++;
1605
1605
    AddListeningPID(pid);
1606
1606
 
1607
1607
    _encryption_pid_to_info[pid] = CryptInfo((isvideo) ? 10000 : 500, 8);
1608
 
    
 
1608
 
1609
1609
    _encryption_pid_to_pnums[pid].push_back(pnum);
1610
1610
    _encryption_pnum_to_pids[pnum].push_back(pid);
1611
1611
    _encryption_pnum_to_status[pnum] = kEncUnknown;