当前位置: 首页>>代码示例>>C++>>正文


C++ write_atom_header函数代码示例

本文整理汇总了C++中write_atom_header函数的典型用法代码示例。如果您正苦于以下问题:C++ write_atom_header函数的具体用法?C++ write_atom_header怎么用?C++ write_atom_header使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了write_atom_header函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: mss_write_uuid_tfrf_atom

static u_char*
mss_write_uuid_tfrf_atom(u_char* p, segment_timing_info_t* timing_info)
{
	size_t atom_size = TFRF_ATOM_SIZE;
	uint64_t timestamp;
	uint64_t duration;
	int i;

	timestamp = timing_info->timestamp;
	duration = timing_info->duration;

	write_atom_header(p, atom_size, 'u', 'u', 'i', 'd');
	p = vod_copy(p, tfrf_uuid, sizeof(tfrf_uuid));
	write_be32(p, 0x01000000);		// version / flags
	*p++ = MSS_LOOK_AHEAD_COUNT;

	for (i = 0; i < MSS_LOOK_AHEAD_COUNT; i++)
	{
		timestamp += duration;
		write_be64(p, timestamp);
		write_be64(p, duration);
	}

	return p;
}
开发者ID:opshu,项目名称:nginx-vod-module,代码行数:25,代码来源:mss_packager.c

示例2: edash_packager_passthrough_write_encryption_atoms

static u_char*
edash_packager_passthrough_write_encryption_atoms(void* ctx, u_char* p, size_t mdat_atom_start)
{
	mp4_encrypt_passthrough_context_t* context = ctx;
	media_clip_filtered_t* cur_clip;
	media_sequence_t* sequence = context->sequence;
	media_track_t* cur_track;
	size_t senc_atom_size;
	uint32_t flags;

	// saiz / saio
	p = mp4_encrypt_passthrough_write_saiz_saio(ctx, p, mdat_atom_start - context->auxiliary_info_size);

	// senc
	senc_atom_size = ATOM_HEADER_SIZE + sizeof(senc_atom_t) + context->auxiliary_info_size;
	write_atom_header(p, senc_atom_size, 's', 'e', 'n', 'c');
	flags = context->use_subsamples ? 0x2 : 0x0;
	write_be32(p, flags);		// flags
	write_be32(p, sequence->total_frame_count);
	for (cur_clip = sequence->filtered_clips; cur_clip < sequence->filtered_clips_end; cur_clip++)
	{
		cur_track = cur_clip->first_track;
		p = vod_copy(p, 
			cur_track->encryption_info.auxiliary_info, 
			cur_track->encryption_info.auxiliary_info_end - cur_track->encryption_info.auxiliary_info);
	}

	return p;
}
开发者ID:Boburjon,项目名称:nginx-vod-module,代码行数:29,代码来源:edash_packager.c

示例3: mp4_builder_write_audio_trun_atom

static u_char* 
mp4_builder_write_audio_trun_atom(u_char* p, media_sequence_t* sequence, uint32_t first_frame_offset)
{
	media_clip_filtered_t* cur_clip;
	input_frame_t* cur_frame;
	input_frame_t* last_frame;
	size_t atom_size;

	atom_size = ATOM_HEADER_SIZE + sizeof(trun_atom_t) + sequence->total_frame_count * 2 * sizeof(uint32_t);

	write_atom_header(p, atom_size, 't', 'r', 'u', 'n');
	write_be32(p, 0x301);								// flags = data offset, duration, size
	write_be32(p, sequence->total_frame_count);
	write_be32(p, first_frame_offset);	// first frame offset relative to moof start offset

	for (cur_clip = sequence->filtered_clips; cur_clip < sequence->filtered_clips_end; cur_clip++)
	{
		cur_frame = cur_clip->first_track->first_frame;
		last_frame = cur_clip->first_track->last_frame;
		for (; cur_frame < last_frame; cur_frame++)
		{
			write_be32(p, cur_frame->duration);
			write_be32(p, cur_frame->size);
		}
	}
	return p;
}
开发者ID:heartshare,项目名称:nginx-vod-module,代码行数:27,代码来源:mp4_builder.c

示例4: hds_write_afra_atom_header

