Exemplo n.º 1
0
static char *fill_and_wait_asynchronous_buffer(struct mp4_read_struct *reader, struct mp4_asynchronous_buffer *p, SceUID handle, int track_id, unsigned int trunk_index) {
	char *result = fill_asynchronous_buffer(reader, p, handle, track_id, trunk_index);
	if (result != 0) {
		return(result);
	}

	result = wait_asynchronous_buffer(reader, p, handle);
	if (result != 0) {
		return(result);
	}

	return(0);
}
Exemplo n.º 2
0
static char *fill_and_wait_asynchronous_buffer(struct pmp_read_struct *reader, struct asynchronous_buffer *p, unsigned int first_packet, unsigned int first_packet_position, unsigned int seek)
	{
	char *result = fill_asynchronous_buffer(reader, p, first_packet, first_packet_position, seek);
	if (result != 0)
		{
		return(result);
		}


	result = wait_asynchronous_buffer(reader, p);
	if (result != 0)
		{
		return(result);
		}


	return(0);
	}
Exemplo n.º 3
0
static char *audio_fill_next_asynchronous_buffer(struct mp4_read_struct *reader) {
	
	unsigned int trunk_index = reader->audio_current_asynchronous_buffer->trunk_index + 1;
	if (trunk_index == reader->file.info->tracks[reader->file.audio_track_ids[reader->current_audio_track]]->stco_entry_count) {
		trunk_index = 0;
	}

	char *result = fill_asynchronous_buffer(
		reader, reader->audio_next_asynchronous_buffer, 
		reader->audio_handle, 
		reader->file.audio_track_ids[reader->current_audio_track], 
		trunk_index);
	if (result != 0) {
		return(result);
	}

	return(0);
}
Exemplo n.º 4
0
static char *fill_next_asynchronous_buffer(struct pmp_read_struct *reader, unsigned int seek)
	{
	unsigned int first_packet          = reader->current_asynchronous_buffer->last_packet + 1;
	unsigned int first_packet_position = reader->current_asynchronous_buffer->next_packet_position;


	if (first_packet == reader->file.header.video.number_of_frames)
		{
		first_packet          = 0;
		first_packet_position = reader->file.packet_start;
		}


	char *result = fill_asynchronous_buffer(reader, reader->next_asynchronous_buffer, first_packet, first_packet_position, seek);
	if (result != 0)
		{
		return(result);
		}


	return(0);
	}