Lines Matching refs:id
44 int ivtv_claim_stream(struct ivtv_open_id *id, int type) in ivtv_claim_stream() argument
46 struct ivtv *itv = id->itv; in ivtv_claim_stream()
53 if (s->fh == &id->fh) { in ivtv_claim_stream()
62 s->fh = &id->fh; in ivtv_claim_stream()
70 s->fh = &id->fh; in ivtv_claim_stream()
427 int ivtv_start_capture(struct ivtv_open_id *id) in ivtv_start_capture() argument
429 struct ivtv *itv = id->itv; in ivtv_start_capture()
430 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_start_capture()
442 if (ivtv_claim_stream(id, s->type)) in ivtv_start_capture()
507 struct ivtv_open_id *id = fh2id(filp->private_data); in ivtv_v4l2_read() local
508 struct ivtv *itv = id->itv; in ivtv_v4l2_read()
509 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_v4l2_read()
516 rc = ivtv_start_capture(id); in ivtv_v4l2_read()
523 int ivtv_start_decoding(struct ivtv_open_id *id, int speed) in ivtv_start_decoding() argument
525 struct ivtv *itv = id->itv; in ivtv_start_decoding()
526 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_start_decoding()
530 if (ivtv_claim_stream(id, s->type)) { in ivtv_start_decoding()
550 struct ivtv_open_id *id = fh2id(filp->private_data); in ivtv_write() local
551 struct ivtv *itv = id->itv; in ivtv_write()
552 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_write()
570 if (ivtv_claim_stream(id, s->type)) in ivtv_write()
592 rc = ivtv_start_decoding(id, itv->speed); in ivtv_write()
722 struct ivtv_open_id *id = fh2id(filp->private_data); in ivtv_v4l2_write() local
723 struct ivtv *itv = id->itv; in ivtv_v4l2_write()
735 struct ivtv_open_id *id = fh2id(filp->private_data); in ivtv_v4l2_dec_poll() local
736 struct ivtv *itv = id->itv; in ivtv_v4l2_dec_poll()
737 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_v4l2_dec_poll()
745 if (!list_empty(&id->fh.subscribed)) { in ivtv_v4l2_dec_poll()
746 poll_wait(filp, &id->fh.wait, wait); in ivtv_v4l2_dec_poll()
749 if (v4l2_event_pending(&id->fh)) in ivtv_v4l2_dec_poll()
770 struct ivtv_open_id *id = fh2id(filp->private_data); in ivtv_v4l2_enc_poll() local
771 struct ivtv *itv = id->itv; in ivtv_v4l2_enc_poll()
772 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_v4l2_enc_poll()
783 rc = ivtv_start_capture(id); in ivtv_v4l2_enc_poll()
796 if (v4l2_event_pending(&id->fh)) in ivtv_v4l2_enc_poll()
799 poll_wait(filp, &id->fh.wait, wait); in ivtv_v4l2_enc_poll()
808 void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end) in ivtv_stop_capture() argument
810 struct ivtv *itv = id->itv; in ivtv_stop_capture()
811 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_stop_capture()
824 if (id->type == IVTV_ENC_STREAM_TYPE_MPG && in ivtv_stop_capture()
830 if ((id->type == IVTV_DEC_STREAM_TYPE_VBI || in ivtv_stop_capture()
831 id->type == IVTV_ENC_STREAM_TYPE_VBI) && in ivtv_stop_capture()
847 static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts) in ivtv_stop_decoding() argument
849 struct ivtv *itv = id->itv; in ivtv_stop_decoding()
850 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_stop_decoding()
854 if (id->type == IVTV_DEC_STREAM_TYPE_YUV && in ivtv_stop_decoding()
870 if (itv->output_mode == OUT_UDMA_YUV && id->yuv_frames) in ivtv_stop_decoding()
881 struct ivtv_open_id *id = fh2id(fh); in ivtv_v4l2_close() local
882 struct ivtv *itv = id->itv; in ivtv_v4l2_close()
883 struct ivtv_stream *s = &itv->streams[id->type]; in ivtv_v4l2_close()
890 if (id->type == IVTV_ENC_STREAM_TYPE_RAD && in ivtv_v4l2_close()
918 if (s->fh != &id->fh) in ivtv_v4l2_close()
926 ivtv_stop_decoding(id, V4L2_DEC_CMD_STOP_TO_BLACK | V4L2_DEC_CMD_STOP_IMMEDIATELY, 0); in ivtv_v4l2_close()
935 ivtv_stop_capture(id, 0); in ivtv_v4l2_close()
938 kfree(id); in ivtv_v4l2_close()