static u_char*
hds_write_afra_atom_header(u_char* p, size_t atom_size, uint32_t video_key_frame_count)
{
	write_atom_header(p, atom_size, 'a', 'f', 'r', 'a');
	write_be32(p, 0);
	*p++ = 0xC0;								// LongIDs | LongOffsets
	write_be32(p, HDS_TIMESCALE);				// timescale
	write_be32(p, video_key_frame_count);		// entries
	return p;
}
开发者ID:heartshare,项目名称:nginx-vod-module,代码行数:10,代码来源:hds_fragment.c

示例5: mp4_builder_write_mfhd_atom

u_char*
mp4_builder_write_mfhd_atom(u_char* p, uint32_t segment_index)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(mfhd_atom_t);

	write_atom_header(p, atom_size, 'm', 'f', 'h', 'd');
	write_be32(p, 0);
	write_be32(p, segment_index);
	return p;
}
开发者ID:Bairavan,项目名称:nginx-vod-module,代码行数:10,代码来源:mp4_builder.c

示例6: dash_packager_write_tfdt64_atom

static u_char*
dash_packager_write_tfdt64_atom(u_char* p, uint64_t earliest_pres_time)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(tfdt64_atom_t);

	write_atom_header(p, atom_size, 't', 'f', 'd', 't');
	write_dword(p, 0x01000000);			// version = 1
	write_qword(p, earliest_pres_time);
	return p;
}
开发者ID:x5u,项目名称:nginx-vod-module,代码行数:10,代码来源:dash_packager.c

示例7: mss_playready_audio_write_uuid_piff_atom

static u_char*
mss_playready_audio_write_uuid_piff_atom(u_char* p, mp4_encrypt_state_t* state, media_sequence_t* sequence, size_t atom_size)
{
	write_atom_header(p, atom_size, 'u', 'u', 'i', 'd');
	p = vod_copy(p, piff_uuid, sizeof(piff_uuid));
	write_dword(p, 0);
	write_dword(p, sequence->total_frame_count);
	p = mp4_encrypt_audio_write_auxiliary_data(state, p);

	return p;
}
开发者ID:jos89,项目名称:nginx-vod-module,代码行数:11,代码来源:mss_playready.c

示例8: mss_write_tfhd_atom

static u_char*
mss_write_tfhd_atom(u_char* p, uint32_t track_id, uint32_t flags)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(tfhd_atom_t);

	write_atom_header(p, atom_size, 't', 'f', 'h', 'd');
	write_dword(p, 0x20);		// default sample flags
	write_dword(p, track_id);
	write_dword(p, flags);
	return p;
}
开发者ID:0myc,项目名称:nginx-vod-module,代码行数:11,代码来源:mss_packager.c

示例9: mss_playready_video_write_uuid_piff_atom

static u_char*
mss_playready_video_write_uuid_piff_atom(u_char* p, mp4_encrypt_video_state_t* state, media_sequence_t* sequence, size_t atom_size)
{
	write_atom_header(p, atom_size, 'u', 'u', 'i', 'd');
	p = vod_copy(p, piff_uuid, sizeof(piff_uuid));
	write_be32(p, 2);
	write_be32(p, sequence->total_frame_count);
	p = vod_copy(p, state->auxiliary_data.start, state->auxiliary_data.pos - state->auxiliary_data.start);

	return p;
}
开发者ID:soloaustin,项目名称:nginx-vod-module,代码行数:11,代码来源:mss_playready.c

示例10: mp4_encrypt_audio_write_saiz_saio

u_char*
mp4_encrypt_audio_write_saiz_saio(mp4_encrypt_state_t* state, u_char* p, size_t auxiliary_data_offset)
{
	size_t saiz_atom_size = ATOM_HEADER_SIZE + sizeof(saiz_atom_t);
	size_t saio_atom_size = ATOM_HEADER_SIZE + sizeof(saio_atom_t);

	// moof.traf.saiz
	write_atom_header(p, saiz_atom_size, 's', 'a', 'i', 'z');
	write_be32(p, 0);			// version, flags
	*p++ = MP4_AES_CTR_IV_SIZE;				// default auxiliary sample size
	write_be32(p, state->sequence->total_frame_count);

	// moof.traf.saio
	write_atom_header(p, saio_atom_size, 's', 'a', 'i', 'o');
	write_be32(p, 0);			// version, flags
	write_be32(p, 1);			// entry count
	write_be32(p, auxiliary_data_offset);

	return p;
}
开发者ID:Classsic,项目名称:nginx-vod-module,代码行数:20,代码来源:mp4_encrypt.c

