Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: ?: How I can recording video PES to a file with NAPI



    [ The following text is in the "x-user-defined" character set. ]
    [ Your display is set for the "ISO-8859-1" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hi !


Ralph Metzler writes:
>Right now you can only record audio and video together.
>You have to set filters for both before recording.

Ok. I set they.
But from which one device should I to read the audio and video PESes
together,
/dev/ost/demux or /dev/ost/dvr (not TS)?
If I have to read from /dev/ost/demux, then can I use the filedescriptor
of the
previous for audio pes or video pes opened /dev/ost/demux device (below
demuxAudioDevFd and demuxVideoDevFd) or should I open the /dev/ost/demux
again
for a new filedescriptor and read from it?
Open I the /dev/ost/demux with O_NONBLOCK or default BLOCK, is it no
matter how?

.
.
.
// demuxAudio
    if ((demuxAudioDevFd = open("/dev/ost/demux", O_RDWR | O_NONBLOCK))
< 0) {
        perror("Demux (AUDIO) device open O_RDWR | O_NONBLOCK error");
        return -1;
    }
    else { fprintf(stderr, "Demux (AUDIO) device opened for O_RDWR |
O_NONBLOCK, demuxAudioDevFd = %d \n", demuxAudioDevFd); }

    myAudioDmxPesFilterParams.pid            = 501; // VOX audio_pes_pid

    myAudioDmxPesFilterParams.input          = DMX_IN_FRONTEND;
    myAudioDmxPesFilterParams.output         = DMX_OUT_TAP;
    myAudioDmxPesFilterParams.pesType        = DMX_PES_AUDIO;
    myAudioDmxPesFilterParams.flags          = DMX_IMMEDIATE_START;
    if (ioctl(demuxAudioDevFd, DMX_SET_PES_FILTER,
&myAudioDmxPesFilterParams) < 0) {
        perror("DMX_SET_PES_FILTER (AUDIO) error");
        return -1;
    }
    else { fprintf(stderr, "DMX_SET_PES_FILTER (AUDIO) set \n"); }

// demuxVideo
    if ((demuxVideoDevFd = open("/dev/ost/demux", O_RDWR | O_NONBLOCK))
< 0) {
        perror("Demux (VIDEO) device open O_RDWR | O_NONBLOCK error");
        return -1;
    }
    else { fprintf(stderr, "Demux (VIDEO) device opened for O_RDWR |
O_NONBLOCK, demuxVideoDevFd = %d \n", demuxVideoDevFd); }

    myVideoDmxPesFilterParams.pid            = 500; // VOX video_pes_pid

    myVideoDmxPesFilterParams.input          = DMX_IN_FRONTEND;
    myVideoDmxPesFilterParams.output         = DMX_OUT_TAP;
    myVideoDmxPesFilterParams.pesType        = DMX_PES_VIDEO;
    myVideoDmxPesFilterParams.flags          = DMX_IMMEDIATE_START;
    if (ioctl(demuxVideoDevFd, DMX_SET_PES_FILTER,
&myVideoDmxPesFilterParams) < 0) {
        perror("DMX_SET_PES_FILTER (VIDEO) error");
        return -1;
    }
    else { fprintf(stderr, "DMX_SET_PES_FILTER (VIDEO) set \n"); }
.
.
.


Thanks,
Peter



--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index