<br><br><span class="gmail_quote"><br></span><br>Hi Ross,<br><br>I know full source is here. I am jusr going through the source for Client module. I am not good in C++.<br>I already written a client module with player I will just give the code below
<br><br><br>Here In player I am using a VLC stucture. <br>
<br>static block_t *Block_New(RMuint32 i_size);<br>static int Block_FifoPut(block_fifo_t*,block_t *);<br>static block_t *Block_FifoGet(block_fifo_t *);<br>static block_fifo_t *Block_FifoNew();<br><br>/******************************************************************
<br> *<br> ******************************************************************/<br>static block_t *BlockParseRTP(block_t *p_block);<br>block_t *stream_Block(RMuint32 i_size,struct context_per_task *p_task);<br>static int Stream_Read_Block(void *p_read, RMuint32 i_read,struct context_per_task *p_task);
<br>static block_t *Read_Block(struct context_per_task *);<br><br>I just want to prebuffer .. to pass to the harware decoder.<br><br><br><br>if(!pre_done){<br> for(;;){<br> if(p_task->p_sys == NULL){
<br> printf("stream_sys_t null\n");<br> goto cleanup;<br> }<br><br> if(p_task->p_sys->
block.i_size > STREAM_CACHE_SIZE){//STREAM_CACHE_PREBUFFER_SIZE){<br> printf("[%s:%d] cache size(%lu) pre done\n",__FUNCTION__,__LINE__,p_task->p_sys->block.i_size
);<br> pre_done = TRUE;<br> break;<br> }<br><br><br> block_t *b;<br> if((b = Read_Block(p_task)) == NULL){
<br> perror("fetch error");<br> continue;<br> }<br><br><br> // while(b){
<br> p_task->p_sys->block.i_size += b->i_buffer;<br> *p_task->p_sys->block.pp_last = b;<br> p_task->p_sys->
block.pp_last = &b->p_next;<br><br> b = b->p_next;<br> //}<br><br><br><br> // Block_FifoPut(gp_fifo,b);<br> }
<br> p_task->p_sys->block.p_current = p_task->p_sys->block.p_first;<br> }<br><br> p_block = stream_Block(UDP_PACKET_SIZE * 3,p_task);
<br>}<br><br>static int Block_FifoPut(block_fifo_t *p_fifo, block_t *p_block)<br>{<br> RMuint32 i_size = 0;<br><br> pthread_mutex_lock(&p_fifo->lock);<br><br><br> // do{<br> i_size += p_block->i_buffer;
<br> *p_fifo->pp_last = p_block;<br> p_fifo->pp_last = &p_block->p_next;<br> p_fifo->i_depth++;<br> p_fifo->i_size += p_block->i_buffer;<br>
<br> p_block = p_block->p_next;<br> //}while(p_block);<br><br> pthread_cond_signal(&p_fifo->wait);<br> pthread_mutex_unlock(&p_fifo->lock);<br><br><br> return i_size;
<br>}<br><br><br>I am trying to port the openRTSP module (Client) to my board. Here I have to pass the buffer like this. the player is written in c.<br>so i need to avoid the header portion and pass data to the deoder. I am trying to make a api module from LiveMedia Client module.
<br>So that I can get the buffer to the player by calling this api. i am now concentrating on mpeg2-ts only.<br>I just need to get the buffer ( which is skipped with all header). <br><br>Please give me some idea and where I need to hack for this. this is a personal mail I am doing.
<br>If possible help me ..
<br>Rgds<br><span class="sg">Rishi<br><br><br><br><br><br>
</span>