本文整理汇总了C++中memory_cptr::clone方法的典型用法代码示例。如果您正苦于以下问题:C++ memory_cptr::clone方法的具体用法?C++ memory_cptr::clone怎么用?C++ memory_cptr::clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类memory_cptr
的用法示例。
在下文中一共展示了memory_cptr::clone方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
vc1::es_parser_c::handle_entrypoint_packet(memory_cptr packet) {
add_pre_frame_extra_data(packet);
if (!m_raw_entrypoint.is_set())
m_raw_entrypoint = memory_cptr(packet->clone());
}
示例2:
void
vc1::es_parser_c::handle_entrypoint_packet(memory_cptr packet) {
if (!postpone_processing(packet))
add_pre_frame_extra_data(packet);
if (!m_raw_entrypoint)
m_raw_entrypoint = memory_cptr(packet->clone());
}
示例3:
hdmv_textst_packetizer_c::hdmv_textst_packetizer_c(generic_reader_c *p_reader,
track_info_c &p_ti,
memory_cptr const &dialog_style_segment)
: generic_packetizer_c{p_reader, p_ti}
{
m_ti.m_private_data = dialog_style_segment->clone();
set_track_type(track_subtitle);
// set_default_compression_method(COMPRESSION_ZLIB);
}
示例4:
void
generic_packetizer_c::set_codec_private(memory_cptr const &buffer) {
if (buffer && buffer->get_size()) {
m_hcodec_private = buffer->clone();
if (m_track_entry)
GetChild<KaxCodecPrivate>(*m_track_entry).CopyBuffer(static_cast<binary *>(m_hcodec_private->get_buffer()), m_hcodec_private->get_size());
} else
m_hcodec_private.reset();
}
示例5:
void
analyze_header_removal_compressor_c::compress(memory_cptr &buffer) {
++m_packet_counter;
if (!m_bytes.is_set()) {
m_bytes = memory_cptr(buffer->clone());
return;
}
unsigned char *current = buffer->get_buffer();
unsigned char *saved = m_bytes->get_buffer();
size_t i, new_size = 0;
for (i = 0; i < std::min(buffer->get_size(), m_bytes->get_size()); ++i, ++new_size)
if (current[i] != saved[i])
break;
m_bytes->set_size(new_size);
}
示例6: memcmp
void
vc1::es_parser_c::handle_sequence_header_packet(memory_cptr packet) {
flush_frame();
add_pre_frame_extra_data(packet);
vc1::sequence_header_t seqhdr;
if (!vc1::parse_sequence_header(packet->get_buffer(), packet->get_size(), seqhdr))
return;
m_seqhdr_changed = !m_seqhdr_found || (packet->get_size() != m_raw_seqhdr->get_size()) || memcmp(packet->get_buffer(), m_raw_seqhdr->get_buffer(), packet->get_size());
memcpy(&m_seqhdr, &seqhdr, sizeof(vc1::sequence_header_t));
m_raw_seqhdr = memory_cptr(packet->clone());
m_seqhdr_found = true;
if (!m_default_duration_forced && m_seqhdr.framerate_flag && (0 != m_seqhdr.framerate_num) && (0 != m_seqhdr.framerate_den))
m_default_duration = 1000000000ll * m_seqhdr.framerate_num / m_seqhdr.framerate_den;
}
示例7:
void
xtr_mpeg1_2_video_c::handle_codec_state(memory_cptr &codec_state) {
m_content_decoder.reverse(codec_state, CONTENT_ENCODING_SCOPE_CODECPRIVATE);
m_seq_hdr = codec_state->clone();
}