Logo Search packages:      
Sourcecode: vdr-plugin-dvd version File versions  Download package

void A52decoder::init_ipack ( int  p_size,
uint32_t  pktpts,
uint8_t  SubStreamId 
) [private]

struct LPCMHeader { int id:8; // id int frame_count:8; // number of frames int access_ptr:16; // first acces unit pointer, i.e. start of audio frame bool emphasis:1; // audio emphasis on-off bool mute:1; // audio mute on-off bool reserved:1; // reserved int frame_number:5; // audio frame number int quant_wlen:2; // quantization word length int sample_freq:2; // audio sampling frequency (48khz=0, 96khz=1, 44,1khz=2, 32khz=3) bool reserved2:1; // reserved int chan_count:3; // number of audio channels - 1 (e.g. stereo = 1) int dyn_range_ctrl:8; // dynamic range control (0x80 if off) };

Definition at line 230 of file ca52.c.

{
    int header = pktpts ? 5 :0;

    int length = 10 + header + p_size;

    blk_ptr[0] = 0x00;
    blk_ptr[1] = 0x00;
    blk_ptr[2] = 0x01;
    blk_ptr[3] = PRIVATE_STREAM1;
    blk_ptr[4] = (length >> 8) & 0xff;
    blk_ptr[5] = length & 0xff;
    blk_ptr[6] = 0x84;
    blk_ptr[7] = pktpts ? 0x80 : 0;
    blk_ptr[8] = header;
    blk_ptr += 9;

    if (header) {
        cPStream::toPTS(blk_ptr, pktpts);
    }

    blk_ptr += header;

/**
 *
struct LPCMHeader { int id:8;              // id
                    int frame_count:8;     // number of frames
                    int access_ptr:16;     // first acces unit pointer, i.e. start of audio frame
                    bool emphasis:1;       // audio emphasis on-off
                    bool mute:1;           // audio mute on-off
                    bool reserved:1;       // reserved
                    int frame_number:5;    // audio frame number
                    int quant_wlen:2;      // quantization word length
                    int sample_freq:2;     // audio sampling frequency (48khz=0, 96khz=1, 44,1khz=2, 32khz=3)
                    bool reserved2:1;      // reserved
                    int chan_count:3;      // number of audio channels - 1 (e.g. stereo = 1)
                    int dyn_range_ctrl:8;  // dynamic range control (0x80 if off)
                    };
 *
 */
    blk_ptr[0] = aLPCM + SubStreamId; // substream ID
    // other stuff (see DVB specs), may be ignored by driver
    // but try to set it up correctly ..
    blk_ptr[1] = 0x07;  // number of frames
    blk_ptr[2] = 0x00;  // start of audio frame
    blk_ptr[3] = 0x04;  // start of audio frame
    blk_ptr[4] = 0x0C;  // emph, mute, res, frame_num
    blk_ptr[5] = 0x01;  // quantwlen, samplefreq, channels (48kHz, stereo)
    blk_ptr[6] = 0x80;  // dynam. range ctrl (off)
    blk_ptr += 7;

    blk_size += 16 + header;

}

Generated by  Doxygen 1.6.0   Back to index