Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by a ( 14 years ago )
case START_SEND_BUFFER:
res = (NeedSize.isEmpty() || queue.isEmpty());
if(!res) {
nSize = NeedSize.dequeue();
} else
if(waitPlaying && (queue.size() > (BUF_TOTAL-2))) {
nSize = bufferSize;
}
if(!res) {
cSize = 0;
while(cSize < nSize || (iStream_state == PIPELINE_STOP && queue.size() < 7)) {
if(queue.isEmpty()) {
if (cSize != 0) {
NeedSize.enqueue(nSize-cSize);
}
break;
}
buffer = queue.dequeue();
//qDebug("*** get_buffer: %d", buf_count);
//
if (queue.size() <= BUF_MINIMUM && iStream_state != PIPELINE_PLAY) {
iStream_state = PIPELINE_PLAY;
gst_element_set_state( iStream, GST_STATE_PLAYING );
}
pos_stream = GST_BUFFER_TIMESTAMP(buffer);
cSize += GST_BUFFER_SIZE(buffer);
ret = gst_app_src_push_buffer( out_source, buffer );
if(ret != GST_FLOW_OK) {
qDebug("$$$ ERROR: push buffer returned %d", (int)ret);
break;
}
// TODO: may be it is loop
if(need_jump_position >= 0) {
gint64 duration = GST_BUFFER_DURATION(buffer);
if((pos_stream + duration) > need_jump_position) {
need_jump_position = -1;
}
}
Revise this Paste