Esempio n. 1
0
        DeckLinkInputAdapter(unsigned int card_index = 0,
                unsigned int norm_ = 0, unsigned int input_ = 0,
                RawFrame::PixelFormat pf_ = RawFrame::CbYCrY8422,
                bool enable_audio = false) 
                : deckLink(NULL), out_pipe(IN_PIPE_SIZE) {

            audio_pipe = NULL;

            pf = pf_;
            bpf = convert_pf(pf_);

            deckLink = find_card(card_index);
            select_input_connection(input_);
            open_input(norm_);

            if (enable_audio) {
                n_channels = 2;
                select_audio_input_connection( );
                open_audio_input( );
            }

            start_capture( );
        }
Esempio n. 2
0
        DeckLinkInputAdapter(unsigned int card_index = 0,
                unsigned int norm_ = 0, unsigned int input_ = 0,
                RawFrame::PixelFormat pf_ = RawFrame::CbYCrY8422,
                bool enable_audio = false, unsigned int n_channels = 2,
                bool enable_video = true)
                : deckLink(NULL), out_pipe(IN_PIPE_SIZE) {

            audio_pipe = NULL;
            started = false;
            signal_lost = false;
            rotate = false;
            this->enable_video = enable_video;

            n_frames = 0;
            start_time = 0;
            avsync = 0;
            drop_audio = 0;

            pf = pf_;
            bpf = convert_pf(pf_);

            deckLink = find_card(card_index);
            select_input_connection(input_);
            open_input(norm_);

            if (enable_audio) {
                audio_pipe = new Pipe<IOAudioPacket *>(IN_PIPE_SIZE);
            }

            this->n_channels = n_channels;
            select_audio_input_connection( );
            open_audio_input( );


            start_capture( );

        }