Changeset 633 for pjproject/trunk/pjmedia/src/pjmedia/stream.c
- Timestamp:
- Jul 29, 2006 11:14:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r569 r633 144 144 static pj_status_t get_frame( pjmedia_port *port, pjmedia_frame *frame) 145 145 { 146 pjmedia_stream *stream = port-> user_data;146 pjmedia_stream *stream = port->port_data.pdata; 147 147 pjmedia_channel *channel = stream->dec; 148 148 unsigned samples_count, samples_per_frame, samples_required; … … 439 439 const pjmedia_frame *frame ) 440 440 { 441 pjmedia_stream *stream = port-> user_data;441 pjmedia_stream *stream = port->port_data.pdata; 442 442 pjmedia_channel *channel = stream->enc; 443 443 pj_status_t status = 0; … … 914 914 { 915 915 pjmedia_stream *stream; 916 pj_str_t name; 916 917 unsigned jb_init, jb_max, jb_min_pre, jb_max_pre; 917 918 pj_status_t status; … … 926 927 927 928 /* Init stream/port name */ 928 stream->port.info.name.ptr = pj_pool_alloc(pool, 24); 929 pj_ansi_sprintf(stream->port.info.name.ptr, 930 "strm%p", stream); 931 stream->port.info.name.slen = pj_ansi_strlen(stream->port.info.name.ptr); 929 name.ptr = pj_pool_alloc(pool, 24); 930 name.slen = pj_ansi_snprintf(name.ptr, 24, "strm%p", stream); 931 932 933 /* Init some port-info. Some parts of the info will be set later 934 * once we have more info about the codec. 935 */ 936 pjmedia_port_info_init(&stream->port.info, &name, 937 PJMEDIA_PORT_SIGNATURE('S', 'T', 'R', 'M'), 938 info->fmt.clock_rate, info->fmt.channel_cnt, 939 16, 80); 932 940 933 941 /* Init port. */ 934 stream->port.info.signature = ('S'<<3 | 'T'<<2 | 'R'<<1 | 'M'); 935 stream->port.info.type = PJMEDIA_TYPE_AUDIO; 936 stream->port.info.has_info = 1; 937 stream->port.info.need_info = 0; 938 stream->port.info.pt = info->fmt.pt; 942 939 943 pj_strdup(pool, &stream->port.info.encoding_name, &info->fmt.encoding_name); 940 944 stream->port.info.clock_rate = info->fmt.clock_rate; 941 945 stream->port.info.channel_count = info->fmt.channel_cnt; 942 stream->port. user_data = stream;946 stream->port.port_data.pdata = stream; 943 947 stream->port.put_frame = &put_frame; 944 948 stream->port.get_frame = &get_frame;
Note: See TracChangeset
for help on using the changeset viewer.