示例11: mss_write_uuid_tfxd_atom

static u_char*
mss_write_uuid_tfxd_atom(u_char* p, segment_timing_info_t* timing_info)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(uuid_tfxd_atom_t);

	write_atom_header(p, atom_size, 'u', 'u', 'i', 'd');
	p = vod_copy(p, tfxd_uuid, sizeof(tfxd_uuid));
	write_be32(p, 0x01000000);		// version / flags
	write_be64(p, timing_info->timestamp);
	write_be64(p, timing_info->duration);
	return p;
}
开发者ID:opshu,项目名称:nginx-vod-module,代码行数:12,代码来源:mss_packager.c

示例12: hds_write_tfhd_atom

static u_char*
hds_write_tfhd_atom(u_char* p, uint32_t track_id, uint64_t base_data_offset)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(tfhd_atom_t);

	write_atom_header(p, atom_size, 't', 'f', 'h', 'd');
	write_be32(p, 3);							// flags - base data offset | sample description
	write_be32(p, track_id);
	write_be64(p, base_data_offset);
	write_be32(p, 1);							// sample_desc_index
	return p;
}
开发者ID:heartshare,项目名称:nginx-vod-module,代码行数:12,代码来源:hds_fragment.c

示例13: mp4_encrypt_video_write_saiz_saio

u_char*
mp4_encrypt_video_write_saiz_saio(mp4_encrypt_video_state_t* state, u_char* p, size_t auxiliary_data_offset)
{
	// moof.traf.saiz
	write_atom_header(p, state->base.saiz_atom_size, 's', 'a', 'i', 'z');
	write_be32(p, 0);			// version, flags
	*p++ = state->default_auxiliary_sample_size;
	write_be32(p, state->saiz_sample_count);
	if (state->default_auxiliary_sample_size == 0)
	{
		p = vod_copy(p, state->auxiliary_sample_sizes, state->saiz_sample_count);
	}

	// moof.traf.saio
	write_atom_header(p, state->base.saio_atom_size, 's', 'a', 'i', 'o');
	write_be32(p, 0);			// version, flags
	write_be32(p, 1);			// entry count
	write_be32(p, auxiliary_data_offset);

	return p;
}
开发者ID:Classsic,项目名称:nginx-vod-module,代码行数:21,代码来源:mp4_encrypt.c

示例14: edash_packager_write_pssh

static u_char*
edash_packager_write_pssh(u_char* p, drm_system_info_t* cur_info)
{
	size_t pssh_atom_size;

	pssh_atom_size = ATOM_HEADER_SIZE + sizeof(pssh_atom_t) + cur_info->data.len;

	write_atom_header(p, pssh_atom_size, 'p', 's', 's', 'h');
	write_be32(p, 0);						// version + flags
	p = vod_copy(p, cur_info->system_id, DRM_SYSTEM_ID_SIZE);	// system id
	write_be32(p, cur_info->data.len);		// data size
	p = vod_copy(p, cur_info->data.data, cur_info->data.len);
	return p;
}
开发者ID:nginx-modules,项目名称:nginx-vod-module,代码行数:14,代码来源:edash_packager.c

示例15: mss_write_uuid_tfxd_atom

static u_char*
mss_write_uuid_tfxd_atom(u_char* p, mpeg_stream_metadata_t* stream_metadata)
{
	size_t atom_size = ATOM_HEADER_SIZE + sizeof(uuid_tfxd_atom_t);
	uint64_t timestamp = rescale_time(stream_metadata->first_frame_time_offset, stream_metadata->media_info.timescale, MSS_TIMESCALE);
	uint64_t duration = rescale_time(stream_metadata->total_frames_duration, stream_metadata->media_info.timescale, MSS_TIMESCALE);

	write_atom_header(p, atom_size, 'u', 'u', 'i', 'd');
	p = vod_copy(p, tfxd_uuid, sizeof(tfxd_uuid));
	write_dword(p, 0x01000000);		// version / flags
	write_qword(p, timestamp);
	write_qword(p, duration);
	return p;
}
开发者ID:0myc,项目名称:nginx-vod-module,代码行数:14,代码来源:mss_packager.c


注:本文中的write_atom_header函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。