├── .babelrc ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── example ├── img │ ├── fullscreen.png │ ├── home.png │ ├── pause.png │ ├── play.png │ ├── share.png │ ├── stop.png │ ├── video-icon.png │ └── volume.png ├── index.html ├── native-decoder ├── native-decoder.exe ├── styles │ └── style.css └── ws │ ├── package-lock.json │ └── ws_server.js ├── native-decoder ├── .clang-format ├── .gitignore ├── .gitlab-ci.yml ├── Dockerfile ├── README.md ├── cmd │ ├── install.h │ └── native-decoder.cc ├── common │ ├── README.md │ └── helper │ │ ├── autostart.h │ │ ├── count_timer.h │ │ ├── countdown_latch.h │ │ ├── logger.h │ │ ├── process_keeper.h │ │ ├── raii.h │ │ ├── singleton.h │ │ ├── stringconv.h │ │ ├── threadpool.h │ │ └── timer.h ├── server │ ├── decode_server.h │ ├── ffmpeg_wrapper.h │ ├── pojo.h │ └── server_config.h ├── thirdparty │ ├── asio.hpp │ ├── asio │ │ ├── associated_allocator.hpp │ │ ├── associated_executor.hpp │ │ ├── async_result.hpp │ │ ├── basic_datagram_socket.hpp │ │ ├── basic_deadline_timer.hpp │ │ ├── basic_io_object.hpp │ │ ├── basic_raw_socket.hpp │ │ ├── basic_seq_packet_socket.hpp │ │ ├── basic_serial_port.hpp │ │ ├── basic_signal_set.hpp │ │ ├── basic_socket.hpp │ │ ├── basic_socket_acceptor.hpp │ │ ├── basic_socket_iostream.hpp │ │ ├── basic_socket_streambuf.hpp │ │ ├── basic_stream_socket.hpp │ │ ├── basic_streambuf.hpp │ │ ├── basic_streambuf_fwd.hpp │ │ ├── basic_waitable_timer.hpp │ │ ├── bind_executor.hpp │ │ ├── buffer.hpp │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_read_stream_fwd.hpp │ │ ├── buffered_stream.hpp │ │ ├── buffered_stream_fwd.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── buffered_write_stream_fwd.hpp │ │ ├── buffers_iterator.hpp │ │ ├── completion_condition.hpp │ │ ├── connect.hpp │ │ ├── coroutine.hpp │ │ ├── datagram_socket_service.hpp │ │ ├── deadline_timer.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── defer.hpp │ │ ├── detail │ │ │ ├── array.hpp │ │ │ ├── array_fwd.hpp │ │ │ ├── assert.hpp │ │ │ ├── atomic_count.hpp │ │ │ ├── base_from_completion_cond.hpp │ │ │ ├── bind_handler.hpp │ │ │ ├── buffer_resize_guard.hpp │ │ │ ├── buffer_sequence_adapter.hpp │ │ │ ├── buffered_stream_storage.hpp │ │ │ ├── call_stack.hpp │ │ │ ├── chrono.hpp │ │ │ ├── chrono_time_traits.hpp │ │ │ ├── completion_handler.hpp │ │ │ ├── concurrency_hint.hpp │ │ │ ├── conditionally_enabled_event.hpp │ │ │ ├── conditionally_enabled_mutex.hpp │ │ │ ├── config.hpp │ │ │ ├── consuming_buffers.hpp │ │ │ ├── cstddef.hpp │ │ │ ├── cstdint.hpp │ │ │ ├── date_time_fwd.hpp │ │ │ ├── deadline_timer_service.hpp │ │ │ ├── dependent_type.hpp │ │ │ ├── descriptor_ops.hpp │ │ │ ├── descriptor_read_op.hpp │ │ │ ├── descriptor_write_op.hpp │ │ │ ├── dev_poll_reactor.hpp │ │ │ ├── epoll_reactor.hpp │ │ │ ├── event.hpp │ │ │ ├── eventfd_select_interrupter.hpp │ │ │ ├── executor_op.hpp │ │ │ ├── fd_set_adapter.hpp │ │ │ ├── fenced_block.hpp │ │ │ ├── functional.hpp │ │ │ ├── future.hpp │ │ │ ├── gcc_arm_fenced_block.hpp │ │ │ ├── gcc_hppa_fenced_block.hpp │ │ │ ├── gcc_sync_fenced_block.hpp │ │ │ ├── gcc_x86_fenced_block.hpp │ │ │ ├── global.hpp │ │ │ ├── handler_alloc_helpers.hpp │ │ │ ├── handler_cont_helpers.hpp │ │ │ ├── handler_invoke_helpers.hpp │ │ │ ├── handler_tracking.hpp │ │ │ ├── handler_type_requirements.hpp │ │ │ ├── handler_work.hpp │ │ │ ├── hash_map.hpp │ │ │ ├── impl │ │ │ │ ├── buffer_sequence_adapter.ipp │ │ │ │ ├── descriptor_ops.ipp │ │ │ │ ├── dev_poll_reactor.hpp │ │ │ │ ├── dev_poll_reactor.ipp │ │ │ │ ├── epoll_reactor.hpp │ │ │ │ ├── epoll_reactor.ipp │ │ │ │ ├── eventfd_select_interrupter.ipp │ │ │ │ ├── handler_tracking.ipp │ │ │ │ ├── kqueue_reactor.hpp │ │ │ │ ├── kqueue_reactor.ipp │ │ │ │ ├── null_event.ipp │ │ │ │ ├── pipe_select_interrupter.ipp │ │ │ │ ├── posix_event.ipp │ │ │ │ ├── posix_mutex.ipp │ │ │ │ ├── posix_thread.ipp │ │ │ │ ├── posix_tss_ptr.ipp │ │ │ │ ├── reactive_descriptor_service.ipp │ │ │ │ ├── reactive_serial_port_service.ipp │ │ │ │ ├── reactive_socket_service_base.ipp │ │ │ │ ├── resolver_service_base.ipp │ │ │ │ ├── scheduler.ipp │ │ │ │ ├── select_reactor.hpp │ │ │ │ ├── select_reactor.ipp │ │ │ │ ├── service_registry.hpp │ │ │ │ ├── service_registry.ipp │ │ │ │ ├── signal_set_service.ipp │ │ │ │ ├── socket_ops.ipp │ │ │ │ ├── socket_select_interrupter.ipp │ │ │ │ ├── strand_executor_service.hpp │ │ │ │ ├── strand_executor_service.ipp │ │ │ │ ├── strand_service.hpp │ │ │ │ ├── strand_service.ipp │ │ │ │ ├── throw_error.ipp │ │ │ │ ├── timer_queue_ptime.ipp │ │ │ │ ├── timer_queue_set.ipp │ │ │ │ ├── win_event.ipp │ │ │ │ ├── win_iocp_handle_service.ipp │ │ │ │ ├── win_iocp_io_context.hpp │ │ │ │ ├── win_iocp_io_context.ipp │ │ │ │ ├── win_iocp_serial_port_service.ipp │ │ │ │ ├── win_iocp_socket_service_base.ipp │ │ │ │ ├── win_mutex.ipp │ │ │ │ ├── win_object_handle_service.ipp │ │ │ │ ├── win_static_mutex.ipp │ │ │ │ ├── win_thread.ipp │ │ │ │ ├── win_tss_ptr.ipp │ │ │ │ ├── winrt_ssocket_service_base.ipp │ │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ │ ├── winrt_timer_scheduler.ipp │ │ │ │ └── winsock_init.ipp │ │ │ ├── io_control.hpp │ │ │ ├── is_buffer_sequence.hpp │ │ │ ├── is_executor.hpp │ │ │ ├── keyword_tss_ptr.hpp │ │ │ ├── kqueue_reactor.hpp │ │ │ ├── limits.hpp │ │ │ ├── local_free_on_block_exit.hpp │ │ │ ├── macos_fenced_block.hpp │ │ │ ├── memory.hpp │ │ │ ├── mutex.hpp │ │ │ ├── noncopyable.hpp │ │ │ ├── null_event.hpp │ │ │ ├── null_fenced_block.hpp │ │ │ ├── null_global.hpp │ │ │ ├── null_mutex.hpp │ │ │ ├── null_reactor.hpp │ │ │ ├── null_signal_blocker.hpp │ │ │ ├── null_socket_service.hpp │ │ │ ├── null_static_mutex.hpp │ │ │ ├── null_thread.hpp │ │ │ ├── null_tss_ptr.hpp │ │ │ ├── object_pool.hpp │ │ │ ├── old_win_sdk_compat.hpp │ │ │ ├── op_queue.hpp │ │ │ ├── operation.hpp │ │ │ ├── pipe_select_interrupter.hpp │ │ │ ├── pop_options.hpp │ │ │ ├── posix_event.hpp │ │ │ ├── posix_fd_set_adapter.hpp │ │ │ ├── posix_global.hpp │ │ │ ├── posix_mutex.hpp │ │ │ ├── posix_signal_blocker.hpp │ │ │ ├── posix_static_mutex.hpp │ │ │ ├── posix_thread.hpp │ │ │ ├── posix_tss_ptr.hpp │ │ │ ├── push_options.hpp │ │ │ ├── reactive_descriptor_service.hpp │ │ │ ├── reactive_null_buffers_op.hpp │ │ │ ├── reactive_serial_port_service.hpp │ │ │ ├── reactive_socket_accept_op.hpp │ │ │ ├── reactive_socket_connect_op.hpp │ │ │ ├── reactive_socket_recv_op.hpp │ │ │ ├── reactive_socket_recvfrom_op.hpp │ │ │ ├── reactive_socket_recvmsg_op.hpp │ │ │ ├── reactive_socket_send_op.hpp │ │ │ ├── reactive_socket_sendto_op.hpp │ │ │ ├── reactive_socket_service.hpp │ │ │ ├── reactive_socket_service_base.hpp │ │ │ ├── reactive_wait_op.hpp │ │ │ ├── reactor.hpp │ │ │ ├── reactor_fwd.hpp │ │ │ ├── reactor_op.hpp │ │ │ ├── reactor_op_queue.hpp │ │ │ ├── recycling_allocator.hpp │ │ │ ├── regex_fwd.hpp │ │ │ ├── resolve_endpoint_op.hpp │ │ │ ├── resolve_op.hpp │ │ │ ├── resolve_query_op.hpp │ │ │ ├── resolver_service.hpp │ │ │ ├── resolver_service_base.hpp │ │ │ ├── scheduler.hpp │ │ │ ├── scheduler_operation.hpp │ │ │ ├── scheduler_thread_info.hpp │ │ │ ├── scoped_lock.hpp │ │ │ ├── scoped_ptr.hpp │ │ │ ├── select_interrupter.hpp │ │ │ ├── select_reactor.hpp │ │ │ ├── service_registry.hpp │ │ │ ├── signal_blocker.hpp │ │ │ ├── signal_handler.hpp │ │ │ ├── signal_init.hpp │ │ │ ├── signal_op.hpp │ │ │ ├── signal_set_service.hpp │ │ │ ├── socket_holder.hpp │ │ │ ├── socket_ops.hpp │ │ │ ├── socket_option.hpp │ │ │ ├── socket_select_interrupter.hpp │ │ │ ├── socket_types.hpp │ │ │ ├── solaris_fenced_block.hpp │ │ │ ├── static_mutex.hpp │ │ │ ├── std_event.hpp │ │ │ ├── std_fenced_block.hpp │ │ │ ├── std_global.hpp │ │ │ ├── std_mutex.hpp │ │ │ ├── std_static_mutex.hpp │ │ │ ├── std_thread.hpp │ │ │ ├── strand_executor_service.hpp │ │ │ ├── strand_service.hpp │ │ │ ├── string_view.hpp │ │ │ ├── thread.hpp │ │ │ ├── thread_context.hpp │ │ │ ├── thread_group.hpp │ │ │ ├── thread_info_base.hpp │ │ │ ├── throw_error.hpp │ │ │ ├── throw_exception.hpp │ │ │ ├── timer_queue.hpp │ │ │ ├── timer_queue_base.hpp │ │ │ ├── timer_queue_ptime.hpp │ │ │ ├── timer_queue_set.hpp │ │ │ ├── timer_scheduler.hpp │ │ │ ├── timer_scheduler_fwd.hpp │ │ │ ├── tss_ptr.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── variadic_templates.hpp │ │ │ ├── wait_handler.hpp │ │ │ ├── wait_op.hpp │ │ │ ├── win_event.hpp │ │ │ ├── win_fd_set_adapter.hpp │ │ │ ├── win_fenced_block.hpp │ │ │ ├── win_global.hpp │ │ │ ├── win_iocp_handle_read_op.hpp │ │ │ ├── win_iocp_handle_service.hpp │ │ │ ├── win_iocp_handle_write_op.hpp │ │ │ ├── win_iocp_io_context.hpp │ │ │ ├── win_iocp_null_buffers_op.hpp │ │ │ ├── win_iocp_operation.hpp │ │ │ ├── win_iocp_overlapped_op.hpp │ │ │ ├── win_iocp_overlapped_ptr.hpp │ │ │ ├── win_iocp_serial_port_service.hpp │ │ │ ├── win_iocp_socket_accept_op.hpp │ │ │ ├── win_iocp_socket_connect_op.hpp │ │ │ ├── win_iocp_socket_recv_op.hpp │ │ │ ├── win_iocp_socket_recvfrom_op.hpp │ │ │ ├── win_iocp_socket_recvmsg_op.hpp │ │ │ ├── win_iocp_socket_send_op.hpp │ │ │ ├── win_iocp_socket_service.hpp │ │ │ ├── win_iocp_socket_service_base.hpp │ │ │ ├── win_iocp_thread_info.hpp │ │ │ ├── win_iocp_wait_op.hpp │ │ │ ├── win_mutex.hpp │ │ │ ├── win_object_handle_service.hpp │ │ │ ├── win_static_mutex.hpp │ │ │ ├── win_thread.hpp │ │ │ ├── win_tss_ptr.hpp │ │ │ ├── winapp_thread.hpp │ │ │ ├── wince_thread.hpp │ │ │ ├── winrt_async_manager.hpp │ │ │ ├── winrt_async_op.hpp │ │ │ ├── winrt_resolve_op.hpp │ │ │ ├── winrt_resolver_service.hpp │ │ │ ├── winrt_socket_connect_op.hpp │ │ │ ├── winrt_socket_recv_op.hpp │ │ │ ├── winrt_socket_send_op.hpp │ │ │ ├── winrt_ssocket_service.hpp │ │ │ ├── winrt_ssocket_service_base.hpp │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ ├── winrt_utils.hpp │ │ │ ├── winsock_init.hpp │ │ │ ├── work_dispatcher.hpp │ │ │ └── wrapped_handler.hpp │ │ ├── dispatch.hpp │ │ ├── error.hpp │ │ ├── error_code.hpp │ │ ├── execution_context.hpp │ │ ├── executor.hpp │ │ ├── executor_work_guard.hpp │ │ ├── experimental.hpp │ │ ├── experimental │ │ │ ├── co_spawn.hpp │ │ │ ├── detached.hpp │ │ │ ├── impl │ │ │ │ ├── co_spawn.hpp │ │ │ │ ├── detached.hpp │ │ │ │ └── redirect_error.hpp │ │ │ └── redirect_error.hpp │ │ ├── generic │ │ │ ├── basic_endpoint.hpp │ │ │ ├── datagram_protocol.hpp │ │ │ ├── detail │ │ │ │ ├── endpoint.hpp │ │ │ │ └── impl │ │ │ │ │ └── endpoint.ipp │ │ │ ├── raw_protocol.hpp │ │ │ ├── seq_packet_protocol.hpp │ │ │ └── stream_protocol.hpp │ │ ├── handler_alloc_hook.hpp │ │ ├── handler_continuation_hook.hpp │ │ ├── handler_invoke_hook.hpp │ │ ├── handler_type.hpp │ │ ├── high_resolution_timer.hpp │ │ ├── impl │ │ │ ├── buffered_read_stream.hpp │ │ │ ├── buffered_write_stream.hpp │ │ │ ├── connect.hpp │ │ │ ├── defer.hpp │ │ │ ├── dispatch.hpp │ │ │ ├── error.ipp │ │ │ ├── error_code.ipp │ │ │ ├── execution_context.hpp │ │ │ ├── execution_context.ipp │ │ │ ├── executor.hpp │ │ │ ├── executor.ipp │ │ │ ├── handler_alloc_hook.ipp │ │ │ ├── io_context.hpp │ │ │ ├── io_context.ipp │ │ │ ├── post.hpp │ │ │ ├── read.hpp │ │ │ ├── read_at.hpp │ │ │ ├── read_until.hpp │ │ │ ├── serial_port_base.hpp │ │ │ ├── serial_port_base.ipp │ │ │ ├── spawn.hpp │ │ │ ├── src.cpp │ │ │ ├── src.hpp │ │ │ ├── system_context.hpp │ │ │ ├── system_context.ipp │ │ │ ├── system_executor.hpp │ │ │ ├── thread_pool.hpp │ │ │ ├── thread_pool.ipp │ │ │ ├── use_future.hpp │ │ │ ├── write.hpp │ │ │ └── write_at.hpp │ │ ├── io_context.hpp │ │ ├── io_context_strand.hpp │ │ ├── io_service.hpp │ │ ├── io_service_strand.hpp │ │ ├── ip │ │ │ ├── address.hpp │ │ │ ├── address_v4.hpp │ │ │ ├── address_v4_iterator.hpp │ │ │ ├── address_v4_range.hpp │ │ │ ├── address_v6.hpp │ │ │ ├── address_v6_iterator.hpp │ │ │ ├── address_v6_range.hpp │ │ │ ├── bad_address_cast.hpp │ │ │ ├── basic_endpoint.hpp │ │ │ ├── basic_resolver.hpp │ │ │ ├── basic_resolver_entry.hpp │ │ │ ├── basic_resolver_iterator.hpp │ │ │ ├── basic_resolver_query.hpp │ │ │ ├── basic_resolver_results.hpp │ │ │ ├── detail │ │ │ │ ├── endpoint.hpp │ │ │ │ ├── impl │ │ │ │ │ └── endpoint.ipp │ │ │ │ └── socket_option.hpp │ │ │ ├── host_name.hpp │ │ │ ├── icmp.hpp │ │ │ ├── impl │ │ │ │ ├── address.hpp │ │ │ │ ├── address.ipp │ │ │ │ ├── address_v4.hpp │ │ │ │ ├── address_v4.ipp │ │ │ │ ├── address_v6.hpp │ │ │ │ ├── address_v6.ipp │ │ │ │ ├── basic_endpoint.hpp │ │ │ │ ├── host_name.ipp │ │ │ │ ├── network_v4.hpp │ │ │ │ ├── network_v4.ipp │ │ │ │ ├── network_v6.hpp │ │ │ │ └── network_v6.ipp │ │ │ ├── multicast.hpp │ │ │ ├── network_v4.hpp │ │ │ ├── network_v6.hpp │ │ │ ├── resolver_base.hpp │ │ │ ├── resolver_query_base.hpp │ │ │ ├── resolver_service.hpp │ │ │ ├── tcp.hpp │ │ │ ├── udp.hpp │ │ │ ├── unicast.hpp │ │ │ └── v6_only.hpp │ │ ├── is_executor.hpp │ │ ├── is_read_buffered.hpp │ │ ├── is_write_buffered.hpp │ │ ├── local │ │ │ ├── basic_endpoint.hpp │ │ │ ├── connect_pair.hpp │ │ │ ├── datagram_protocol.hpp │ │ │ ├── detail │ │ │ │ ├── endpoint.hpp │ │ │ │ └── impl │ │ │ │ │ └── endpoint.ipp │ │ │ └── stream_protocol.hpp │ │ ├── packaged_task.hpp │ │ ├── placeholders.hpp │ │ ├── posix │ │ │ ├── basic_descriptor.hpp │ │ │ ├── basic_stream_descriptor.hpp │ │ │ ├── descriptor.hpp │ │ │ ├── descriptor_base.hpp │ │ │ ├── stream_descriptor.hpp │ │ │ └── stream_descriptor_service.hpp │ │ ├── post.hpp │ │ ├── raw_socket_service.hpp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── seq_packet_socket_service.hpp │ │ ├── serial_port.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_service.hpp │ │ ├── signal_set.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_acceptor_service.hpp │ │ ├── socket_base.hpp │ │ ├── spawn.hpp │ │ ├── ssl.hpp │ │ ├── ssl │ │ │ ├── context.hpp │ │ │ ├── context_base.hpp │ │ │ ├── detail │ │ │ │ ├── buffered_handshake_op.hpp │ │ │ │ ├── engine.hpp │ │ │ │ ├── handshake_op.hpp │ │ │ │ ├── impl │ │ │ │ │ ├── engine.ipp │ │ │ │ │ └── openssl_init.ipp │ │ │ │ ├── io.hpp │ │ │ │ ├── openssl_init.hpp │ │ │ │ ├── openssl_types.hpp │ │ │ │ ├── password_callback.hpp │ │ │ │ ├── read_op.hpp │ │ │ │ ├── shutdown_op.hpp │ │ │ │ ├── stream_core.hpp │ │ │ │ ├── verify_callback.hpp │ │ │ │ └── write_op.hpp │ │ │ ├── error.hpp │ │ │ ├── impl │ │ │ │ ├── context.hpp │ │ │ │ ├── context.ipp │ │ │ │ ├── error.ipp │ │ │ │ ├── rfc2818_verification.ipp │ │ │ │ └── src.hpp │ │ │ ├── rfc2818_verification.hpp │ │ │ ├── stream.hpp │ │ │ ├── stream_base.hpp │ │ │ ├── verify_context.hpp │ │ │ └── verify_mode.hpp │ │ ├── steady_timer.hpp │ │ ├── strand.hpp │ │ ├── stream_socket_service.hpp │ │ ├── streambuf.hpp │ │ ├── system_context.hpp │ │ ├── system_error.hpp │ │ ├── system_executor.hpp │ │ ├── system_timer.hpp │ │ ├── thread.hpp │ │ ├── thread_pool.hpp │ │ ├── time_traits.hpp │ │ ├── ts │ │ │ ├── buffer.hpp │ │ │ ├── executor.hpp │ │ │ ├── internet.hpp │ │ │ ├── io_context.hpp │ │ │ ├── net.hpp │ │ │ ├── netfwd.hpp │ │ │ ├── socket.hpp │ │ │ └── timer.hpp │ │ ├── unyield.hpp │ │ ├── use_future.hpp │ │ ├── uses_executor.hpp │ │ ├── version.hpp │ │ ├── wait_traits.hpp │ │ ├── waitable_timer_service.hpp │ │ ├── windows │ │ │ ├── basic_handle.hpp │ │ │ ├── basic_object_handle.hpp │ │ │ ├── basic_random_access_handle.hpp │ │ │ ├── basic_stream_handle.hpp │ │ │ ├── object_handle.hpp │ │ │ ├── object_handle_service.hpp │ │ │ ├── overlapped_handle.hpp │ │ │ ├── overlapped_ptr.hpp │ │ │ ├── random_access_handle.hpp │ │ │ ├── random_access_handle_service.hpp │ │ │ ├── stream_handle.hpp │ │ │ └── stream_handle_service.hpp │ │ ├── write.hpp │ │ ├── write_at.hpp │ │ └── yield.hpp │ ├── json │ │ └── json.hpp │ ├── spdlog │ │ ├── async.h │ │ ├── async_logger.h │ │ ├── common.h │ │ ├── details │ │ │ ├── async_logger_impl.h │ │ │ ├── circular_q.h │ │ │ ├── console_globals.h │ │ │ ├── file_helper.h │ │ │ ├── fmt_helper.h │ │ │ ├── log_msg.h │ │ │ ├── logger_impl.h │ │ │ ├── mpmc_blocking_q.h │ │ │ ├── null_mutex.h │ │ │ ├── os.h │ │ │ ├── pattern_formatter.h │ │ │ ├── periodic_worker.h │ │ │ ├── registry.h │ │ │ └── thread_pool.h │ │ ├── fmt │ │ │ ├── bin_to_hex.h │ │ │ ├── bundled │ │ │ │ ├── LICENSE.rst │ │ │ │ ├── colors.h │ │ │ │ ├── core.h │ │ │ │ ├── format-inl.h │ │ │ │ ├── format.h │ │ │ │ ├── ostream.h │ │ │ │ ├── posix.h │ │ │ │ ├── printf.h │ │ │ │ ├── ranges.h │ │ │ │ └── time.h │ │ │ ├── fmt.h │ │ │ └── ostr.h │ │ ├── formatter.h │ │ ├── logger.h │ │ ├── sinks │ │ │ ├── android_sink.h │ │ │ ├── ansicolor_sink.h │ │ │ ├── base_sink.h │ │ │ ├── basic_file_sink.h │ │ │ ├── daily_file_sink.h │ │ │ ├── dist_sink.h │ │ │ ├── msvc_sink.h │ │ │ ├── null_sink.h │ │ │ ├── ostream_sink.h │ │ │ ├── rotating_file_sink.h │ │ │ ├── sink.h │ │ │ ├── stdout_color_sinks.h │ │ │ ├── stdout_sinks.h │ │ │ ├── syslog_sink.h │ │ │ └── wincolor_sink.h │ │ ├── spdlog.h │ │ ├── tweakme.h │ │ └── version.h │ └── websocketpp │ │ ├── CMakeLists.txt │ │ ├── base64 │ │ └── base64.hpp │ │ ├── client.hpp │ │ ├── close.hpp │ │ ├── common │ │ ├── asio.hpp │ │ ├── asio_ssl.hpp │ │ ├── chrono.hpp │ │ ├── connection_hdl.hpp │ │ ├── cpp11.hpp │ │ ├── functional.hpp │ │ ├── md5.hpp │ │ ├── memory.hpp │ │ ├── network.hpp │ │ ├── platforms.hpp │ │ ├── random.hpp │ │ ├── regex.hpp │ │ ├── stdint.hpp │ │ ├── system_error.hpp │ │ ├── thread.hpp │ │ ├── time.hpp │ │ └── type_traits.hpp │ │ ├── concurrency │ │ ├── basic.hpp │ │ └── none.hpp │ │ ├── config │ │ ├── asio.hpp │ │ ├── asio_client.hpp │ │ ├── asio_no_tls.hpp │ │ ├── asio_no_tls_client.hpp │ │ ├── boost_config.hpp │ │ ├── core.hpp │ │ ├── core_client.hpp │ │ ├── debug.hpp │ │ ├── debug_asio.hpp │ │ ├── debug_asio_no_tls.hpp │ │ ├── minimal_client.hpp │ │ └── minimal_server.hpp │ │ ├── connection.hpp │ │ ├── connection_base.hpp │ │ ├── endpoint.hpp │ │ ├── endpoint_base.hpp │ │ ├── error.hpp │ │ ├── extensions │ │ ├── extension.hpp │ │ └── permessage_deflate │ │ │ ├── disabled.hpp │ │ │ └── enabled.hpp │ │ ├── frame.hpp │ │ ├── http │ │ ├── constants.hpp │ │ ├── impl │ │ │ ├── parser.hpp │ │ │ ├── request.hpp │ │ │ └── response.hpp │ │ ├── parser.hpp │ │ ├── request.hpp │ │ └── response.hpp │ │ ├── impl │ │ ├── connection_impl.hpp │ │ ├── endpoint_impl.hpp │ │ └── utilities_impl.hpp │ │ ├── logger │ │ ├── basic.hpp │ │ ├── levels.hpp │ │ ├── stub.hpp │ │ └── syslog.hpp │ │ ├── message_buffer │ │ ├── alloc.hpp │ │ ├── message.hpp │ │ └── pool.hpp │ │ ├── processors │ │ ├── base.hpp │ │ ├── hybi00.hpp │ │ ├── hybi07.hpp │ │ ├── hybi08.hpp │ │ ├── hybi13.hpp │ │ └── processor.hpp │ │ ├── random │ │ ├── none.hpp │ │ └── random_device.hpp │ │ ├── roles │ │ ├── client_endpoint.hpp │ │ └── server_endpoint.hpp │ │ ├── server.hpp │ │ ├── sha1 │ │ └── sha1.hpp │ │ ├── transport │ │ ├── asio │ │ │ ├── base.hpp │ │ │ ├── connection.hpp │ │ │ ├── endpoint.hpp │ │ │ └── security │ │ │ │ ├── base.hpp │ │ │ │ ├── none.hpp │ │ │ │ └── tls.hpp │ │ ├── base │ │ │ ├── connection.hpp │ │ │ └── endpoint.hpp │ │ ├── debug │ │ │ ├── base.hpp │ │ │ ├── connection.hpp │ │ │ └── endpoint.hpp │ │ ├── iostream │ │ │ ├── base.hpp │ │ │ ├── connection.hpp │ │ │ └── endpoint.hpp │ │ └── stub │ │ │ ├── base.hpp │ │ │ ├── connection.hpp │ │ │ └── endpoint.hpp │ │ ├── uri.hpp │ │ ├── utf8_validator.hpp │ │ ├── utilities.hpp │ │ └── version.hpp └── xmake.lua ├── package.json ├── src ├── constant.js ├── decoder-stub.js ├── decoder-worker.js ├── downloader-worker.js ├── logger.js ├── pcm.js ├── player.js └── webgl.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-react", ["@babel/preset-env"]], 3 | "plugins": [ 4 | "@babel/plugin-transform-runtime" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | es2021: true 5 | }, 6 | extends: ['plugin:vue/essential', 'standard'], 7 | parserOptions: { 8 | ecmaVersion: 12, 9 | sourceType: 'module' 10 | }, 11 | plugins: ['vue'], 12 | rules: { 13 | 'space-before-function-paren': 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/ 3 | dist/ 4 | video/ 5 | .cache/ 6 | *.log 7 | .vscode/ 8 | example/script/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # web-video-player 2 | 3 | web 视频播放器(fork from [WasmVideoPlayer](https://github.com/sonysuqin/WasmVideoPlayer) ) 4 | 5 | 相比 WasmVideoPlayer,做了以下修改 6 | 7 | - 用 yarn 管理工程依赖,添加 eslint 8 | - 代码结构调整,公共部分抽取,js 使用 class 方式 9 | - 去掉 wasm 部分,改为通过 websocket 调用 native-decoder,图片数据量比较大,websocket 需要做压缩 10 | - 支持无音频视频播放 11 | 12 | ## 背景 13 | 14 | 浏览器不原生支持h265,有的方案是采用的web assembly方式,把ffmpeg编译为wasm来供js使用,但是这样性能较差,web assembly限制比较多,1080P的视频播放卡顿。 15 | 本方案把视频解码功能提取出来,编译为本地解码,js通过websocket把h264/h265视频数据给native-decoder, native-decoder解码后,通过websocket把YUV的视频数据返回给浏览器, 16 | 浏览器再进行显示,经测试,性能比wasm版本的要好,可以流畅播放H265的视频 17 | 18 | 19 | ## 功能 20 | 21 | - [x] 支持实时流和文件播放 22 | - [x] 支持 h264 和 h265 编码格式的视频 23 | - [x] 解决 chrome 不支持 h265 的问题,需要配合 native-decoder 工程使用,比 wasm 版本的性能高,1080P 视频可以流畅播放 24 | - [x] 无音频视频播放 25 | - [ ] websocket 自动重连 26 | 27 | ## 使用方法 28 | 29 | ```bash 30 | yarn add --global parcel 31 | yarn install 32 | yarn build && yarn serve 33 | ``` 34 | 35 | 示例参考 example/index.html 36 | 37 | 浏览器访问 http://localhost:9080 38 | 39 | ## 注意 40 | 41 | 使用前,需要打开 native-decoder 程序 42 | 43 | ## 问题 44 | 45 | 经过测试,虽然可以流畅的播放1080P的视频,但CPU的占用率依然高,i5的cpu,chrome浏览器同时播放3-4路视频cpu占用率100%。 46 | 经分析,cpu占用高的原因是chrome是多进程架构,进程间是通过chrome的RPC通信的,视频数据要经过 native-decoder -> chrome网络服务 -> chrome主进程 -> chrome GPU进程,解码后的视频数据量大, 47 | CPU消耗在大量的拷贝数据上。 48 | 49 | 基于以上分析,这个方案还是有局限性的。目前,在考虑另一个方案,解码和显示都不在chrome完成,在外部解码并显示,在chrome上遮一层视频播放框,绕过chrome的RPC机制。 50 | 51 | 新方案还在开发中 52 | -------------------------------------------------------------------------------- /example/img/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/fullscreen.png -------------------------------------------------------------------------------- /example/img/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/home.png -------------------------------------------------------------------------------- /example/img/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/pause.png -------------------------------------------------------------------------------- /example/img/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/play.png -------------------------------------------------------------------------------- /example/img/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/share.png -------------------------------------------------------------------------------- /example/img/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/stop.png -------------------------------------------------------------------------------- /example/img/video-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/video-icon.png -------------------------------------------------------------------------------- /example/img/volume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/img/volume.png -------------------------------------------------------------------------------- /example/native-decoder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/native-decoder -------------------------------------------------------------------------------- /example/native-decoder.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzk90s/h265-video-player/e5d1a4ee154828452c917c828d438e02c509aa4f/example/native-decoder.exe -------------------------------------------------------------------------------- /example/ws/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "ws": { 6 | "version": "7.2.1", 7 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", 8 | "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /native-decoder/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.sdf 3 | Release/ 4 | Debug/ 5 | *.log 6 | *.opensdf 7 | *.suo 8 | obj/ 9 | pkg/ 10 | .vs/ 11 | thirdparty/opencv 12 | thirdparty/brpc 13 | docker/brpc_opencv_ffmpeg/package 14 | benchmark/tmp/ 15 | target/ 16 | .idea/ 17 | *.iml 18 | .xmake/ 19 | .project 20 | .settings/ 21 | .vscode/ 22 | build/ -------------------------------------------------------------------------------- /native-decoder/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: "basic/ci-templates" 3 | file: ".gitlab-ci-template.yml" 4 | -------------------------------------------------------------------------------- /native-decoder/Dockerfile: -------------------------------------------------------------------------------- 1 | #------------ 编译video-dispose ------------ 2 | FROM registry.cn-hangzhou.aliyuncs.com/gosun/brpc_opencv_ffmpeg:x86_64-3.0.1 as base_builder 3 | 4 | 5 | RUN apt-get update --fix-missing && \ 6 | apt-get install -y g++-mingw-w64-x86-64 && \ 7 | apt-get autoclean && apt-get clean 8 | 9 | #编译 10 | ADD . /root/work 11 | RUN cd /root/work && \ 12 | #build windows 13 | xmake f --cross=x86_64-w64-mingw32- --plat=mingw32 && \ 14 | xmake && \ 15 | #build linux 16 | xmake f --cross= --plat=linux && \ 17 | xmake 18 | 19 | #------------ 生成runtime包 ------------ 20 | FROM alpine:latest as runtime 21 | 22 | 23 | ##拷贝编译结果 24 | COPY --from=base_builder /root/work/build/linux/x86_64/release/* /usr/local/bin/ 25 | COPY --from=base_builder /root/work/build/mingw32/x86_64/release/* /usr/local/bin/ 26 | -------------------------------------------------------------------------------- /native-decoder/README.md: -------------------------------------------------------------------------------- 1 | # native-decoder 2 | 3 | 本地解码器 4 | 5 | ## 功能 6 | 7 | - [x] h264 软解 8 | - [x] h265 软解 9 | 10 | ## 支持平台 11 | 12 | - [x] linux 13 | - [x] windows 14 | - [ ] macos 15 | 16 | ## 第三方组件 17 | 18 | - websocketcpp:https://github.com/zaphoyd/websocketpp 19 | - json:https://github.com/nlohmann/json 20 | - spdlog:https://github.com/gabime/spdlog 21 | - asio: https://github.com/chriskohlhoff/asio 22 | -------------------------------------------------------------------------------- /native-decoder/cmd/native-decoder.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "server/decode_server.h" 8 | 9 | #include "common/helper/logger.h" 10 | #include "common/helper/process_keeper.h" 11 | 12 | #include "cmd/install.h" 13 | 14 | int main(int argc, char *argv[]) { 15 | // init logger 16 | common::defaultLogger().init("native-decoder", "[%Y-%m-%d %H:%M:%S] [%P-%t] [%^%l%$] %v"); 17 | 18 | // new process keeper 19 | auto keeper = common::ProcessKeeperFactory::newProcessKeeper(); 20 | keeper->init(argc, argv); 21 | 22 | if (!keeper->isChild()) { 23 | InstallToolFactory::newInstallTool()->svcInstall(argv[0]); 24 | } 25 | 26 | // run app with keeper 27 | return keeper->run([](int c, char **v) { 28 | LOG_INFO("---------------------------------------------------"); 29 | LOG_INFO("Process id is {}", getpid()); 30 | decoder::DecodeServer server; 31 | uint16_t port = 9002; 32 | if (c >= 2) { 33 | int i = atoi(v[1]); 34 | if (i <= 0 || i > 65535) { 35 | LOG_ERROR("invalid port"); 36 | return -1; 37 | } 38 | port = uint16_t(i); 39 | } 40 | server.run(port); 41 | server.stop(); 42 | return 0; 43 | }); 44 | } -------------------------------------------------------------------------------- /native-decoder/common/README.md: -------------------------------------------------------------------------------- 1 | ## common library 2 | 3 | 一些常用的库 4 | -------------------------------------------------------------------------------- /native-decoder/common/helper/count_timer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace common { 10 | 11 | class CountTimer { 12 | public: 13 | CountTimer(const std::string &name, int min = 0) : name_(name), min_(min) { start_ = std::chrono::steady_clock::now(); } 14 | 15 | ~CountTimer() { 16 | end_ = std::chrono::steady_clock::now(); 17 | auto diff = std::chrono::duration_cast(end_ - start_).count(); 18 | if (diff > min_) { 19 | std::cout << "[" << name_ << "](" << tid() << ") -> " << readableTime(diff) << std::endl; 20 | } 21 | } 22 | 23 | private: 24 | std::string readableTime(long microseconds) { 25 | float s; 26 | std::string unit; 27 | if (microseconds / (1000 * 1000) >= 1) { 28 | s = (float)microseconds / (1000 * 1000); 29 | unit = "s"; 30 | } else if (microseconds / 1000 >= 1) { 31 | s = (float)microseconds / 1000; 32 | unit = "ms"; 33 | } else { 34 | unit = "us"; 35 | } 36 | return std::to_string(s) + unit; 37 | } 38 | 39 | uint64_t tid() { 40 | std::ostringstream oss; 41 | oss << std::this_thread::get_id(); 42 | std::string stid = oss.str(); 43 | return std::stoull(stid); 44 | } 45 | 46 | std::string name_; 47 | int min_; 48 | std::chrono::steady_clock::time_point start_; 49 | std::chrono::steady_clock::time_point end_; 50 | }; 51 | 52 | } // namespace common 53 | -------------------------------------------------------------------------------- /native-decoder/common/helper/countdown_latch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace common { 7 | 8 | class CountDownLatch { 9 | public: 10 | explicit CountDownLatch(int count) : mutex_(), condition_(), count_(count) {} 11 | ~CountDownLatch() {} 12 | 13 | void wait() { 14 | std::unique_lock lock(mutex_); 15 | while (count_ > 0) { //只要计数值大于0,CountDownLatch类就不工作,知道等待计数值为0 16 | condition_.wait(lock); 17 | } 18 | } 19 | 20 | void countDown() { 21 | std::unique_lock lock(mutex_); 22 | --count_; 23 | if (count_ == 0) { 24 | condition_.notify_all(); 25 | } 26 | } 27 | 28 | int getCount() const { 29 | std::unique_lock lock(mutex_); 30 | return count_; 31 | } 32 | 33 | private: 34 | mutable std::mutex mutex_; 35 | std::condition_variable condition_; 36 | int count_; 37 | }; 38 | 39 | } // namespace common -------------------------------------------------------------------------------- /native-decoder/common/helper/singleton.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace common { 4 | 5 | template class Singleton { 6 | public: 7 | static T &getInstance() { 8 | static T value; 9 | return value; 10 | } 11 | 12 | private: 13 | Singleton(){}; 14 | ~Singleton(){}; 15 | }; 16 | } // namespace common -------------------------------------------------------------------------------- /native-decoder/common/helper/stringconv.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace common { 6 | 7 | class StringConv { 8 | public: 9 | static std::wstring StringToWString(const std::string &str) { 10 | std::wstring wstr(str.length(), L' '); 11 | std::copy(str.begin(), str.end(), wstr.begin()); 12 | return wstr; 13 | } 14 | 15 | //只拷贝低字节至string中 16 | static std::string WStringToString(const std::wstring &wstr) { 17 | std::string str(wstr.length(), ' '); 18 | std::copy(wstr.begin(), wstr.end(), str.begin()); 19 | return str; 20 | } 21 | }; 22 | 23 | } // namespace common -------------------------------------------------------------------------------- /native-decoder/server/server_config.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | 6 | namespace websocketpp { 7 | namespace config { 8 | 9 | /// Server config with asio transport and TLS disabled 10 | struct ServerConfig : public websocketpp::config::asio { 11 | static const bool autonegotiate_compression = true; 12 | typedef websocketpp::extensions::permessage_deflate::enabled permessage_deflate_type; 13 | static const int iothrnum = 4; 14 | }; 15 | } // namespace config 16 | } // namespace websocketpp -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/basic_streambuf_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // basic_streambuf_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BASIC_STREAMBUF_FWD_HPP 12 | #define ASIO_BASIC_STREAMBUF_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include 23 | 24 | namespace asio { 25 | 26 | template > 27 | class basic_streambuf; 28 | 29 | template > 30 | class basic_streambuf_ref; 31 | 32 | } // namespace asio 33 | 34 | #endif // !defined(ASIO_NO_IOSTREAM) 35 | 36 | #endif // ASIO_BASIC_STREAMBUF_FWD_HPP 37 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/deadline_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // deadline_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DEADLINE_TIMER_HPP 12 | #define ASIO_DEADLINE_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_DATE_TIME) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/detail/socket_types.hpp" // Must come before posix_time. 24 | #include "asio/basic_deadline_timer.hpp" 25 | 26 | #include 27 | 28 | namespace asio { 29 | 30 | /// Typedef for the typical usage of timer. Uses a UTC clock. 31 | typedef basic_deadline_timer deadline_timer; 32 | 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_DEADLINE_TIMER_HPP 39 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ARRAY) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ARRAY) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ARRAY) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ARRAY) 30 | using std::array; 31 | #else // defined(ASIO_HAS_STD_ARRAY) 32 | using boost::array; 33 | #endif // defined(ASIO_HAS_STD_ARRAY) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ARRAY_HPP 39 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/array_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_FWD_HPP 12 | #define ASIO_DETAIL_ARRAY_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | 22 | template 23 | class array; 24 | 25 | } // namespace boost 26 | 27 | // Standard library components can't be forward declared, so we'll have to 28 | // include the array header. Fortunately, it's fairly lightweight and doesn't 29 | // add significantly to the compile time. 30 | #if defined(ASIO_HAS_STD_ARRAY) 31 | # include 32 | #endif // defined(ASIO_HAS_STD_ARRAY) 33 | 34 | #endif // ASIO_DETAIL_ARRAY_FWD_HPP 35 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/assert.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/assert.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ASSERT_HPP 12 | #define ASIO_DETAIL_ASSERT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_ASSERT) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_ASSERT) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 25 | 26 | #if defined(ASIO_HAS_BOOST_ASSERT) 27 | # define ASIO_ASSERT(expr) BOOST_ASSERT(expr) 28 | #else // defined(ASIO_HAS_BOOST_ASSERT) 29 | # define ASIO_ASSERT(expr) assert(expr) 30 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 31 | 32 | #endif // ASIO_DETAIL_ASSERT_HPP 33 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/atomic_count.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/atomic_count.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ATOMIC_COUNT_HPP 12 | #define ASIO_DETAIL_ATOMIC_COUNT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | // Nothing to include. 22 | #elif defined(ASIO_HAS_STD_ATOMIC) 23 | # include 24 | #else // defined(ASIO_HAS_STD_ATOMIC) 25 | # include 26 | #endif // defined(ASIO_HAS_STD_ATOMIC) 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | #if !defined(ASIO_HAS_THREADS) 32 | typedef long atomic_count; 33 | inline void increment(atomic_count& a, long b) { a += b; } 34 | #elif defined(ASIO_HAS_STD_ATOMIC) 35 | typedef std::atomic atomic_count; 36 | inline void increment(atomic_count& a, long b) { a += b; } 37 | #else // defined(ASIO_HAS_STD_ATOMIC) 38 | typedef boost::detail::atomic_count atomic_count; 39 | inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; } 40 | #endif // defined(ASIO_HAS_STD_ATOMIC) 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #endif // ASIO_DETAIL_ATOMIC_COUNT_HPP 46 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/buffer_resize_guard.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/buffer_resize_guard.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 12 | #define ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/limits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | // Helper class to manage buffer resizing in an exception safe way. 27 | template 28 | class buffer_resize_guard 29 | { 30 | public: 31 | // Constructor. 32 | buffer_resize_guard(Buffer& buffer) 33 | : buffer_(buffer), 34 | old_size_(buffer.size()) 35 | { 36 | } 37 | 38 | // Destructor rolls back the buffer resize unless commit was called. 39 | ~buffer_resize_guard() 40 | { 41 | if (old_size_ != (std::numeric_limits::max)()) 42 | { 43 | buffer_.resize(old_size_); 44 | } 45 | } 46 | 47 | // Commit the resize transaction. 48 | void commit() 49 | { 50 | old_size_ = (std::numeric_limits::max)(); 51 | } 52 | 53 | private: 54 | // The buffer being managed. 55 | Buffer& buffer_; 56 | 57 | // The size of the buffer at the time the guard was constructed. 58 | size_t old_size_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 67 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/cstddef.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstddef.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDDEF_HPP 12 | #define ASIO_DETAIL_CSTDDEF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | namespace asio { 22 | 23 | #if defined(ASIO_HAS_NULLPTR) 24 | using std::nullptr_t; 25 | #else // defined(ASIO_HAS_NULLPTR) 26 | struct nullptr_t {}; 27 | #endif // defined(ASIO_HAS_NULLPTR) 28 | 29 | } // namespace asio 30 | 31 | #endif // ASIO_DETAIL_CSTDDEF_HPP 32 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/cstdint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstdint.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDINT_HPP 12 | #define ASIO_DETAIL_CSTDINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CSTDINT) 21 | # include 22 | #else // defined(ASIO_HAS_CSTDINT) 23 | # include 24 | #endif // defined(ASIO_HAS_CSTDINT) 25 | 26 | namespace asio { 27 | 28 | #if defined(ASIO_HAS_CSTDINT) 29 | using std::int16_t; 30 | using std::int_least16_t; 31 | using std::uint16_t; 32 | using std::uint_least16_t; 33 | using std::int32_t; 34 | using std::int_least32_t; 35 | using std::uint32_t; 36 | using std::uint_least32_t; 37 | using std::int64_t; 38 | using std::int_least64_t; 39 | using std::uint64_t; 40 | using std::uint_least64_t; 41 | using std::uintmax_t; 42 | #else // defined(ASIO_HAS_CSTDINT) 43 | using boost::int16_t; 44 | using boost::int_least16_t; 45 | using boost::uint16_t; 46 | using boost::uint_least16_t; 47 | using boost::int32_t; 48 | using boost::int_least32_t; 49 | using boost::uint32_t; 50 | using boost::uint_least32_t; 51 | using boost::int64_t; 52 | using boost::int_least64_t; 53 | using boost::uint64_t; 54 | using boost::uint_least64_t; 55 | using boost::uintmax_t; 56 | #endif // defined(ASIO_HAS_CSTDINT) 57 | 58 | } // namespace asio 59 | 60 | #endif // ASIO_DETAIL_CSTDINT_HPP 61 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/dependent_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/dependent_type.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DEPENDENT_TYPE_HPP 12 | #define ASIO_DETAIL_DEPENDENT_TYPE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct dependent_type 27 | { 28 | typedef T type; 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace asio 33 | 34 | #include "asio/detail/pop_options.hpp" 35 | 36 | #endif // ASIO_DETAIL_DEPENDENT_TYPE_HPP 37 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/event.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/event.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_EVENT_HPP 12 | #define ASIO_DETAIL_EVENT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_event.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_event.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_event.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_event.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::condition_variable are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_event event; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_event event; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_event event; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_event event; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_EVENT_HPP 49 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/fd_set_adapter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/fd_set_adapter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FD_SET_ADAPTER_HPP 12 | #define ASIO_DETAIL_FD_SET_ADAPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/posix_fd_set_adapter.hpp" 23 | #include "asio/detail/win_fd_set_adapter.hpp" 24 | 25 | namespace asio { 26 | namespace detail { 27 | 28 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 29 | typedef win_fd_set_adapter fd_set_adapter; 30 | #else 31 | typedef posix_fd_set_adapter fd_set_adapter; 32 | #endif 33 | 34 | } // namespace detail 35 | } // namespace asio 36 | 37 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 38 | 39 | #endif // ASIO_DETAIL_FD_SET_ADAPTER_HPP 40 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/functional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/functional.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUNCTIONAL_HPP 12 | #define ASIO_DETAIL_FUNCTIONAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include 21 | 22 | #if !defined(ASIO_HAS_STD_FUNCTION) 23 | # include 24 | #endif // !defined(ASIO_HAS_STD_FUNCTION) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_FUNCTION) 30 | using std::function; 31 | #else // defined(ASIO_HAS_STD_FUNCTION) 32 | using boost::function; 33 | #endif // defined(ASIO_HAS_STD_FUNCTION) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_FUNCTIONAL_HPP 39 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/future.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/future.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUTURE_HPP 12 | #define ASIO_DETAIL_FUTURE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #if defined(ASIO_HAS_STD_FUTURE) 20 | # include 21 | // Even though the future header is available, libstdc++ may not implement the 22 | // std::future class itself. However, we need to have already included the 23 | // future header to reliably test for _GLIBCXX_HAS_GTHREADS. 24 | # if defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 25 | # if defined(_GLIBCXX_HAS_GTHREADS) 26 | # define ASIO_HAS_STD_FUTURE_CLASS 1 27 | # endif // defined(_GLIBCXX_HAS_GTHREADS) 28 | # else // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 29 | # define ASIO_HAS_STD_FUTURE_CLASS 1 30 | # endif // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 31 | #endif // defined(ASIO_HAS_STD_FUTURE) 32 | 33 | #endif // ASIO_DETAIL_FUTURE_HPP 34 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/gcc_hppa_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_hppa_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class gcc_hppa_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t { half }; 34 | enum full_t { full }; 35 | 36 | // Constructor for a half fenced block. 37 | explicit gcc_hppa_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit gcc_hppa_fenced_block(full_t) 43 | { 44 | barrier(); 45 | } 46 | 47 | // Destructor. 48 | ~gcc_hppa_fenced_block() 49 | { 50 | barrier(); 51 | } 52 | 53 | private: 54 | static void barrier() 55 | { 56 | // This is just a placeholder and almost certainly not sufficient. 57 | __asm__ __volatile__ ("" : : : "memory"); 58 | } 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 67 | 68 | #endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 69 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/gcc_sync_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_sync_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) \ 21 | && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \ 22 | && !defined(__INTEL_COMPILER) && !defined(__ICL) \ 23 | && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 24 | 25 | #include "asio/detail/noncopyable.hpp" 26 | 27 | #include "asio/detail/push_options.hpp" 28 | 29 | namespace asio { 30 | namespace detail { 31 | 32 | class gcc_sync_fenced_block 33 | : private noncopyable 34 | { 35 | public: 36 | enum half_or_full_t { half, full }; 37 | 38 | // Constructor. 39 | explicit gcc_sync_fenced_block(half_or_full_t) 40 | : value_(0) 41 | { 42 | __sync_lock_test_and_set(&value_, 1); 43 | } 44 | 45 | // Destructor. 46 | ~gcc_sync_fenced_block() 47 | { 48 | __sync_lock_release(&value_); 49 | } 50 | 51 | private: 52 | int value_; 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__GNUC__) 61 | // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) 62 | // && !defined(__INTEL_COMPILER) && !defined(__ICL) 63 | // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 64 | 65 | #endif // ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 66 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/global.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GLOBAL_HPP 12 | #define ASIO_DETAIL_GLOBAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_global.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_global.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_global.hpp" 26 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 27 | # include "asio/detail/std_global.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::call_once are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | template 36 | inline T& global() 37 | { 38 | #if !defined(ASIO_HAS_THREADS) 39 | return null_global(); 40 | #elif defined(ASIO_WINDOWS) 41 | return win_global(); 42 | #elif defined(ASIO_HAS_PTHREADS) 43 | return posix_global(); 44 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 45 | return std_global(); 46 | #endif 47 | } 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_GLOBAL_HPP 53 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/handler_cont_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_cont_helpers.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/memory.hpp" 20 | #include "asio/handler_continuation_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_is_continuation must be made from a namespace that 25 | // does not contain overloads of this function. This namespace is defined here 26 | // for that purpose. 27 | namespace asio_handler_cont_helpers { 28 | 29 | template 30 | inline bool is_continuation(Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | return false; 34 | #else 35 | using asio::asio_handler_is_continuation; 36 | return asio_handler_is_continuation( 37 | asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | } // namespace asio_handler_cont_helpers 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 46 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/handler_invoke_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_invoke_helpers.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/memory.hpp" 20 | #include "asio/handler_invoke_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_invoke must be made from a namespace that does not 25 | // contain overloads of this function. The asio_handler_invoke_helpers 26 | // namespace is defined here for that purpose. 27 | namespace asio_handler_invoke_helpers { 28 | 29 | template 30 | inline void invoke(Function& function, Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | Function tmp(function); 34 | tmp(); 35 | #else 36 | using asio::asio_handler_invoke; 37 | asio_handler_invoke(function, asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | template 42 | inline void invoke(const Function& function, Context& context) 43 | { 44 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 45 | Function tmp(function); 46 | tmp(); 47 | #else 48 | using asio::asio_handler_invoke; 49 | asio_handler_invoke(function, asio::detail::addressof(context)); 50 | #endif 51 | } 52 | 53 | } // namespace asio_handler_invoke_helpers 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP 58 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/impl/posix_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_event.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_event.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_event::posix_event() 32 | : state_(0) 33 | { 34 | #if (defined(__MACH__) && defined(__APPLE__)) \ 35 | || (defined(__ANDROID__) && (__ANDROID_API__ < 21)) 36 | int error = ::pthread_cond_init(&cond_, 0); 37 | #else // (defined(__MACH__) && defined(__APPLE__)) 38 | // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)) 39 | ::pthread_condattr_t attr; 40 | ::pthread_condattr_init(&attr); 41 | int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); 42 | if (error == 0) 43 | error = ::pthread_cond_init(&cond_, &attr); 44 | #endif // (defined(__MACH__) && defined(__APPLE__)) 45 | // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)) 46 | 47 | asio::error_code ec(error, 48 | asio::error::get_system_category()); 49 | asio::detail::throw_error(ec, "event"); 50 | } 51 | 52 | } // namespace detail 53 | } // namespace asio 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // defined(ASIO_HAS_PTHREADS) 58 | 59 | #endif // ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/impl/posix_mutex.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_mutex.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_mutex.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_mutex::posix_mutex() 32 | { 33 | int error = ::pthread_mutex_init(&mutex_, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "mutex"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 47 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/impl/posix_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_tss_ptr.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | void posix_tss_ptr_create(pthread_key_t& key) 32 | { 33 | int error = ::pthread_key_create(&key, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "tss"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 47 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/impl/win_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/win_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_tss_ptr.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | DWORD win_tss_ptr_create() 32 | { 33 | #if defined(UNDER_CE) 34 | const DWORD out_of_indexes = 0xFFFFFFFF; 35 | #else 36 | const DWORD out_of_indexes = TLS_OUT_OF_INDEXES; 37 | #endif 38 | 39 | DWORD tss_key = ::TlsAlloc(); 40 | if (tss_key == out_of_indexes) 41 | { 42 | DWORD last_error = ::GetLastError(); 43 | asio::error_code ec(last_error, 44 | asio::error::get_system_category()); 45 | asio::detail::throw_error(ec, "tss"); 46 | } 47 | return tss_key; 48 | } 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) 56 | 57 | #endif // ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 58 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/keyword_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/keyword_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 12 | #define ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class keyword_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | keyword_tss_ptr() 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~keyword_tss_ptr() 41 | { 42 | } 43 | 44 | // Get the value. 45 | operator T*() const 46 | { 47 | return value_; 48 | } 49 | 50 | // Set the value. 51 | void operator=(T* value) 52 | { 53 | value_ = value; 54 | } 55 | 56 | private: 57 | static ASIO_THREAD_KEYWORD T* value_; 58 | }; 59 | 60 | template 61 | ASIO_THREAD_KEYWORD T* keyword_tss_ptr::value_; 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 69 | 70 | #endif // ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 71 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_LIMITS) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_LIMITS) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_LIMITS) 25 | 26 | #endif // ASIO_DETAIL_LIMITS_HPP 27 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/local_free_on_block_exit.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/local_free_on_block_exit.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 12 | #define ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 21 | #if !defined(ASIO_WINDOWS_APP) 22 | 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/socket_types.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class local_free_on_block_exit 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor blocks all signals for the calling thread. 36 | explicit local_free_on_block_exit(void* p) 37 | : p_(p) 38 | { 39 | } 40 | 41 | // Destructor restores the previous signal mask. 42 | ~local_free_on_block_exit() 43 | { 44 | ::LocalFree(p_); 45 | } 46 | 47 | private: 48 | void* p_; 49 | }; 50 | 51 | } // namespace detail 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // !defined(ASIO_WINDOWS_APP) 57 | #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 58 | 59 | #endif // ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/macos_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/macos_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__MACH__) && defined(__APPLE__) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class macos_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit macos_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit macos_fenced_block(full_t) 44 | { 45 | OSMemoryBarrier(); 46 | } 47 | 48 | // Destructor. 49 | ~macos_fenced_block() 50 | { 51 | OSMemoryBarrier(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__MACH__) && defined(__APPLE__) 61 | 62 | #endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/mutex.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MUTEX_HPP 12 | #define ASIO_DETAIL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_mutex.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::mutex are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_mutex mutex; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_mutex mutex; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_mutex mutex; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_mutex mutex; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_MUTEX_HPP 49 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/noncopyable.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NONCOPYABLE_HPP 12 | #define ASIO_DETAIL_NONCOPYABLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class noncopyable 26 | { 27 | protected: 28 | noncopyable() {} 29 | ~noncopyable() {} 30 | private: 31 | noncopyable(const noncopyable&); 32 | const noncopyable& operator=(const noncopyable&); 33 | }; 34 | 35 | } // namespace detail 36 | 37 | using asio::detail::noncopyable; 38 | 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_DETAIL_NONCOPYABLE_HPP 44 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/noncopyable.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class null_fenced_block 26 | : private noncopyable 27 | { 28 | public: 29 | enum half_or_full_t { half, full }; 30 | 31 | // Constructor. 32 | explicit null_fenced_block(half_or_full_t) 33 | { 34 | } 35 | 36 | // Destructor. 37 | ~null_fenced_block() 38 | { 39 | } 40 | }; 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #include "asio/detail/pop_options.hpp" 46 | 47 | #endif // ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 48 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_global.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_GLOBAL_HPP 12 | #define ASIO_DETAIL_NULL_GLOBAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct null_global_impl 27 | { 28 | null_global_impl() 29 | : ptr_(0) 30 | { 31 | } 32 | 33 | // Destructor automatically cleans up the global. 34 | ~null_global_impl() 35 | { 36 | delete ptr_; 37 | } 38 | 39 | static null_global_impl instance_; 40 | T* ptr_; 41 | }; 42 | 43 | template 44 | null_global_impl null_global_impl::instance_; 45 | 46 | template 47 | T& null_global() 48 | { 49 | if (null_global_impl::instance_.ptr_ == 0) 50 | null_global_impl::instance_.ptr_ = new T; 51 | return *null_global_impl::instance_.ptr_; 52 | } 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_DETAIL_NULL_GLOBAL_HPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_mutex 31 | : private noncopyable 32 | { 33 | public: 34 | typedef asio::detail::scoped_lock scoped_lock; 35 | 36 | // Constructor. 37 | null_mutex() 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~null_mutex() 43 | { 44 | } 45 | 46 | // Lock the mutex. 47 | void lock() 48 | { 49 | } 50 | 51 | // Unlock the mutex. 52 | void unlock() 53 | { 54 | } 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // !defined(ASIO_HAS_THREADS) 63 | 64 | #endif // ASIO_DETAIL_NULL_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_REACTOR_HPP 12 | #define ASIO_DETAIL_NULL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/scheduler_operation.hpp" 23 | #include "asio/execution_context.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_reactor 31 | : public execution_context_service_base 32 | { 33 | public: 34 | // Constructor. 35 | null_reactor(asio::execution_context& ctx) 36 | : execution_context_service_base(ctx) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_reactor() 42 | { 43 | } 44 | 45 | // Destroy all user-defined handler objects owned by the service. 46 | void shutdown() 47 | { 48 | } 49 | 50 | // No-op because should never be called. 51 | void run(long /*usec*/, op_queue& /*ops*/) 52 | { 53 | } 54 | 55 | // No-op. 56 | void interrupt() 57 | { 58 | } 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 67 | 68 | #endif // ASIO_DETAIL_NULL_REACTOR_HPP 69 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) \ 21 | || defined(ASIO_WINDOWS) \ 22 | || defined(ASIO_WINDOWS_RUNTIME) \ 23 | || defined(__CYGWIN__) \ 24 | || defined(__SYMBIAN32__) 25 | 26 | #include "asio/detail/noncopyable.hpp" 27 | 28 | #include "asio/detail/push_options.hpp" 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | class null_signal_blocker 34 | : private noncopyable 35 | { 36 | public: 37 | // Constructor blocks all signals for the calling thread. 38 | null_signal_blocker() 39 | { 40 | } 41 | 42 | // Destructor restores the previous signal mask. 43 | ~null_signal_blocker() 44 | { 45 | } 46 | 47 | // Block all signals for the calling thread. 48 | void block() 49 | { 50 | } 51 | 52 | // Restore the previous signal mask. 53 | void unblock() 54 | { 55 | } 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // !defined(ASIO_HAS_THREADS) 64 | // || defined(ASIO_WINDOWS) 65 | // || defined(ASIO_WINDOWS_RUNTIME) 66 | // || defined(__CYGWIN__) 67 | // || defined(__SYMBIAN32__) 68 | 69 | #endif // ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 70 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/scoped_lock.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | struct null_static_mutex 30 | { 31 | typedef asio::detail::scoped_lock scoped_lock; 32 | 33 | // Initialise the mutex. 34 | void init() 35 | { 36 | } 37 | 38 | // Lock the mutex. 39 | void lock() 40 | { 41 | } 42 | 43 | // Unlock the mutex. 44 | void unlock() 45 | { 46 | } 47 | 48 | int unused_; 49 | }; 50 | 51 | #define ASIO_NULL_STATIC_MUTEX_INIT { 0 } 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // !defined(ASIO_HAS_THREADS) 59 | 60 | #endif // ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 61 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_THREAD_HPP 12 | #define ASIO_DETAIL_NULL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class null_thread 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor. 36 | template 37 | null_thread(Function, unsigned int = 0) 38 | { 39 | asio::detail::throw_error( 40 | asio::error::operation_not_supported, "thread"); 41 | } 42 | 43 | // Destructor. 44 | ~null_thread() 45 | { 46 | } 47 | 48 | // Wait for the thread to exit. 49 | void join() 50 | { 51 | } 52 | 53 | // Get number of CPUs. 54 | static std::size_t hardware_concurrency() 55 | { 56 | return 1; 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_HAS_THREADS) 66 | 67 | #endif // ASIO_DETAIL_NULL_THREAD_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/null_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_TSS_PTR_HPP 12 | #define ASIO_DETAIL_NULL_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class null_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | null_tss_ptr() 36 | : value_(0) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_tss_ptr() 42 | { 43 | } 44 | 45 | // Get the value. 46 | operator T*() const 47 | { 48 | return value_; 49 | } 50 | 51 | // Set the value. 52 | void operator=(T* value) 53 | { 54 | value_ = value; 55 | } 56 | 57 | private: 58 | T* value_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // !defined(ASIO_HAS_THREADS) 67 | 68 | #endif // ASIO_DETAIL_NULL_TSS_PTR_HPP 69 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/operation.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/operation.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_OPERATION_HPP 12 | #define ASIO_DETAIL_OPERATION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_IOCP) 21 | # include "asio/detail/win_iocp_operation.hpp" 22 | #else 23 | # include "asio/detail/scheduler_operation.hpp" 24 | #endif 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_IOCP) 30 | typedef win_iocp_operation operation; 31 | #else 32 | typedef scheduler_operation operation; 33 | #endif 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_OPERATION_HPP 39 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/posix_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_POSIX_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class posix_event; 32 | 33 | class posix_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | ASIO_DECL posix_mutex(); 41 | 42 | // Destructor. 43 | ~posix_mutex() 44 | { 45 | ::pthread_mutex_destroy(&mutex_); // Ignore EBUSY. 46 | } 47 | 48 | // Lock the mutex. 49 | void lock() 50 | { 51 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 52 | } 53 | 54 | // Unlock the mutex. 55 | void unlock() 56 | { 57 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 58 | } 59 | 60 | private: 61 | friend class posix_event; 62 | ::pthread_mutex_t mutex_; 63 | }; 64 | 65 | } // namespace detail 66 | } // namespace asio 67 | 68 | #include "asio/detail/pop_options.hpp" 69 | 70 | #if defined(ASIO_HEADER_ONLY) 71 | # include "asio/detail/impl/posix_mutex.ipp" 72 | #endif // defined(ASIO_HEADER_ONLY) 73 | 74 | #endif // defined(ASIO_HAS_PTHREADS) 75 | 76 | #endif // ASIO_DETAIL_POSIX_MUTEX_HPP 77 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/posix_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | struct posix_static_mutex 31 | { 32 | typedef asio::detail::scoped_lock scoped_lock; 33 | 34 | // Initialise the mutex. 35 | void init() 36 | { 37 | // Nothing to do. 38 | } 39 | 40 | // Lock the mutex. 41 | void lock() 42 | { 43 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 44 | } 45 | 46 | // Unlock the mutex. 47 | void unlock() 48 | { 49 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 50 | } 51 | 52 | ::pthread_mutex_t mutex_; 53 | }; 54 | 55 | #define ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER } 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // defined(ASIO_HAS_PTHREADS) 63 | 64 | #endif // ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_HPP 12 | #define ASIO_DETAIL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/reactor_fwd.hpp" 19 | 20 | #if defined(ASIO_HAS_EPOLL) 21 | # include "asio/detail/epoll_reactor.hpp" 22 | #elif defined(ASIO_HAS_KQUEUE) 23 | # include "asio/detail/kqueue_reactor.hpp" 24 | #elif defined(ASIO_HAS_DEV_POLL) 25 | # include "asio/detail/dev_poll_reactor.hpp" 26 | #elif defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 27 | # include "asio/detail/null_reactor.hpp" 28 | #else 29 | # include "asio/detail/select_reactor.hpp" 30 | #endif 31 | 32 | #endif // ASIO_DETAIL_REACTOR_HPP 33 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/reactor_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_FWD_HPP 12 | #define ASIO_DETAIL_REACTOR_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class null_reactor reactor; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class select_reactor reactor; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor reactor; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor reactor; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor reactor; 33 | #else 34 | typedef class select_reactor reactor; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_REACTOR_FWD_HPP 41 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/reactor_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_OP_HPP 12 | #define ASIO_DETAIL_REACTOR_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class reactor_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The number of bytes transferred, to be passed to the completion handler. 34 | std::size_t bytes_transferred_; 35 | 36 | // Status returned by perform function. May be used to decide whether it is 37 | // worth performing more operations on the descriptor immediately. 38 | enum status { not_done, done, done_and_exhausted }; 39 | 40 | // Perform the operation. Returns true if it is finished. 41 | status perform() 42 | { 43 | return perform_func_(this); 44 | } 45 | 46 | protected: 47 | typedef status (*perform_func_type)(reactor_op*); 48 | 49 | reactor_op(perform_func_type perform_func, func_type complete_func) 50 | : operation(complete_func), 51 | bytes_transferred_(0), 52 | perform_func_(perform_func) 53 | { 54 | } 55 | 56 | private: 57 | perform_func_type perform_func_; 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // ASIO_DETAIL_REACTOR_OP_HPP 66 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | template 26 | struct sub_match; 27 | 28 | template 29 | class match_results; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/resolve_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/resolve_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_RESOLVE_OP_HPP 12 | #define ASIO_DETAIL_RESOLVE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error.hpp" 20 | #include "asio/detail/operation.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class resolve_op : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | resolve_op(func_type complete_func) 35 | : operation(complete_func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_RESOLVE_OP_HPP 46 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/scheduler_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scheduler_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/op_queue.hpp" 19 | #include "asio/detail/thread_info_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class scheduler; 27 | class scheduler_operation; 28 | 29 | struct scheduler_thread_info : public thread_info_base 30 | { 31 | op_queue private_op_queue; 32 | long private_outstanding_work; 33 | }; 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 41 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/scoped_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scoped_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SCOPED_PTR_HPP 12 | #define ASIO_DETAIL_SCOPED_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | class scoped_ptr 27 | { 28 | public: 29 | // Constructor. 30 | explicit scoped_ptr(T* p = 0) 31 | : p_(p) 32 | { 33 | } 34 | 35 | // Destructor. 36 | ~scoped_ptr() 37 | { 38 | delete p_; 39 | } 40 | 41 | // Access. 42 | T* get() 43 | { 44 | return p_; 45 | } 46 | 47 | // Access. 48 | T* operator->() 49 | { 50 | return p_; 51 | } 52 | 53 | // Dereference. 54 | T& operator*() 55 | { 56 | return *p_; 57 | } 58 | 59 | // Reset pointer. 60 | void reset(T* p = 0) 61 | { 62 | delete p_; 63 | p_ = p; 64 | } 65 | 66 | // Release ownership of the pointer. 67 | T* release() 68 | { 69 | T* tmp = p_; 70 | p_ = 0; 71 | return tmp; 72 | } 73 | 74 | private: 75 | // Disallow copying and assignment. 76 | scoped_ptr(const scoped_ptr&); 77 | scoped_ptr& operator=(const scoped_ptr&); 78 | 79 | T* p_; 80 | }; 81 | 82 | } // namespace detail 83 | } // namespace asio 84 | 85 | #include "asio/detail/pop_options.hpp" 86 | 87 | #endif // ASIO_DETAIL_SCOPED_PTR_HPP 88 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/select_interrupter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/select_interrupter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SELECT_INTERRUPTER_HPP 12 | #define ASIO_DETAIL_SELECT_INTERRUPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/socket_select_interrupter.hpp" 24 | #elif defined(ASIO_HAS_EVENTFD) 25 | # include "asio/detail/eventfd_select_interrupter.hpp" 26 | #else 27 | # include "asio/detail/pipe_select_interrupter.hpp" 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 34 | typedef socket_select_interrupter select_interrupter; 35 | #elif defined(ASIO_HAS_EVENTFD) 36 | typedef eventfd_select_interrupter select_interrupter; 37 | #else 38 | typedef pipe_select_interrupter select_interrupter; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 45 | 46 | #endif // ASIO_DETAIL_SELECT_INTERRUPTER_HPP 47 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 21 | || defined(ASIO_WINDOWS_RUNTIME) \ 22 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/null_signal_blocker.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_signal_blocker.hpp" 26 | #else 27 | # error Only Windows and POSIX are supported! 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 34 | || defined(ASIO_WINDOWS_RUNTIME) \ 35 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 36 | typedef null_signal_blocker signal_blocker; 37 | #elif defined(ASIO_HAS_PTHREADS) 38 | typedef posix_signal_blocker signal_blocker; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // ASIO_DETAIL_SIGNAL_BLOCKER_HPP 45 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/signal_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_init.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_INIT_HPP 12 | #define ASIO_DETAIL_SIGNAL_INIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class signal_init 31 | { 32 | public: 33 | // Constructor. 34 | signal_init() 35 | { 36 | std::signal(Signal, SIG_IGN); 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 46 | 47 | #endif // ASIO_DETAIL_SIGNAL_INIT_HPP 48 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/signal_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_OP_HPP 12 | #define ASIO_DETAIL_SIGNAL_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class signal_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The signal number to be passed to the completion handler. 34 | int signal_number_; 35 | 36 | protected: 37 | signal_op(func_type func) 38 | : operation(func), 39 | signal_number_(0) 40 | { 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #endif // ASIO_DETAIL_SIGNAL_OP_HPP 50 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/solaris_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/solaris_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__sun) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class solaris_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit solaris_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit solaris_fenced_block(full_t) 44 | { 45 | membar_consumer(); 46 | } 47 | 48 | // Destructor. 49 | ~solaris_fenced_block() 50 | { 51 | membar_producer(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__sun) 61 | 62 | #endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_static_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_static_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_static_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_static_mutex.hpp" 28 | #else 29 | # error Only Windows and POSIX are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_static_mutex static_mutex; 37 | # define ASIO_STATIC_MUTEX_INIT ASIO_NULL_STATIC_MUTEX_INIT 38 | #elif defined(ASIO_WINDOWS) 39 | typedef win_static_mutex static_mutex; 40 | # define ASIO_STATIC_MUTEX_INIT ASIO_WIN_STATIC_MUTEX_INIT 41 | #elif defined(ASIO_HAS_PTHREADS) 42 | typedef posix_static_mutex static_mutex; 43 | # define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT 44 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 45 | typedef std_static_mutex static_mutex; 46 | # define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT 47 | #endif 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_STATIC_MUTEX_HPP 53 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/std_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_STD_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ATOMIC) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit std_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit std_fenced_block(full_t) 44 | { 45 | std::atomic_thread_fence(std::memory_order_acquire); 46 | } 47 | 48 | // Destructor. 49 | ~std_fenced_block() 50 | { 51 | std::atomic_thread_fence(std::memory_order_release); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(ASIO_HAS_STD_ATOMIC) 61 | 62 | #endif // ASIO_DETAIL_STD_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/std_global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_global.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_GLOBAL_HPP 12 | #define ASIO_DETAIL_STD_GLOBAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_CALL_ONCE) 21 | 22 | #include 23 | #include 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | template 31 | struct std_global_impl 32 | { 33 | // Helper function to perform initialisation. 34 | static void do_init() 35 | { 36 | instance_.ptr_ = new T; 37 | } 38 | 39 | // Destructor automatically cleans up the global. 40 | ~std_global_impl() 41 | { 42 | delete ptr_; 43 | } 44 | 45 | static std::once_flag init_once_; 46 | static std_global_impl instance_; 47 | T* ptr_; 48 | }; 49 | 50 | template 51 | std::once_flag std_global_impl::init_once_; 52 | 53 | template 54 | std_global_impl std_global_impl::instance_; 55 | 56 | template 57 | T& std_global() 58 | { 59 | std::call_once(std_global_impl::init_once_, &std_global_impl::do_init); 60 | return *std_global_impl::instance_.ptr_; 61 | } 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_STD_CALL_ONCE) 69 | 70 | #endif // ASIO_DETAIL_STD_GLOBAL_HPP 71 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/std_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_mutex() 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_mutex() 46 | { 47 | } 48 | 49 | // Lock the mutex. 50 | void lock() 51 | { 52 | mutex_.lock(); 53 | } 54 | 55 | // Unlock the mutex. 56 | void unlock() 57 | { 58 | mutex_.unlock(); 59 | } 60 | 61 | private: 62 | friend class std_event; 63 | std::mutex mutex_; 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace asio 68 | 69 | #include "asio/detail/pop_options.hpp" 70 | 71 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 72 | 73 | #endif // ASIO_DETAIL_STD_MUTEX_HPP 74 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/std_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_static_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_static_mutex(int) 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_static_mutex() 46 | { 47 | } 48 | 49 | // Initialise the mutex. 50 | void init() 51 | { 52 | // Nothing to do. 53 | } 54 | 55 | // Lock the mutex. 56 | void lock() 57 | { 58 | mutex_.lock(); 59 | } 60 | 61 | // Unlock the mutex. 62 | void unlock() 63 | { 64 | mutex_.unlock(); 65 | } 66 | 67 | private: 68 | friend class std_event; 69 | std::mutex mutex_; 70 | }; 71 | 72 | #define ASIO_STD_STATIC_MUTEX_INIT 0 73 | 74 | } // namespace detail 75 | } // namespace asio 76 | 77 | #include "asio/detail/pop_options.hpp" 78 | 79 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 80 | 81 | #endif // ASIO_DETAIL_STD_STATIC_MUTEX_HPP 82 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/std_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_THREAD_HPP 12 | #define ASIO_DETAIL_STD_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_THREAD) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_thread 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | template 36 | std_thread(Function f, unsigned int = 0) 37 | : thread_(f) 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~std_thread() 43 | { 44 | join(); 45 | } 46 | 47 | // Wait for the thread to exit. 48 | void join() 49 | { 50 | if (thread_.joinable()) 51 | thread_.join(); 52 | } 53 | 54 | // Get number of CPUs. 55 | static std::size_t hardware_concurrency() 56 | { 57 | return std::thread::hardware_concurrency(); 58 | } 59 | 60 | private: 61 | std::thread thread_; 62 | }; 63 | 64 | } // namespace detail 65 | } // namespace asio 66 | 67 | #include "asio/detail/pop_options.hpp" 68 | 69 | #endif // defined(ASIO_HAS_STD_THREAD) 70 | 71 | #endif // ASIO_DETAIL_STD_THREAD_HPP 72 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/string_view.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/string_view.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STRING_VIEW_HPP 12 | #define ASIO_DETAIL_STRING_VIEW_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STRING_VIEW) 21 | 22 | #if defined(ASIO_HAS_STD_STRING_VIEW) 23 | # include 24 | #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 25 | # include 26 | #else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 27 | # error ASIO_HAS_STRING_VIEW is set but no string_view is available 28 | #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 29 | 30 | namespace asio { 31 | 32 | #if defined(ASIO_HAS_STD_STRING_VIEW) 33 | using std::basic_string_view; 34 | using std::string_view; 35 | #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 36 | using std::experimental::basic_string_view; 37 | using std::experimental::string_view; 38 | #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 39 | 40 | } // namespace asio 41 | 42 | # define ASIO_STRING_VIEW_PARAM asio::string_view 43 | #else // defined(ASIO_HAS_STRING_VIEW) 44 | # define ASIO_STRING_VIEW_PARAM const std::string& 45 | #endif // defined(ASIO_HAS_STRING_VIEW) 46 | 47 | #endif // ASIO_DETAIL_STRING_VIEW_HPP 48 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THREAD_HPP 12 | #define ASIO_DETAIL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_thread.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # if defined(UNDER_CE) 24 | # include "asio/detail/wince_thread.hpp" 25 | # elif defined(ASIO_WINDOWS_APP) 26 | # include "asio/detail/winapp_thread.hpp" 27 | # else 28 | # include "asio/detail/win_thread.hpp" 29 | # endif 30 | #elif defined(ASIO_HAS_PTHREADS) 31 | # include "asio/detail/posix_thread.hpp" 32 | #elif defined(ASIO_HAS_STD_THREAD) 33 | # include "asio/detail/std_thread.hpp" 34 | #else 35 | # error Only Windows, POSIX and std::thread are supported! 36 | #endif 37 | 38 | namespace asio { 39 | namespace detail { 40 | 41 | #if !defined(ASIO_HAS_THREADS) 42 | typedef null_thread thread; 43 | #elif defined(ASIO_WINDOWS) 44 | # if defined(UNDER_CE) 45 | typedef wince_thread thread; 46 | # elif defined(ASIO_WINDOWS_APP) 47 | typedef winapp_thread thread; 48 | # else 49 | typedef win_thread thread; 50 | # endif 51 | #elif defined(ASIO_HAS_PTHREADS) 52 | typedef posix_thread thread; 53 | #elif defined(ASIO_HAS_STD_THREAD) 54 | typedef std_thread thread; 55 | #endif 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #endif // ASIO_DETAIL_THREAD_HPP 61 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/thread_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THREAD_CONTEXT_HPP 12 | #define ASIO_DETAIL_THREAD_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include 19 | #include 20 | #include "asio/detail/call_stack.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class thread_info_base; 28 | 29 | // Base class for things that manage threads (scheduler, win_iocp_io_context). 30 | class thread_context 31 | { 32 | public: 33 | // Per-thread call stack to track the state of each thread in the context. 34 | typedef call_stack thread_call_stack; 35 | }; 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #include "asio/detail/pop_options.hpp" 41 | 42 | #endif // ASIO_DETAIL_THREAD_CONTEXT_HPP 43 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/throw_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_error.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_ERROR_HPP 12 | #define ASIO_DETAIL_THROW_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | ASIO_DECL void do_throw_error(const asio::error_code& err); 27 | 28 | ASIO_DECL void do_throw_error(const asio::error_code& err, 29 | const char* location); 30 | 31 | inline void throw_error(const asio::error_code& err) 32 | { 33 | if (err) 34 | do_throw_error(err); 35 | } 36 | 37 | inline void throw_error(const asio::error_code& err, 38 | const char* location) 39 | { 40 | if (err) 41 | do_throw_error(err, location); 42 | } 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #if defined(ASIO_HEADER_ONLY) 50 | # include "asio/detail/impl/throw_error.ipp" 51 | #endif // defined(ASIO_HEADER_ONLY) 52 | 53 | #endif // ASIO_DETAIL_THROW_ERROR_HPP 54 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/throw_exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_EXCEPTION_HPP 12 | #define ASIO_DETAIL_THROW_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 21 | # include 22 | #endif // defined(ASIO_BOOST_THROW_EXCEPTION) 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 28 | using boost::throw_exception; 29 | #else // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 30 | 31 | // Declare the throw_exception function for all targets. 32 | template 33 | void throw_exception(const Exception& e); 34 | 35 | // Only define the throw_exception function when exceptions are enabled. 36 | // Otherwise, it is up to the application to provide a definition of this 37 | // function. 38 | # if !defined(ASIO_NO_EXCEPTIONS) 39 | template 40 | void throw_exception(const Exception& e) 41 | { 42 | throw e; 43 | } 44 | # endif // !defined(ASIO_NO_EXCEPTIONS) 45 | 46 | #endif // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 47 | 48 | } // namespace detail 49 | } // namespace asio 50 | 51 | #endif // ASIO_DETAIL_THROW_EXCEPTION_HPP 52 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/timer_queue_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_queue_set.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_QUEUE_SET_HPP 12 | #define ASIO_DETAIL_TIMER_QUEUE_SET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/timer_queue_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class timer_queue_set 27 | { 28 | public: 29 | // Constructor. 30 | ASIO_DECL timer_queue_set(); 31 | 32 | // Add a timer queue to the set. 33 | ASIO_DECL void insert(timer_queue_base* q); 34 | 35 | // Remove a timer queue from the set. 36 | ASIO_DECL void erase(timer_queue_base* q); 37 | 38 | // Determine whether all queues are empty. 39 | ASIO_DECL bool all_empty() const; 40 | 41 | // Get the wait duration in milliseconds. 42 | ASIO_DECL long wait_duration_msec(long max_duration) const; 43 | 44 | // Get the wait duration in microseconds. 45 | ASIO_DECL long wait_duration_usec(long max_duration) const; 46 | 47 | // Dequeue all ready timers. 48 | ASIO_DECL void get_ready_timers(op_queue& ops); 49 | 50 | // Dequeue all timers. 51 | ASIO_DECL void get_all_timers(op_queue& ops); 52 | 53 | private: 54 | timer_queue_base* first_; 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #if defined(ASIO_HEADER_ONLY) 63 | # include "asio/detail/impl/timer_queue_set.ipp" 64 | #endif // defined(ASIO_HEADER_ONLY) 65 | 66 | #endif // ASIO_DETAIL_TIMER_QUEUE_SET_HPP 67 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/timer_scheduler.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/timer_scheduler_fwd.hpp" 20 | 21 | #if defined(ASIO_WINDOWS_RUNTIME) 22 | # include "asio/detail/winrt_timer_scheduler.hpp" 23 | #elif defined(ASIO_HAS_IOCP) 24 | # include "asio/detail/win_iocp_io_context.hpp" 25 | #elif defined(ASIO_HAS_EPOLL) 26 | # include "asio/detail/epoll_reactor.hpp" 27 | #elif defined(ASIO_HAS_KQUEUE) 28 | # include "asio/detail/kqueue_reactor.hpp" 29 | #elif defined(ASIO_HAS_DEV_POLL) 30 | # include "asio/detail/dev_poll_reactor.hpp" 31 | #else 32 | # include "asio/detail/select_reactor.hpp" 33 | #endif 34 | 35 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_HPP 36 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/timer_scheduler_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class winrt_timer_scheduler timer_scheduler; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class win_iocp_io_context timer_scheduler; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor timer_scheduler; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor timer_scheduler; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor timer_scheduler; 33 | #else 34 | typedef class select_reactor timer_scheduler; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 41 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/wait_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/wait_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WAIT_OP_HPP 12 | #define ASIO_DETAIL_WAIT_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class wait_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | wait_op(func_type func) 35 | : operation(func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_WAIT_OP_HPP 46 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/win_iocp_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_iocp_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/thread_info_base.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | struct win_iocp_thread_info : public thread_info_base 26 | { 27 | }; 28 | 29 | } // namespace detail 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 35 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/detail/winrt_async_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/winrt_async_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WINRT_ASYNC_OP_HPP 12 | #define ASIO_DETAIL_WINRT_ASYNC_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | template 27 | class winrt_async_op 28 | : public operation 29 | { 30 | public: 31 | // The error code to be passed to the completion handler. 32 | asio::error_code ec_; 33 | 34 | // The result of the operation, to be passed to the completion handler. 35 | TResult result_; 36 | 37 | protected: 38 | winrt_async_op(func_type complete_func) 39 | : operation(complete_func), 40 | result_() 41 | { 42 | } 43 | }; 44 | 45 | template <> 46 | class winrt_async_op 47 | : public operation 48 | { 49 | public: 50 | // The error code to be passed to the completion handler. 51 | asio::error_code ec_; 52 | 53 | protected: 54 | winrt_async_op(func_type complete_func) 55 | : operation(complete_func) 56 | { 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // ASIO_DETAIL_WINRT_ASYNC_OP_HPP 66 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/experimental.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // experimental.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_EXPERIMENTAL_HPP 12 | #define ASIO_EXPERIMENTAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/experimental/co_spawn.hpp" 19 | #include "asio/experimental/detached.hpp" 20 | #include "asio/experimental/redirect_error.hpp" 21 | 22 | #endif // ASIO_EXPERIMENTAL_HPP 23 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/handler_continuation_hook.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_continuation_hook.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HANDLER_CONTINUATION_HOOK_HPP 12 | #define ASIO_HANDLER_CONTINUATION_HOOK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Default continuation function for handlers. 25 | /** 26 | * Asynchronous operations may represent a continuation of the asynchronous 27 | * control flow associated with the current handler. The implementation can use 28 | * this knowledge to optimise scheduling of the handler. 29 | * 30 | * Implement asio_handler_is_continuation for your own handlers to indicate 31 | * when a handler represents a continuation. 32 | * 33 | * The default implementation of the continuation hook returns false. 34 | * 35 | * @par Example 36 | * @code 37 | * class my_handler; 38 | * 39 | * bool asio_handler_is_continuation(my_handler* context) 40 | * { 41 | * return true; 42 | * } 43 | * @endcode 44 | */ 45 | inline bool asio_handler_is_continuation(...) 46 | { 47 | return false; 48 | } 49 | 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_HANDLER_CONTINUATION_HOOK_HPP 55 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/handler_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_type.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HANDLER_TYPE_HPP 12 | #define ASIO_HANDLER_TYPE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/type_traits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | /// (Deprecated: Use two-parameter version of async_result.) Default handler 26 | /// type traits provided for all completion token types. 27 | /** 28 | * The handler_type traits class is used for determining the concrete handler 29 | * type to be used for an asynchronous operation. It allows the handler type to 30 | * be determined at the point where the specific completion handler signature 31 | * is known. 32 | * 33 | * This template may be specialised for user-defined completion token types. 34 | */ 35 | template 36 | struct handler_type 37 | { 38 | /// The handler type for the specific signature. 39 | typedef typename conditional< 40 | is_same::type>::value, 41 | decay, 42 | handler_type::type, Signature> 43 | >::type::type type; 44 | }; 45 | 46 | } // namespace asio 47 | 48 | #include "asio/detail/pop_options.hpp" 49 | 50 | #endif // ASIO_HANDLER_TYPE_HPP 51 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/high_resolution_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // high_resolution_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HIGH_RESOLUTION_TIMER_HPP 12 | #define ASIO_HIGH_RESOLUTION_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the high resolution clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer< 37 | chrono::high_resolution_clock> 38 | high_resolution_timer; 39 | 40 | } // namespace asio 41 | 42 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 43 | 44 | #endif // ASIO_HIGH_RESOLUTION_TIMER_HPP 45 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/executor.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/executor.ipp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_EXECUTOR_IPP 12 | #define ASIO_IMPL_EXECUTOR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | bad_executor::bad_executor() ASIO_NOEXCEPT 26 | { 27 | } 28 | 29 | const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW 30 | { 31 | return "bad executor"; 32 | } 33 | 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #endif // ASIO_IMPL_EXECUTOR_IPP 39 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/handler_alloc_hook.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/handler_alloc_hook.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP 12 | #define ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/thread_context.hpp" 20 | #include "asio/detail/thread_info_base.hpp" 21 | #include "asio/handler_alloc_hook.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | 27 | void* asio_handler_allocate(std::size_t size, ...) 28 | { 29 | #if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 30 | return detail::thread_info_base::allocate( 31 | detail::thread_context::thread_call_stack::top(), size); 32 | #else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 33 | return ::operator new(size); 34 | #endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 35 | } 36 | 37 | void asio_handler_deallocate(void* pointer, std::size_t size, ...) 38 | { 39 | #if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 40 | detail::thread_info_base::deallocate( 41 | detail::thread_context::thread_call_stack::top(), pointer, size); 42 | #else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 43 | (void)size; 44 | ::operator delete(pointer); 45 | #endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 46 | } 47 | 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP 53 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/serial_port_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/serial_port_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IMPL_SERIAL_PORT_BASE_HPP 13 | #define ASIO_IMPL_SERIAL_PORT_BASE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/push_options.hpp" 20 | 21 | namespace asio { 22 | 23 | inline serial_port_base::baud_rate::baud_rate(unsigned int rate) 24 | : value_(rate) 25 | { 26 | } 27 | 28 | inline unsigned int serial_port_base::baud_rate::value() const 29 | { 30 | return value_; 31 | } 32 | 33 | inline serial_port_base::flow_control::type 34 | serial_port_base::flow_control::value() const 35 | { 36 | return value_; 37 | } 38 | 39 | inline serial_port_base::parity::type serial_port_base::parity::value() const 40 | { 41 | return value_; 42 | } 43 | 44 | inline serial_port_base::stop_bits::type 45 | serial_port_base::stop_bits::value() const 46 | { 47 | return value_; 48 | } 49 | 50 | inline unsigned int serial_port_base::character_size::value() const 51 | { 52 | return value_; 53 | } 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IMPL_SERIAL_PORT_BASE_HPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/src.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/src.cpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #if defined(_MSC_VER) \ 12 | || defined(__BORLANDC__) \ 13 | || defined(__DMC__) 14 | # pragma message ( \ 15 | "This file is deprecated. " \ 16 | "Please #include instead.") 17 | #elif defined(__GNUC__) \ 18 | || defined(__HP_aCC) \ 19 | || defined(__SUNPRO_CC) \ 20 | || defined(__IBMCPP__) 21 | # warning "This file is deprecated." 22 | # warning "Please #include instead." 23 | #endif 24 | 25 | #include "asio/impl/src.hpp" 26 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/system_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_SYSTEM_CONTEXT_HPP 12 | #define ASIO_IMPL_SYSTEM_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/system_executor.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | inline system_context::executor_type 25 | system_context::get_executor() ASIO_NOEXCEPT 26 | { 27 | return system_executor(); 28 | } 29 | 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_IMPL_SYSTEM_CONTEXT_HPP 35 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/system_context.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_context.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_SYSTEM_CONTEXT_IPP 12 | #define ASIO_IMPL_SYSTEM_CONTEXT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/system_context.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | struct system_context::thread_function 26 | { 27 | detail::scheduler* scheduler_; 28 | 29 | void operator()() 30 | { 31 | asio::error_code ec; 32 | scheduler_->run(ec); 33 | } 34 | }; 35 | 36 | system_context::system_context() 37 | : scheduler_(use_service(*this)) 38 | { 39 | scheduler_.work_started(); 40 | 41 | thread_function f = { &scheduler_ }; 42 | std::size_t num_threads = detail::thread::hardware_concurrency() * 2; 43 | threads_.create_threads(f, num_threads ? num_threads : 2); 44 | } 45 | 46 | system_context::~system_context() 47 | { 48 | scheduler_.work_finished(); 49 | scheduler_.stop(); 50 | threads_.join(); 51 | } 52 | 53 | void system_context::stop() 54 | { 55 | scheduler_.stop(); 56 | } 57 | 58 | bool system_context::stopped() const ASIO_NOEXCEPT 59 | { 60 | return scheduler_.stopped(); 61 | } 62 | 63 | void system_context::join() 64 | { 65 | scheduler_.work_finished(); 66 | threads_.join(); 67 | } 68 | 69 | } // namespace asio 70 | 71 | #include "asio/detail/pop_options.hpp" 72 | 73 | #endif // ASIO_IMPL_SYSTEM_CONTEXT_IPP 74 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/impl/thread_pool.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/thread_pool.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_THREAD_POOL_IPP 12 | #define ASIO_IMPL_THREAD_POOL_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/thread_pool.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | struct thread_pool::thread_function 26 | { 27 | detail::scheduler* scheduler_; 28 | 29 | void operator()() 30 | { 31 | asio::error_code ec; 32 | scheduler_->run(ec); 33 | } 34 | }; 35 | 36 | thread_pool::thread_pool() 37 | : scheduler_(use_service(*this)) 38 | { 39 | scheduler_.work_started(); 40 | 41 | thread_function f = { &scheduler_ }; 42 | std::size_t num_threads = detail::thread::hardware_concurrency() * 2; 43 | threads_.create_threads(f, num_threads ? num_threads : 2); 44 | } 45 | 46 | thread_pool::thread_pool(std::size_t num_threads) 47 | : scheduler_(use_service(*this)) 48 | { 49 | scheduler_.work_started(); 50 | 51 | thread_function f = { &scheduler_ }; 52 | threads_.create_threads(f, num_threads); 53 | } 54 | 55 | thread_pool::~thread_pool() 56 | { 57 | stop(); 58 | join(); 59 | } 60 | 61 | void thread_pool::stop() 62 | { 63 | scheduler_.stop(); 64 | } 65 | 66 | void thread_pool::join() 67 | { 68 | scheduler_.work_finished(); 69 | threads_.join(); 70 | } 71 | 72 | } // namespace asio 73 | 74 | #include "asio/detail/pop_options.hpp" 75 | 76 | #endif // ASIO_IMPL_THREAD_POOL_IPP 77 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/io_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_HPP 12 | #define ASIO_IO_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | #if !defined(ASIO_NO_DEPRECATED) 25 | /// Typedef for backwards compatibility. 26 | typedef io_context io_service; 27 | #endif // !defined(ASIO_NO_DEPRECATED) 28 | 29 | } // namespace asio 30 | 31 | #include "asio/detail/pop_options.hpp" 32 | 33 | #endif // ASIO_IO_SERVICE_HPP 34 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/io_service_strand.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service_strand.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_STRAND_HPP 12 | #define ASIO_IO_SERVICE_STRAND_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context_strand.hpp" 19 | 20 | #endif // ASIO_IO_SERVICE_STRAND_HPP 21 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/bad_address_cast.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/bad_address_cast.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_BAD_ADDRESS_CAST_HPP 12 | #define ASIO_IP_BAD_ADDRESS_CAST_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// Thrown to indicate a failed address conversion. 27 | class bad_address_cast : 28 | #if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS 29 | public std::exception 30 | #else 31 | public std::bad_cast 32 | #endif 33 | { 34 | public: 35 | /// Default constructor. 36 | bad_address_cast() {} 37 | 38 | /// Destructor. 39 | virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {} 40 | 41 | /// Get the message associated with the exception. 42 | virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW 43 | { 44 | return "bad address cast"; 45 | } 46 | }; 47 | 48 | } // namespace ip 49 | } // namespace asio 50 | 51 | #include "asio/detail/pop_options.hpp" 52 | 53 | #endif // ASIO_IP_ADDRESS_HPP 54 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/host_name.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/host_name.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_HOST_NAME_HPP 12 | #define ASIO_IP_HOST_NAME_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include "asio/error_code.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | /// Get the current host name. 28 | ASIO_DECL std::string host_name(); 29 | 30 | /// Get the current host name. 31 | ASIO_DECL std::string host_name(asio::error_code& ec); 32 | 33 | } // namespace ip 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #if defined(ASIO_HEADER_ONLY) 39 | # include "asio/ip/impl/host_name.ipp" 40 | #endif // defined(ASIO_HEADER_ONLY) 41 | 42 | #endif // ASIO_IP_HOST_NAME_HPP 43 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/address.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address address::from_string(const char* str) 30 | { 31 | return asio::ip::make_address(str); 32 | } 33 | 34 | inline address address::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address(str, ec); 38 | } 39 | 40 | inline address address::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address(str); 43 | } 44 | 45 | inline address address::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/address_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V4_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V4_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address_v4 address_v4::from_string(const char* str) 30 | { 31 | return asio::ip::make_address_v4(str); 32 | } 33 | 34 | inline address_v4 address_v4::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address_v4(str, ec); 38 | } 39 | 40 | inline address_v4 address_v4::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address_v4(str); 43 | } 44 | 45 | inline address_v4 address_v4::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address_v4(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address_v4& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_V4_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/address_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v6.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V6_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address_v6 address_v6::from_string(const char* str) 30 | { 31 | return asio::ip::make_address_v6(str); 32 | } 33 | 34 | inline address_v6 address_v6::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address_v6(str, ec); 38 | } 39 | 40 | inline address_v6 address_v6::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address_v6(str); 43 | } 44 | 45 | inline address_v6 address_v6::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address_v6(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address_v6& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_V6_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/basic_endpoint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/basic_endpoint.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 12 | #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, 30 | const basic_endpoint& endpoint) 31 | { 32 | asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port()); 33 | return os << tmp_ep.to_string().c_str(); 34 | } 35 | 36 | } // namespace ip 37 | } // namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // !defined(ASIO_NO_IOSTREAM) 42 | 43 | #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 44 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/host_name.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/host_name.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_HOST_NAME_IPP 12 | #define ASIO_IP_IMPL_HOST_NAME_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_ops.hpp" 20 | #include "asio/detail/throw_error.hpp" 21 | #include "asio/detail/winsock_init.hpp" 22 | #include "asio/ip/host_name.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ip { 28 | 29 | std::string host_name() 30 | { 31 | char name[1024]; 32 | asio::error_code ec; 33 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 34 | { 35 | asio::detail::throw_error(ec); 36 | return std::string(); 37 | } 38 | return std::string(name); 39 | } 40 | 41 | std::string host_name(asio::error_code& ec) 42 | { 43 | char name[1024]; 44 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 45 | return std::string(); 46 | return std::string(name); 47 | } 48 | 49 | } // namespace ip 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_IP_IMPL_HOST_NAME_IPP 55 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/network_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IP_IMPL_NETWORK_V4_HPP 13 | #define ASIO_IP_IMPL_NETWORK_V4_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #if !defined(ASIO_NO_IOSTREAM) 20 | 21 | #include "asio/detail/throw_error.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ip { 27 | 28 | template 29 | std::basic_ostream& operator<<( 30 | std::basic_ostream& os, const network_v4& addr) 31 | { 32 | asio::error_code ec; 33 | std::string s = addr.to_string(ec); 34 | if (ec) 35 | { 36 | if (os.exceptions() & std::basic_ostream::failbit) 37 | asio::detail::throw_error(ec); 38 | else 39 | os.setstate(std::basic_ostream::failbit); 40 | } 41 | else 42 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 43 | os << os.widen(*i); 44 | return os; 45 | } 46 | 47 | } // namespace ip 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // !defined(ASIO_NO_IOSTREAM) 53 | 54 | #endif // ASIO_IP_IMPL_NETWORK_V4_HPP 55 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/impl/network_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v6.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_NETWORK_V6_HPP 12 | #define ASIO_IP_IMPL_NETWORK_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const network_v6& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_NETWORK_V6_HPP 54 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/resolver_query_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/resolver_query_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_RESOLVER_QUERY_BASE_HPP 12 | #define ASIO_IP_RESOLVER_QUERY_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/ip/resolver_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// The resolver_query_base class is used as a base for the 27 | /// basic_resolver_query class templates to provide a common place to define 28 | /// the flag constants. 29 | class resolver_query_base : public resolver_base 30 | { 31 | protected: 32 | /// Protected destructor to prevent deletion through this type. 33 | ~resolver_query_base() 34 | { 35 | } 36 | }; 37 | 38 | } // namespace ip 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_IP_RESOLVER_QUERY_BASE_HPP 44 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ip/unicast.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/unicast.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_UNICAST_HPP 12 | #define ASIO_IP_UNICAST_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include "asio/ip/detail/socket_option.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | namespace unicast { 27 | 28 | /// Socket option for time-to-live associated with outgoing unicast packets. 29 | /** 30 | * Implements the IPPROTO_IP/IP_UNICAST_TTL socket option. 31 | * 32 | * @par Examples 33 | * Setting the option: 34 | * @code 35 | * asio::ip::udp::socket socket(io_context); 36 | * ... 37 | * asio::ip::unicast::hops option(4); 38 | * socket.set_option(option); 39 | * @endcode 40 | * 41 | * @par 42 | * Getting the current option value: 43 | * @code 44 | * asio::ip::udp::socket socket(io_context); 45 | * ... 46 | * asio::ip::unicast::hops option; 47 | * socket.get_option(option); 48 | * int ttl = option.value(); 49 | * @endcode 50 | * 51 | * @par Concepts: 52 | * GettableSocketOption, SettableSocketOption. 53 | */ 54 | #if defined(GENERATING_DOCUMENTATION) 55 | typedef implementation_defined hops; 56 | #else 57 | typedef asio::ip::detail::socket_option::unicast_hops< 58 | ASIO_OS_DEF(IPPROTO_IP), 59 | ASIO_OS_DEF(IP_TTL), 60 | ASIO_OS_DEF(IPPROTO_IPV6), 61 | ASIO_OS_DEF(IPV6_UNICAST_HOPS)> hops; 62 | #endif 63 | 64 | } // namespace unicast 65 | } // namespace ip 66 | } // namespace asio 67 | 68 | #include "asio/detail/pop_options.hpp" 69 | 70 | #endif // ASIO_IP_UNICAST_HPP 71 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/is_executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_executor.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_EXECUTOR_HPP 12 | #define ASIO_IS_EXECUTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/is_executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | /// The is_executor trait detects whether a type T meets the Executor type 26 | /// requirements. 27 | /** 28 | * Class template @c is_executor is a UnaryTypeTrait that is derived from @c 29 | * true_type if the type @c T meets the syntactic requirements for Executor, 30 | * otherwise @c false_type. 31 | */ 32 | template 33 | struct is_executor 34 | #if defined(GENERATING_DOCUMENTATION) 35 | : integral_constant 36 | #else // defined(GENERATING_DOCUMENTATION) 37 | : asio::detail::is_executor 38 | #endif // defined(GENERATING_DOCUMENTATION) 39 | { 40 | }; 41 | 42 | } // namespace asio 43 | 44 | #include "asio/detail/pop_options.hpp" 45 | 46 | #endif // ASIO_IS_EXECUTOR_HPP 47 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/is_read_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_read_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_READ_BUFFERED_HPP 12 | #define ASIO_IS_READ_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_read_stream_fwd.hpp" 20 | #include "asio/buffered_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_read_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_read_buffered_helper(buffered_read_stream* s); 33 | 34 | struct is_read_buffered_big_type { char data[10]; }; 35 | is_read_buffered_big_type is_read_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_read_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of read data. 41 | template 42 | class is_read_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// read data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_READ_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/is_write_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_write_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_WRITE_BUFFERED_HPP 12 | #define ASIO_IS_WRITE_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_stream_fwd.hpp" 20 | #include "asio/buffered_write_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_write_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_write_buffered_helper(buffered_write_stream* s); 33 | 34 | struct is_write_buffered_big_type { char data[10]; }; 35 | is_write_buffered_big_type is_write_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_write_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of written data. 41 | template 42 | class is_write_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// written data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_WRITE_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_HPP 12 | #define ASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ssl/context.hpp" 19 | #include "asio/ssl/context_base.hpp" 20 | #include "asio/ssl/error.hpp" 21 | #include "asio/ssl/rfc2818_verification.hpp" 22 | #include "asio/ssl/stream.hpp" 23 | #include "asio/ssl/stream_base.hpp" 24 | #include "asio/ssl/verify_context.hpp" 25 | #include "asio/ssl/verify_mode.hpp" 26 | 27 | #endif // ASIO_SSL_HPP 28 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/handshake_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/handshake_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 12 | #define ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class handshake_op 29 | { 30 | public: 31 | handshake_op(stream_base::handshake_type type) 32 | : type_(type) 33 | { 34 | } 35 | 36 | engine::want operator()(engine& eng, 37 | asio::error_code& ec, 38 | std::size_t& bytes_transferred) const 39 | { 40 | bytes_transferred = 0; 41 | return eng.handshake(type_, ec); 42 | } 43 | 44 | template 45 | void call_handler(Handler& handler, 46 | const asio::error_code& ec, 47 | const std::size_t&) const 48 | { 49 | handler(ec); 50 | } 51 | 52 | private: 53 | stream_base::handshake_type type_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 63 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/openssl_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/openssl_types.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 12 | #define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_types.hpp" 20 | #include 21 | #include 22 | #if !defined(OPENSSL_NO_ENGINE) 23 | # include 24 | #endif // !defined(OPENSSL_NO_ENGINE) 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 31 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/password_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/password_callback.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include 21 | #include 22 | #include "asio/ssl/context_base.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | class password_callback_base 31 | { 32 | public: 33 | virtual ~password_callback_base() 34 | { 35 | } 36 | 37 | virtual std::string call(std::size_t size, 38 | context_base::password_purpose purpose) = 0; 39 | }; 40 | 41 | template 42 | class password_callback : public password_callback_base 43 | { 44 | public: 45 | explicit password_callback(PasswordCallback callback) 46 | : callback_(callback) 47 | { 48 | } 49 | 50 | virtual std::string call(std::size_t size, 51 | context_base::password_purpose purpose) 52 | { 53 | return callback_(size, purpose); 54 | } 55 | 56 | private: 57 | PasswordCallback callback_; 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace ssl 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP 67 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/read_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/read_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_READ_OP_HPP 12 | #define ASIO_SSL_DETAIL_READ_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/buffer_sequence_adapter.hpp" 21 | #include "asio/ssl/detail/engine.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ssl { 27 | namespace detail { 28 | 29 | template 30 | class read_op 31 | { 32 | public: 33 | read_op(const MutableBufferSequence& buffers) 34 | : buffers_(buffers) 35 | { 36 | } 37 | 38 | engine::want operator()(engine& eng, 39 | asio::error_code& ec, 40 | std::size_t& bytes_transferred) const 41 | { 42 | asio::mutable_buffer buffer = 43 | asio::detail::buffer_sequence_adapter::first(buffers_); 45 | 46 | return eng.read(buffer, ec, bytes_transferred); 47 | } 48 | 49 | template 50 | void call_handler(Handler& handler, 51 | const asio::error_code& ec, 52 | const std::size_t& bytes_transferred) const 53 | { 54 | handler(ec, bytes_transferred); 55 | } 56 | 57 | private: 58 | MutableBufferSequence buffers_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace ssl 63 | } // namespace asio 64 | 65 | #include "asio/detail/pop_options.hpp" 66 | 67 | #endif // ASIO_SSL_DETAIL_READ_OP_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/shutdown_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/shutdown_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 12 | #define ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class shutdown_op 29 | { 30 | public: 31 | engine::want operator()(engine& eng, 32 | asio::error_code& ec, 33 | std::size_t& bytes_transferred) const 34 | { 35 | bytes_transferred = 0; 36 | return eng.shutdown(ec); 37 | } 38 | 39 | template 40 | void call_handler(Handler& handler, 41 | const asio::error_code& ec, 42 | const std::size_t&) const 43 | { 44 | handler(ec); 45 | } 46 | }; 47 | 48 | } // namespace detail 49 | } // namespace ssl 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 55 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/verify_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/verify_callback.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/verify_context.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class verify_callback_base 29 | { 30 | public: 31 | virtual ~verify_callback_base() 32 | { 33 | } 34 | 35 | virtual bool call(bool preverified, verify_context& ctx) = 0; 36 | }; 37 | 38 | template 39 | class verify_callback : public verify_callback_base 40 | { 41 | public: 42 | explicit verify_callback(VerifyCallback callback) 43 | : callback_(callback) 44 | { 45 | } 46 | 47 | virtual bool call(bool preverified, verify_context& ctx) 48 | { 49 | return callback_(preverified, ctx); 50 | } 51 | 52 | private: 53 | VerifyCallback callback_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 63 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/detail/write_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/write_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_WRITE_OP_HPP 12 | #define ASIO_SSL_DETAIL_WRITE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/buffer_sequence_adapter.hpp" 21 | #include "asio/ssl/detail/engine.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ssl { 27 | namespace detail { 28 | 29 | template 30 | class write_op 31 | { 32 | public: 33 | write_op(const ConstBufferSequence& buffers) 34 | : buffers_(buffers) 35 | { 36 | } 37 | 38 | engine::want operator()(engine& eng, 39 | asio::error_code& ec, 40 | std::size_t& bytes_transferred) const 41 | { 42 | asio::const_buffer buffer = 43 | asio::detail::buffer_sequence_adapter::first(buffers_); 45 | 46 | return eng.write(buffer, ec, bytes_transferred); 47 | } 48 | 49 | template 50 | void call_handler(Handler& handler, 51 | const asio::error_code& ec, 52 | const std::size_t& bytes_transferred) const 53 | { 54 | handler(ec, bytes_transferred); 55 | } 56 | 57 | private: 58 | ConstBufferSequence buffers_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace ssl 63 | } // namespace asio 64 | 65 | #include "asio/detail/pop_options.hpp" 66 | 67 | #endif // ASIO_SSL_DETAIL_WRITE_OP_HPP 68 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/rfc2818_verification.ipp" 27 | 28 | #endif // ASIO_SSL_IMPL_SRC_HPP 29 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/stream_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_BASE_HPP 12 | #define ASIO_SSL_STREAM_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace ssl { 24 | 25 | /// The stream_base class is used as a base for the asio::ssl::stream 26 | /// class template so that we have a common place to define various enums. 27 | class stream_base 28 | { 29 | public: 30 | /// Different handshake types. 31 | enum handshake_type 32 | { 33 | /// Perform handshaking as a client. 34 | client, 35 | 36 | /// Perform handshaking as a server. 37 | server 38 | }; 39 | 40 | protected: 41 | /// Protected destructor to prevent deletion through this type. 42 | ~stream_base() 43 | { 44 | } 45 | }; 46 | 47 | } // namespace ssl 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_SSL_STREAM_BASE_HPP 53 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ssl/verify_mode.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/verify_mode.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_VERIFY_MODE_HPP 12 | #define ASIO_SSL_VERIFY_MODE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/ssl/detail/openssl_types.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ssl { 25 | 26 | /// Bitmask type for peer verification. 27 | /** 28 | * Possible values are: 29 | * 30 | * @li @ref verify_none 31 | * @li @ref verify_peer 32 | * @li @ref verify_fail_if_no_peer_cert 33 | * @li @ref verify_client_once 34 | */ 35 | typedef int verify_mode; 36 | 37 | #if defined(GENERATING_DOCUMENTATION) 38 | /// No verification. 39 | const int verify_none = implementation_defined; 40 | 41 | /// Verify the peer. 42 | const int verify_peer = implementation_defined; 43 | 44 | /// Fail verification if the peer has no certificate. Ignored unless 45 | /// @ref verify_peer is set. 46 | const int verify_fail_if_no_peer_cert = implementation_defined; 47 | 48 | /// Do not request client certificate on renegotiation. Ignored unless 49 | /// @ref verify_peer is set. 50 | const int verify_client_once = implementation_defined; 51 | #else 52 | const int verify_none = SSL_VERIFY_NONE; 53 | const int verify_peer = SSL_VERIFY_PEER; 54 | const int verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT; 55 | const int verify_client_once = SSL_VERIFY_CLIENT_ONCE; 56 | #endif 57 | 58 | } // namespace ssl 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // ASIO_SSL_VERIFY_MODE_HPP 64 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/steady_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // steady_timer.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STEADY_TIMER_HPP 12 | #define ASIO_STEADY_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the steady clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer steady_timer; 37 | 38 | } // namespace asio 39 | 40 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 41 | 42 | #endif // ASIO_STEADY_TIMER_HPP 43 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/system_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // system_timer.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SYSTEM_TIMER_HPP 12 | #define ASIO_SYSTEM_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the system clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer system_timer; 37 | 38 | } // namespace asio 39 | 40 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 41 | 42 | #endif // ASIO_SYSTEM_TIMER_HPP 43 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/buffer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/buffer.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_BUFFER_HPP 12 | #define ASIO_TS_BUFFER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/buffer.hpp" 19 | #include "asio/completion_condition.hpp" 20 | #include "asio/read.hpp" 21 | #include "asio/write.hpp" 22 | #include "asio/read_until.hpp" 23 | 24 | #endif // ASIO_TS_BUFFER_HPP 25 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/executor.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_EXECUTOR_HPP 12 | #define ASIO_TS_EXECUTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/handler_type.hpp" 19 | #include "asio/async_result.hpp" 20 | #include "asio/associated_allocator.hpp" 21 | #include "asio/execution_context.hpp" 22 | #include "asio/is_executor.hpp" 23 | #include "asio/associated_executor.hpp" 24 | #include "asio/bind_executor.hpp" 25 | #include "asio/executor_work_guard.hpp" 26 | #include "asio/system_executor.hpp" 27 | #include "asio/executor.hpp" 28 | #include "asio/dispatch.hpp" 29 | #include "asio/post.hpp" 30 | #include "asio/defer.hpp" 31 | #include "asio/strand.hpp" 32 | #include "asio/packaged_task.hpp" 33 | #include "asio/use_future.hpp" 34 | 35 | #endif // ASIO_TS_EXECUTOR_HPP 36 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/internet.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/internet.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_INTERNET_HPP 12 | #define ASIO_TS_INTERNET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ip/address.hpp" 19 | #include "asio/ip/address_v4.hpp" 20 | #include "asio/ip/address_v4_iterator.hpp" 21 | #include "asio/ip/address_v4_range.hpp" 22 | #include "asio/ip/address_v6.hpp" 23 | #include "asio/ip/address_v6_iterator.hpp" 24 | #include "asio/ip/address_v6_range.hpp" 25 | #include "asio/ip/bad_address_cast.hpp" 26 | #include "asio/ip/basic_endpoint.hpp" 27 | #include "asio/ip/basic_resolver_query.hpp" 28 | #include "asio/ip/basic_resolver_entry.hpp" 29 | #include "asio/ip/basic_resolver_iterator.hpp" 30 | #include "asio/ip/basic_resolver.hpp" 31 | #include "asio/ip/host_name.hpp" 32 | #include "asio/ip/network_v4.hpp" 33 | #include "asio/ip/network_v6.hpp" 34 | #include "asio/ip/tcp.hpp" 35 | #include "asio/ip/udp.hpp" 36 | #include "asio/ip/v6_only.hpp" 37 | #include "asio/ip/unicast.hpp" 38 | #include "asio/ip/multicast.hpp" 39 | 40 | #endif // ASIO_TS_INTERNET_HPP 41 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/io_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/io_context.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_IO_CONTEXT_HPP 12 | #define ASIO_TS_IO_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #endif // ASIO_TS_IO_CONTEXT_HPP 21 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/net.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/net.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_NET_HPP 12 | #define ASIO_TS_NET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ts/netfwd.hpp" 19 | #include "asio/ts/executor.hpp" 20 | #include "asio/ts/io_context.hpp" 21 | #include "asio/ts/timer.hpp" 22 | #include "asio/ts/buffer.hpp" 23 | #include "asio/ts/socket.hpp" 24 | #include "asio/ts/internet.hpp" 25 | 26 | #endif // ASIO_TS_NET_HPP 27 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/socket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/socket.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_SOCKET_HPP 12 | #define ASIO_TS_SOCKET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/socket_base.hpp" 19 | #include "asio/basic_socket.hpp" 20 | #include "asio/basic_datagram_socket.hpp" 21 | #include "asio/basic_stream_socket.hpp" 22 | #include "asio/basic_socket_acceptor.hpp" 23 | #include "asio/basic_socket_streambuf.hpp" 24 | #include "asio/basic_socket_iostream.hpp" 25 | #include "asio/connect.hpp" 26 | 27 | #endif // ASIO_TS_SOCKET_HPP 28 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/ts/timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/timer.hpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_TIMER_HPP 12 | #define ASIO_TS_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/chrono.hpp" 19 | 20 | #include "asio/wait_traits.hpp" 21 | #include "asio/basic_waitable_timer.hpp" 22 | #include "asio/system_timer.hpp" 23 | #include "asio/steady_timer.hpp" 24 | #include "asio/high_resolution_timer.hpp" 25 | 26 | #endif // ASIO_TS_TIMER_HPP 27 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 101202 // 1.12.2 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/wait_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // wait_traits.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WAIT_TRAITS_HPP 12 | #define ASIO_WAIT_TRAITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | 22 | /// Wait traits suitable for use with the basic_waitable_timer class template. 23 | template 24 | struct wait_traits 25 | { 26 | /// Convert a clock duration into a duration used for waiting. 27 | /** 28 | * @returns @c d. 29 | */ 30 | static typename Clock::duration to_wait_duration( 31 | const typename Clock::duration& d) 32 | { 33 | return d; 34 | } 35 | 36 | /// Convert a clock duration into a duration used for waiting. 37 | /** 38 | * @returns @c d. 39 | */ 40 | static typename Clock::duration to_wait_duration( 41 | const typename Clock::time_point& t) 42 | { 43 | typename Clock::time_point now = Clock::now(); 44 | if (now + (Clock::duration::max)() < t) 45 | return (Clock::duration::max)(); 46 | if (now + (Clock::duration::min)() > t) 47 | return (Clock::duration::min)(); 48 | return t - now; 49 | } 50 | }; 51 | 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // ASIO_WAIT_TRAITS_HPP 57 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/details/circular_q.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | // cirucal q view of std::vector. 7 | #pragma once 8 | 9 | #include 10 | 11 | namespace spdlog { 12 | namespace details { 13 | template 14 | class circular_q 15 | { 16 | public: 17 | using item_type = T; 18 | 19 | explicit circular_q(size_t max_items) 20 | : max_items_(max_items + 1) // one item is reserved as marker for full q 21 | , v_(max_items_) 22 | { 23 | } 24 | 25 | // push back, overrun (oldest) item if no room left 26 | void push_back(T &&item) 27 | { 28 | v_[tail_] = std::move(item); 29 | tail_ = (tail_ + 1) % max_items_; 30 | 31 | if (tail_ == head_) // overrun last item if full 32 | { 33 | head_ = (head_ + 1) % max_items_; 34 | ++overrun_counter_; 35 | } 36 | } 37 | 38 | // Pop item from front. 39 | // If there are no elements in the container, the behavior is undefined. 40 | void pop_front(T &popped_item) 41 | { 42 | popped_item = std::move(v_[head_]); 43 | head_ = (head_ + 1) % max_items_; 44 | } 45 | 46 | bool empty() 47 | { 48 | return tail_ == head_; 49 | } 50 | 51 | bool full() 52 | { 53 | // head is ahead of the tail by 1 54 | return ((tail_ + 1) % max_items_) == head_; 55 | } 56 | 57 | size_t overrun_counter() const 58 | { 59 | return overrun_counter_; 60 | } 61 | 62 | private: 63 | size_t max_items_; 64 | typename std::vector::size_type head_ = 0; 65 | typename std::vector::size_type tail_ = 0; 66 | 67 | std::vector v_; 68 | 69 | size_t overrun_counter_ = 0; 70 | }; 71 | } // namespace details 72 | } // namespace spdlog 73 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // 3 | // Copyright(c) 2018 Gabi Melman. 4 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 5 | // 6 | 7 | #include "spdlog/details/null_mutex.h" 8 | #include 9 | #include 10 | 11 | #ifdef _WIN32 12 | 13 | #ifndef NOMINMAX 14 | #define NOMINMAX // prevent windows redefining min/max 15 | #endif 16 | 17 | #ifndef WIN32_LEAN_AND_MEAN 18 | #define WIN32_LEAN_AND_MEAN 19 | #endif 20 | 21 | #include 22 | #endif 23 | 24 | namespace spdlog { 25 | namespace details { 26 | struct console_stdout 27 | { 28 | static std::FILE *stream() 29 | { 30 | return stdout; 31 | } 32 | #ifdef _WIN32 33 | static HANDLE handle() 34 | { 35 | return ::GetStdHandle(STD_OUTPUT_HANDLE); 36 | } 37 | #endif 38 | }; 39 | 40 | struct console_stderr 41 | { 42 | static std::FILE *stream() 43 | { 44 | return stderr; 45 | } 46 | #ifdef _WIN32 47 | static HANDLE handle() 48 | { 49 | return ::GetStdHandle(STD_ERROR_HANDLE); 50 | } 51 | #endif 52 | }; 53 | 54 | struct console_mutex 55 | { 56 | using mutex_t = std::mutex; 57 | static mutex_t &mutex() 58 | { 59 | static mutex_t s_mutex; 60 | return s_mutex; 61 | } 62 | }; 63 | 64 | struct console_nullmutex 65 | { 66 | using mutex_t = null_mutex; 67 | static mutex_t &mutex() 68 | { 69 | static mutex_t s_mutex; 70 | return s_mutex; 71 | } 72 | }; 73 | } // namespace details 74 | } // namespace spdlog 75 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/common.h" 9 | #include "spdlog/details/os.h" 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog { 15 | namespace details { 16 | struct log_msg 17 | { 18 | log_msg() = default; 19 | 20 | log_msg(const std::string *loggers_name, level::level_enum lvl) 21 | : logger_name(loggers_name) 22 | , level(lvl) 23 | #ifndef SPDLOG_NO_DATETIME 24 | , time(os::now()) 25 | #endif 26 | 27 | #ifndef SPDLOG_NO_THREAD_ID 28 | , thread_id(os::thread_id()) 29 | #endif 30 | { 31 | } 32 | 33 | log_msg(const log_msg &other) = delete; 34 | log_msg(log_msg &&other) = delete; 35 | log_msg &operator=(log_msg &&other) = delete; 36 | 37 | const std::string *logger_name{nullptr}; 38 | level::level_enum level; 39 | log_clock::time_point time; 40 | size_t thread_id; 41 | fmt::memory_buffer raw; 42 | size_t msg_id; 43 | 44 | // info about wrapping the formatted text with color (updated by pattern_formatter). 45 | mutable size_t color_range_start{0}; 46 | mutable size_t color_range_end{0}; 47 | }; 48 | } // namespace details 49 | } // namespace spdlog 50 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include 9 | // null, no cost dummy "mutex" and dummy "atomic" int 10 | 11 | namespace spdlog { 12 | namespace details { 13 | struct null_mutex 14 | { 15 | void lock() {} 16 | void unlock() {} 17 | bool try_lock() 18 | { 19 | return true; 20 | } 21 | }; 22 | 23 | struct null_atomic_int 24 | { 25 | int value; 26 | null_atomic_int() = default; 27 | 28 | explicit null_atomic_int(int val) 29 | : value(val) 30 | { 31 | } 32 | 33 | int load(std::memory_order) const 34 | { 35 | return value; 36 | } 37 | 38 | void store(int val) 39 | { 40 | value = val; 41 | } 42 | }; 43 | 44 | } // namespace details 45 | } // namespace spdlog 46 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/fmt/bundled/LICENSE.rst: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 - 2016, Victor Zverovich 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2018 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifndef FMT_HEADER_ONLY 15 | #define FMT_HEADER_ONLY 16 | #endif 17 | #ifndef FMT_USE_WINDOWS_H 18 | #define FMT_USE_WINDOWS_H 0 19 | #endif 20 | #include "bundled/core.h" 21 | #include "bundled/format.h" 22 | #else // external fmtlib 23 | #include 24 | #include 25 | #endif 26 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #if !defined(SPDLOG_FMT_EXTERNAL) 11 | #ifndef FMT_HEADER_ONLY 12 | #define FMT_HEADER_ONLY 13 | #endif 14 | #include "bundled/ostream.h" 15 | #include "fmt.h" 16 | #else 17 | #include 18 | #endif 19 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "fmt/fmt.h" 9 | #include "spdlog/details/log_msg.h" 10 | 11 | namespace spdlog { 12 | 13 | class formatter 14 | { 15 | public: 16 | virtual ~formatter() = default; 17 | virtual void format(const details::log_msg &msg, fmt::memory_buffer &dest) = 0; 18 | virtual std::unique_ptr clone() const = 0; 19 | }; 20 | } // namespace spdlog 21 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Alexander Dalshov. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #if defined(_WIN32) 9 | 10 | #include "spdlog/details/null_mutex.h" 11 | #include "spdlog/sinks/base_sink.h" 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | namespace spdlog { 19 | namespace sinks { 20 | /* 21 | * MSVC sink (logging using OutputDebugStringA) 22 | */ 23 | template 24 | class msvc_sink : public base_sink 25 | { 26 | public: 27 | explicit msvc_sink() {} 28 | 29 | protected: 30 | void sink_it_(const details::log_msg &msg) override 31 | { 32 | 33 | fmt::memory_buffer formatted; 34 | sink::formatter_->format(msg, formatted); 35 | OutputDebugStringA(fmt::to_string(formatted).c_str()); 36 | } 37 | 38 | void flush_() override {} 39 | }; 40 | 41 | using msvc_sink_mt = msvc_sink; 42 | using msvc_sink_st = msvc_sink; 43 | 44 | using windebug_sink_mt = msvc_sink_mt; 45 | using windebug_sink_st = msvc_sink_st; 46 | 47 | } // namespace sinks 48 | } // namespace spdlog 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/details/null_mutex.h" 9 | #include "spdlog/sinks/base_sink.h" 10 | 11 | #include 12 | 13 | namespace spdlog { 14 | namespace sinks { 15 | 16 | template 17 | class null_sink : public base_sink 18 | { 19 | protected: 20 | void sink_it_(const details::log_msg &) override {} 21 | void flush_() override {} 22 | }; 23 | 24 | using null_sink_mt = null_sink; 25 | using null_sink_st = null_sink; 26 | 27 | } // namespace sinks 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/details/null_mutex.h" 9 | #include "spdlog/sinks/base_sink.h" 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog { 15 | namespace sinks { 16 | template 17 | class ostream_sink final : public base_sink 18 | { 19 | public: 20 | explicit ostream_sink(std::ostream &os, bool force_flush = false) 21 | : ostream_(os) 22 | , force_flush_(force_flush) 23 | { 24 | } 25 | ostream_sink(const ostream_sink &) = delete; 26 | ostream_sink &operator=(const ostream_sink &) = delete; 27 | 28 | protected: 29 | void sink_it_(const details::log_msg &msg) override 30 | { 31 | fmt::memory_buffer formatted; 32 | sink::formatter_->format(msg, formatted); 33 | ostream_.write(formatted.data(), static_cast(formatted.size())); 34 | if (force_flush_) 35 | { 36 | ostream_.flush(); 37 | } 38 | } 39 | 40 | void flush_() override 41 | { 42 | ostream_.flush(); 43 | } 44 | 45 | std::ostream &ostream_; 46 | bool force_flush_; 47 | }; 48 | 49 | using ostream_sink_mt = ostream_sink; 50 | using ostream_sink_st = ostream_sink; 51 | 52 | } // namespace sinks 53 | } // namespace spdlog 54 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/details/log_msg.h" 9 | #include "spdlog/details/pattern_formatter.h" 10 | #include "spdlog/formatter.h" 11 | 12 | namespace spdlog { 13 | namespace sinks { 14 | class sink 15 | { 16 | public: 17 | sink() 18 | : level_(level::trace) 19 | , formatter_(new pattern_formatter("%+")) 20 | { 21 | } 22 | 23 | explicit sink(std::unique_ptr formatter) 24 | : level_(level::trace) 25 | , formatter_(std::move(formatter)) 26 | { 27 | } 28 | 29 | virtual ~sink() = default; 30 | virtual void log(const details::log_msg &msg) = 0; 31 | virtual void flush() = 0; 32 | virtual void set_pattern(const std::string &pattern) = 0; 33 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 34 | 35 | bool should_log(level::level_enum msg_level) const 36 | { 37 | return msg_level >= level_.load(std::memory_order_relaxed); 38 | } 39 | 40 | void set_level(level::level_enum log_level) 41 | { 42 | level_.store(log_level); 43 | } 44 | 45 | level::level_enum level() const 46 | { 47 | return static_cast(level_.load(std::memory_order_relaxed)); 48 | } 49 | 50 | protected: 51 | // sink log level - default is all 52 | level_t level_; 53 | 54 | // sink formatter - default is full format 55 | std::unique_ptr formatter_; 56 | }; 57 | 58 | } // namespace sinks 59 | } // namespace spdlog 60 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/sinks/stdout_color_sinks.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2018 spdlog 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/spdlog.h" 9 | #ifdef _WIN32 10 | #include "spdlog/sinks/wincolor_sink.h" 11 | #else 12 | #include "spdlog/sinks/ansicolor_sink.h" 13 | #endif 14 | 15 | namespace spdlog { 16 | namespace sinks { 17 | #ifdef _WIN32 18 | using stdout_color_sink_mt = wincolor_stdout_sink_mt; 19 | using stdout_color_sink_st = wincolor_stdout_sink_st; 20 | using stderr_color_sink_mt = wincolor_stderr_sink_mt; 21 | using stderr_color_sink_st = wincolor_stderr_sink_st; 22 | #else 23 | using stdout_color_sink_mt = ansicolor_stdout_sink_mt; 24 | using stdout_color_sink_st = ansicolor_stdout_sink_st; 25 | using stderr_color_sink_mt = ansicolor_stderr_sink_mt; 26 | using stderr_color_sink_st = ansicolor_stderr_sink_st; 27 | #endif 28 | } // namespace sinks 29 | 30 | template 31 | inline std::shared_ptr stdout_color_mt(const std::string &logger_name) 32 | { 33 | return Factory::template create(logger_name); 34 | } 35 | 36 | template 37 | inline std::shared_ptr stdout_color_st(const std::string &logger_name) 38 | { 39 | return Factory::template create(logger_name); 40 | } 41 | 42 | template 43 | inline std::shared_ptr stderr_color_mt(const std::string &logger_name) 44 | { 45 | return Factory::template create(logger_name); 46 | } 47 | 48 | template 49 | inline std::shared_ptr stderr_color_st(const std::string &logger_name) 50 | { 51 | return Factory::template create(logger_name); 52 | } 53 | } // namespace spdlog 54 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #define SPDLOG_VER_MAJOR 1 9 | #define SPDLOG_VER_MINOR 2 10 | #define SPDLOG_VER_PATCH 0 11 | 12 | #define SPDLOG_VERSION (SPDLOG_VER_MAJOR * 10000 + SPDLOG_VER_MINOR * 100 + SPDLOG_VER_PATCH) 13 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/websocketpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | init_target("websocketpp") 2 | final_target () 3 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/websocketpp/client.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Peter Thorson. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * * Neither the name of the WebSocket++ Project nor the 12 | * names of its contributors may be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | #ifndef WEBSOCKETPP_CLIENT_HPP 29 | #define WEBSOCKETPP_CLIENT_HPP 30 | 31 | #include 32 | 33 | #endif //WEBSOCKETPP_CLIENT_HPP 34 | -------------------------------------------------------------------------------- /native-decoder/thirdparty/websocketpp/server.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Peter Thorson. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * * Neither the name of the WebSocket++ Project nor the 12 | * names of its contributors may be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | #ifndef WEBSOCKETPP_SERVER_HPP 29 | #define WEBSOCKETPP_SERVER_HPP 30 | 31 | #include 32 | 33 | #endif //WEBSOCKETPP_SERVER_HPP 34 | -------------------------------------------------------------------------------- /native-decoder/xmake.lua: -------------------------------------------------------------------------------- 1 | add_rules("mode.debug", "mode.release") 2 | 3 | set_languages("cxx17") 4 | set_warnings("all", "warn") 5 | add_includedirs("$(projectdir)", "$(projectdir)/thirdparty") 6 | 7 | add_defines("USE_STANDALONE_ASIO", "ASIO_STANDALONE") 8 | 9 | if is_plat("mingw32") then 10 | add_syslinks("wsock32", "ws2_32", "psapi", "bcrypt", "pthread") 11 | --add_defines("_GLIBCXX_HAS_GTHREADS=1") 12 | add_defines("_WIN32_WINNT=0x0600", "_WEBSOCKETPP_CPP11_STL_", "_WEBSOCKETPP_CPP11_THREAD_") 13 | add_cxxflags("-Wa,-mbig-obj") 14 | else 15 | add_includedirs("/usr/local/include") 16 | add_linkdirs("/usr/local/lib") 17 | add_syslinks("ssl", "crypto", "pthread", "dl") 18 | end 19 | 20 | add_ldflags("-static") 21 | 22 | add_links("avformat", "avcodec", "avutil", "swscale", "swresample", "x264", "x265", "z") 23 | 24 | target("native-decoder") 25 | set_kind("binary") 26 | add_files("cmd/*.cc") 27 | -------------------------------------------------------------------------------- /src/constant.js: -------------------------------------------------------------------------------- 1 | export const { all } = require('promise-polyfill') 2 | 3 | // Player request. 4 | export const kPlayVideoReq = 0 5 | export const kPauseVideoReq = 1 6 | export const kStopVideoReq = 2 7 | 8 | // Player response. 9 | export const kPlayVideoRsp = 0 10 | export const kAudioInfo = 1 11 | export const kVideoInfo = 2 12 | export const kAudioData = 3 13 | export const kVideoData = 4 14 | 15 | // Downloader request. 16 | export const kGetFileInfoReq = 0 17 | export const kDownloadFileReq = 1 18 | export const kCloseDownloaderReq = 2 19 | 20 | // Downloader response. 21 | export const kGetFileInfoRsp = 0 22 | export const kFileData = 1 23 | 24 | // Downloader Protocol. 25 | export const kProtoHttp = 0 26 | export const kProtoWebsocket = 1 27 | 28 | // Decoder request. 29 | export const kInitDecoderReq = 0 30 | export const kUninitDecoderReq = 1 31 | export const kOpenDecoderReq = 2 32 | export const kCloseDecoderReq = 3 33 | export const kFeedDataReq = 4 34 | export const kStartDecodingReq = 5 35 | export const kPauseDecodingReq = 6 36 | export const kSeekToReq = 7 37 | export const KDiscardDataReq = 8 38 | 39 | // Decoder response. 40 | export const kInitDecoderRsp = 0 41 | export const kUninitDecoderRsp = 1 42 | export const kOpenDecoderRsp = 2 43 | export const kCloseDecoderRsp = 3 44 | export const kVideoFrame = 4 45 | export const kAudioFrame = 5 46 | export const kStartDecodingRsp = 6 47 | export const kPauseDecodingRsp = 7 48 | export const kDecodeFinishedEvt = 8 49 | export const kRequestDataEvt = 9 50 | export const kSeekToRsp = 10 51 | -------------------------------------------------------------------------------- /src/logger.js: -------------------------------------------------------------------------------- 1 | class Logger { 2 | constructor(module) { 3 | this.module = module 4 | } 5 | 6 | log(line) { 7 | console.log('[' + this.currentTimeStr() + '][' + this.module + ']' + line) 8 | } 9 | 10 | logError(line) { 11 | console.log( 12 | '[' + this.currentTimeStr() + '][' + this.module + '][ER] ' + line 13 | ) 14 | } 15 | 16 | logInfo(line) { 17 | console.log( 18 | '[' + this.currentTimeStr() + '][' + this.module + '][IF] ' + line 19 | ) 20 | } 21 | 22 | logDebug(line) { 23 | console.log( 24 | '[' + this.currentTimeStr() + '][' + this.module + '][DT] ' + line 25 | ) 26 | } 27 | 28 | currentTimeStr() { 29 | const now = new Date(Date.now()) 30 | const year = now.getFullYear() 31 | const month = now.getMonth() + 1 32 | const day = now.getDate() 33 | const hour = now.getHours() 34 | const min = now.getMinutes() 35 | const sec = now.getSeconds() 36 | const ms = now.getMilliseconds() 37 | return ( 38 | year + 39 | '-' + 40 | month + 41 | '-' + 42 | day + 43 | ' ' + 44 | hour + 45 | ':' + 46 | min + 47 | ':' + 48 | sec + 49 | ':' + 50 | ms 51 | ) 52 | } 53 | } 54 | 55 | export default Logger 56 | --------------------------------------------------------------------------------