- Timestamp:
- Feb 24, 2011 7:47:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-videodev/dshow_dev.c
r3402 r3420 90 90 struct dshow_stream 91 91 { 92 pjmedia_vid_ stream base; /**< Base stream*/93 pjmedia_vid_param param; /**< Settings*/94 pj_pool_t *pool; /**< Memory pool.*/95 96 pjmedia_vid_cb vid_cb; /**< Stream callback.*/97 void *user_data; /**< Application data.*/98 99 pj_bool_t 100 pj_bool_t rend_thread_exited;101 pj_bool_t cap_thread_exited;102 pj_bool_t cap_thread_initialized;103 pj_thread_desc cap_thread_desc;104 pj_thread_t *cap_thread;92 pjmedia_vid_dev_stream base; /**< Base stream */ 93 pjmedia_vid_param param; /**< Settings */ 94 pj_pool_t *pool; /**< Memory pool. */ 95 96 pjmedia_vid_cb vid_cb; /**< Stream callback. */ 97 void *user_data; /**< Application data. */ 98 99 pj_bool_t quit_flag; 100 pj_bool_t rend_thread_exited; 101 pj_bool_t cap_thread_exited; 102 pj_bool_t cap_thread_initialized; 103 pj_thread_desc cap_thread_desc; 104 pj_thread_t *cap_thread; 105 105 106 106 struct dshow_graph … … 127 127 unsigned index, 128 128 pjmedia_vid_param *param); 129 static pj_status_t dshow_factory_create_stream(pjmedia_vid_dev_factory *f, 130 const pjmedia_vid_param *param, 131 const pjmedia_vid_cb *cb, 132 void *user_data, 133 pjmedia_vid_stream **p_vid_strm); 134 135 static pj_status_t dshow_stream_get_param(pjmedia_vid_stream *strm, 129 static pj_status_t dshow_factory_create_stream( 130 pjmedia_vid_dev_factory *f, 131 const pjmedia_vid_param *param, 132 const pjmedia_vid_cb *cb, 133 void *user_data, 134 pjmedia_vid_dev_stream **p_vid_strm); 135 136 static pj_status_t dshow_stream_get_param(pjmedia_vid_dev_stream *strm, 136 137 pjmedia_vid_param *param); 137 static pj_status_t dshow_stream_get_cap(pjmedia_vid_ stream *strm,138 static pj_status_t dshow_stream_get_cap(pjmedia_vid_dev_stream *strm, 138 139 pjmedia_vid_dev_cap cap, 139 140 void *value); 140 static pj_status_t dshow_stream_set_cap(pjmedia_vid_ stream *strm,141 static pj_status_t dshow_stream_set_cap(pjmedia_vid_dev_stream *strm, 141 142 pjmedia_vid_dev_cap cap, 142 143 const void *value); 143 static pj_status_t dshow_stream_start(pjmedia_vid_ stream *strm);144 static pj_status_t dshow_stream_put_frame(pjmedia_vid_ stream *strm,144 static pj_status_t dshow_stream_start(pjmedia_vid_dev_stream *strm); 145 static pj_status_t dshow_stream_put_frame(pjmedia_vid_dev_stream *strm, 145 146 const pjmedia_frame *frame); 146 static pj_status_t dshow_stream_stop(pjmedia_vid_ stream *strm);147 static pj_status_t dshow_stream_destroy(pjmedia_vid_ stream *strm);147 static pj_status_t dshow_stream_stop(pjmedia_vid_dev_stream *strm); 148 static pj_status_t dshow_stream_destroy(pjmedia_vid_dev_stream *strm); 148 149 149 150 /* Operations */ … … 158 159 }; 159 160 160 static pjmedia_vid_ stream_op stream_op =161 static pjmedia_vid_dev_stream_op stream_op = 161 162 { 162 163 &dshow_stream_get_param, … … 396 397 /* Set the device capabilities here */ 397 398 param->clock_rate = DEFAULT_CLOCK_RATE; 398 param->frame_rate.num = DEFAULT_FPS;399 param->frame_rate.denum = 1;399 //param->frame_rate.num = DEFAULT_FPS; 400 //param->frame_rate.denum = 1; 400 401 param->flags = PJMEDIA_VID_DEV_CAP_FORMAT; 401 402 … … 439 440 440 441 /* API: Put frame from stream */ 441 static pj_status_t dshow_stream_put_frame(pjmedia_vid_ stream *strm,442 static pj_status_t dshow_stream_put_frame(pjmedia_vid_dev_stream *strm, 442 443 const pjmedia_frame *frame) 443 444 { … … 698 699 699 700 /* API: create stream */ 700 static pj_status_t dshow_factory_create_stream(pjmedia_vid_dev_factory *f, 701 const pjmedia_vid_param *param, 702 const pjmedia_vid_cb *cb, 703 void *user_data, 704 pjmedia_vid_stream **p_vid_strm) 701 static pj_status_t dshow_factory_create_stream( 702 pjmedia_vid_dev_factory *f, 703 const pjmedia_vid_param *param, 704 const pjmedia_vid_cb *cb, 705 void *user_data, 706 pjmedia_vid_dev_stream **p_vid_strm) 705 707 { 706 708 struct dshow_factory *df = (struct dshow_factory*)f; … … 753 755 754 756 on_error: 755 dshow_stream_destroy((pjmedia_vid_ stream *)strm);757 dshow_stream_destroy((pjmedia_vid_dev_stream *)strm); 756 758 return PJ_EUNKNOWN; 757 759 } 758 760 759 761 /* API: Get stream info. */ 760 static pj_status_t dshow_stream_get_param(pjmedia_vid_ stream *s,762 static pj_status_t dshow_stream_get_param(pjmedia_vid_dev_stream *s, 761 763 pjmedia_vid_param *pi) 762 764 { … … 777 779 778 780 /* API: get capability */ 779 static pj_status_t dshow_stream_get_cap(pjmedia_vid_ stream *s,781 static pj_status_t dshow_stream_get_cap(pjmedia_vid_dev_stream *s, 780 782 pjmedia_vid_dev_cap cap, 781 783 void *pval) … … 797 799 798 800 /* API: set capability */ 799 static pj_status_t dshow_stream_set_cap(pjmedia_vid_ stream *s,801 static pj_status_t dshow_stream_set_cap(pjmedia_vid_dev_stream *s, 800 802 pjmedia_vid_dev_cap cap, 801 803 const void *pval) … … 817 819 818 820 /* API: Start stream. */ 819 static pj_status_t dshow_stream_start(pjmedia_vid_ stream *strm)821 static pj_status_t dshow_stream_start(pjmedia_vid_dev_stream *strm) 820 822 { 821 823 struct dshow_stream *stream = (struct dshow_stream*)strm; … … 843 845 844 846 /* API: Stop stream. */ 845 static pj_status_t dshow_stream_stop(pjmedia_vid_ stream *strm)847 static pj_status_t dshow_stream_stop(pjmedia_vid_dev_stream *strm) 846 848 { 847 849 struct dshow_stream *stream = (struct dshow_stream*)strm; … … 869 871 870 872 /* API: Destroy stream. */ 871 static pj_status_t dshow_stream_destroy(pjmedia_vid_ stream *strm)873 static pj_status_t dshow_stream_destroy(pjmedia_vid_dev_stream *strm) 872 874 { 873 875 struct dshow_stream *stream = (struct dshow_stream*)strm;
Note: See TracChangeset
for help on using the changeset viewer.