Move libav, avplay, and qt_avplay to genode-world

Fixes #3103
This commit is contained in:
Norman Feske 2019-01-04 09:24:33 +01:00
parent a15b825418
commit 39085f08fc
69 changed files with 0 additions and 5005 deletions

View File

@ -1 +0,0 @@
INC_DIR += $(call select_from_ports,libav)/include/libav

View File

@ -1,3 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
INC_DIR += $(call select_from_ports,libav)/include/libav/libavcodec

View File

@ -1,3 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += contrib/$(LIBAV)/libavfilter

View File

@ -1,3 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += contrib/$(LIBAV)/libavformat

View File

@ -1,4 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += include/libavresample
INC_DIR += $(call select_from_ports,libav)/include/libav/libavresample

View File

@ -1,3 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += src/lib/libav

View File

@ -1,4 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += include/libavresample
INC_DIR += $(call select_from_ports,libav)/include/libav/libavresample

View File

@ -1,3 +0,0 @@
include $(call select_from_repositories,lib/import/import-av.inc)
REP_INC_DIR += contrib/$(LIBAV)/libswscale

View File

@ -1,24 +0,0 @@
CC_C_OPT += -DHAVE_AV_CONFIG_H
CC_C_OPT += -std=c99 -DPIC
# The third-party sources induce a lot of "assignment discards const
# qualifier" and "passing argument from incompatible pointer type" warnings.
# Therefore, switch off _all_ warnings.
CC_WARN += -w
# Some source files do not build with -O0 due to conflicting register
# allocation and inline assembler constrains. We enforce optimization for these
# files.
CC_OPT_h264_cabac = -O2
CC_OPT_motion_est = -O2
INC_DIR += $(REP_DIR)/src/lib/libav
include $(REP_DIR)/src/lib/libav/config.mak
SRC_C += $(OBJS:.o=.c)
SRC_C += $(OBJS-yes:.o=.c)
LIBS += libc libm
SHARED_LIB = yes

View File

@ -1,14 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-avcodec.mk
LIBAV_PORT_DIR := $(call select_from_ports,libav)
LIBAVCODEC_DIR := $(LIBAV_PORT_DIR)/src/lib/libav/libavcodec
-include $(LIBAVCODEC_DIR)/Makefile
LIBS += zlib
INC_DIR += $(LIBAV_PORT_DIR)/src/lib/libav
vpath % $(LIBAVCODEC_DIR)

View File

@ -1,11 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-avfilter.mk
LIBAVFILTER_DIR = $(call select_from_ports,libav)/src/lib/libav/libavfilter
-include $(LIBAVFILTER_DIR)/Makefile
vpath % $(LIBAVFILTER_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,13 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-avformat.mk
LIBAVFORMAT_DIR = $(call select_from_ports,libav)/src/lib/libav/libavformat
-include $(LIBAVFORMAT_DIR)/Makefile
LIBS += avcodec avutil zlib
vpath % $(LIBAVFORMAT_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,11 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-avresample.mk
LIBAVRESAMPLE_DIR = $(call select_from_ports,libav)/src/lib/libav/libavresample
-include $(LIBAVRESAMPLE_DIR)/Makefile
vpath % $(LIBAVRESAMPLE_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,9 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-avutil.mk
LIBAVUTIL_DIR = $(call select_from_ports,libav)/src/lib/libav/libavutil
-include $(LIBAVUTIL_DIR)/Makefile
vpath % $(LIBAVUTIL_DIR)

View File

@ -1,7 +0,0 @@
CC_C_OPT += -DARCH_ARM=1
include $(REP_DIR)/lib/mk/avcodec.inc
-include $(LIBAVCODEC_DIR)/arm/Makefile
CC_CXX_WARN_STRICT =

View File

@ -1,10 +0,0 @@
# must be defined before the inclusion of the libavutil 'Makefile'
ARCH_ARM=yes
CC_C_OPT += -DARCH_ARM=1
include $(REP_DIR)/lib/mk/avutil.inc
-include $(LIBAVUTIL_DIR)/arm/Makefile
CC_CXX_WARN_STRICT =

View File

@ -1,5 +0,0 @@
CC_C_OPT += -DARCH_X86=1
include $(REP_DIR)/lib/mk/avcodec.inc
-include $(LIBAVCODEC_DIR)/x86/Makefile

View File

@ -1,10 +0,0 @@
# must be defined before the inclusion of the libavutil 'Makefile'
ARCH_X86=yes
CC_C_OPT += -DARCH_X86=1
include $(REP_DIR)/lib/mk/avutil.inc
INC_DIR += $(REP_DIR)/src/lib/libav
-include $(LIBAVUTIL_DIR)/x86/Makefile

View File

@ -1,5 +0,0 @@
CC_C_OPT += -DARCH_X86_32=1
include $(REP_DIR)/lib/mk/spec/x86/avcodec.inc
CC_CXX_WARN_STRICT =

View File

@ -1,5 +0,0 @@
CC_C_OPT += -DARCH_X86_32=1
include $(REP_DIR)/lib/mk/spec/x86/avutil.inc
CC_CXX_WARN_STRICT =

View File

@ -1 +0,0 @@
CC_C_OPT += -DARCH_X86_64=1

View File

@ -1,5 +0,0 @@
include $(REP_DIR)/lib/mk/spec/x86_64/av.inc
include $(REP_DIR)/lib/mk/spec/x86/avcodec.inc
CC_CXX_WARN_STRICT =

View File

@ -1,5 +0,0 @@
include $(REP_DIR)/lib/mk/spec/x86_64/av.inc
include $(REP_DIR)/lib/mk/spec/x86/avutil.inc
CC_CXX_WARN_STRICT =

View File

@ -1,13 +0,0 @@
include $(REP_DIR)/lib/mk/av.inc
include $(REP_DIR)/lib/import/import-swscale.mk
CC_WARN += -Wno-switch
LIBSWSCALE_DIR = $(call select_from_ports,libav)/src/lib/libav/libswscale
-include $(LIBSWSCALE_DIR)/Makefile
vpath % $(LIBSWSCALE_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,151 +0,0 @@
av_bitstream_filter_close T
av_bitstream_filter_filter T
av_bitstream_filter_init T
av_bitstream_filter_next T
av_codec_is_decoder T
av_codec_is_encoder T
av_codec_next T
av_dct_calc T
av_dct_end T
av_dct_init T
av_destruct_packet T
av_dup_packet T
av_dv_codec_profile T
av_dv_frame_profile T
av_fast_padded_malloc T
av_fft_calc T
av_fft_end T
av_fft_init T
av_fft_permute T
av_free_packet T
av_get_audio_frame_duration T
av_get_bits_per_sample T
av_get_codec_tag_string T
av_get_exact_bits_per_sample T
av_get_profile_name T
av_grow_packet T
av_hwaccel_next T
av_imdct_calc T
av_imdct_half T
av_init_packet T
av_lockmgr_register T
av_log_ask_for_sample T
av_log_missing_feature T
av_mdct_calc T
av_mdct_end T
av_mdct_init T
av_new_packet T
av_packet_copy_props T
av_packet_free_side_data T
av_packet_from_data T
av_packet_get_side_data T
av_packet_move_ref T
av_packet_new_side_data T
av_packet_ref T
av_packet_rescale_ts T
av_packet_shrink_side_data T
av_packet_unref T
av_parser_change T
av_parser_close T
av_parser_init T
av_parser_next T
av_parser_parse2 T
av_picture_copy T
av_picture_crop T
av_picture_pad T
av_rdft_calc T
av_rdft_end T
av_rdft_init T
av_register_bitstream_filter T
av_register_codec_parser T
av_register_hwaccel T
av_shrink_packet T
av_xiphlacing T
avcodec_align_dimensions T
avcodec_align_dimensions2 T
avcodec_alloc_context3 T
avcodec_alloc_frame T
avcodec_close T
avcodec_configuration T
avcodec_copy_context T
avcodec_decode_audio4 T
avcodec_decode_subtitle2 T
avcodec_decode_video2 T
avcodec_default_execute T
avcodec_default_execute2 T
avcodec_default_get_buffer T
avcodec_default_get_buffer2 T
avcodec_default_get_format T
avcodec_default_reget_buffer T
avcodec_default_release_buffer T
avcodec_descriptor_get T
avcodec_descriptor_get_by_name T
avcodec_descriptor_next T
avcodec_encode_audio2 T
avcodec_encode_subtitle T
avcodec_encode_video2 T
avcodec_fill_audio_frame T
avcodec_find_best_pix_fmt2 T
avcodec_find_decoder T
avcodec_find_decoder_by_name T
avcodec_find_encoder T
avcodec_find_encoder_by_name T
avcodec_flush_buffers T
avcodec_free_context T
avcodec_free_frame T
avcodec_get_chroma_sub_sample T
avcodec_get_class T
avcodec_get_context_defaults3 T
avcodec_get_edge_width T
avcodec_get_frame_defaults T
avcodec_get_pix_fmt_loss T
avcodec_get_type T
avcodec_is_open T
avcodec_license T
avcodec_open2 T
avcodec_pix_fmt_to_codec_tag T
avcodec_register T
avcodec_register_all T
avcodec_set_dimensions T
avcodec_string T
avcodec_version T
avpicture_alloc T
avpicture_deinterlace T
avpicture_fill T
avpicture_free T
avpicture_get_size T
avpicture_layout T
avpriv_aac_parse_header T
avpriv_ac3_channel_layout_tab R 16
avpriv_ac3_parse_header T
avpriv_align_put_bits T
avpriv_copy_bits T
avpriv_copy_pce_data T
avpriv_dca_sample_rates R 64
avpriv_dirac_parse_sequence_header T
avpriv_find_start_code T
avpriv_flac_is_extradata_valid T
avpriv_flac_parse_streaminfo T
avpriv_lock_avformat T
avpriv_mjpeg_bits_ac_chrominance R 17
avpriv_mjpeg_bits_ac_luminance R 17
avpriv_mjpeg_bits_dc_chrominance R 17
avpriv_mjpeg_bits_dc_luminance R 17
avpriv_mjpeg_val_ac_chrominance R 162
avpriv_mjpeg_val_ac_luminance R 162
avpriv_mjpeg_val_dc R 12
avpriv_mpa_bitrate_tab R 180
avpriv_mpa_decode_header T
avpriv_mpa_freq_tab R 6
avpriv_mpeg4audio_get_config T
avpriv_mpeg4audio_sample_rates R 64
avpriv_mpegaudio_decode_header T
avpriv_put_string T
avpriv_split_xiph_headers T
avpriv_tak_parse_streaminfo T
avpriv_toupper4 T
avpriv_unlock_avformat T
avpriv_vorbis_parse_extradata T
avpriv_vorbis_parse_frame T
avpriv_vorbis_parse_reset T
avsubtitle_free T

View File

@ -1,47 +0,0 @@
av_buffersink_get_frame T
av_buffersink_get_samples T
av_buffersink_read T
av_buffersink_read_samples T
av_buffersrc_add_frame T
av_buffersrc_buffer T
av_buffersrc_write_frame T
av_filter_next T
avfilter_config_links T
avfilter_configuration T
avfilter_copy_buf_props T
avfilter_copy_buffer_ref_props T
avfilter_copy_frame_props T
avfilter_free T
avfilter_get_audio_buffer_ref_from_arrays T
avfilter_get_by_name T
avfilter_get_class T
avfilter_get_video_buffer_ref_from_arrays T
avfilter_graph_add_filter T
avfilter_graph_alloc T
avfilter_graph_alloc_filter T
avfilter_graph_config T
avfilter_graph_create_filter T
avfilter_graph_free T
avfilter_graph_get_filter T
avfilter_graph_parse T
avfilter_graph_parse2 T
avfilter_init_dict T
avfilter_init_filter T
avfilter_init_str T
avfilter_inout_alloc T
avfilter_inout_free T
avfilter_insert_filter T
avfilter_license T
avfilter_link T
avfilter_next T
avfilter_open T
avfilter_pad_count T
avfilter_pad_get_name T
avfilter_pad_get_type T
avfilter_ref_buffer T
avfilter_register T
avfilter_register_all T
avfilter_uninit T
avfilter_unref_buffer T
avfilter_unref_bufferp T
avfilter_version T

View File

@ -1,101 +0,0 @@
av_add_index_entry T
av_append_packet T
av_codec_get_id T
av_codec_get_tag T
av_convert_lang_to T
av_dump_format T
av_filename_number_test T
av_find_best_stream T
av_find_default_stream_index T
av_find_input_format T
av_get_frame_filename T
av_get_packet T
av_guess_codec T
av_guess_format T
av_hex_dump T
av_hex_dump_log T
av_iformat_next T
av_index_search_timestamp T
av_interleaved_write_frame T
av_match_ext T
av_new_program T
av_oformat_next T
av_pkt_dump2 T
av_pkt_dump_log2 T
av_probe_input_buffer T
av_probe_input_format T
av_probe_input_format2 T
av_read_frame T
av_read_pause T
av_read_play T
av_register_all T
av_register_input_format T
av_register_output_format T
av_sdp_create T
av_seek_frame T
av_stream_get_side_data T
av_url_split T
av_write_frame T
av_write_trailer T
avformat_alloc_context T
avformat_close_input T
avformat_configuration T
avformat_find_stream_info T
avformat_free_context T
avformat_get_class T
avformat_get_riff_audio_tags T
avformat_get_riff_video_tags T
avformat_license T
avformat_network_deinit T
avformat_network_init T
avformat_new_stream T
avformat_open_input T
avformat_query_codec T
avformat_seek_file T
avformat_version T
avformat_write_header T
avio_alloc_context T
avio_check T
avio_close T
avio_close_dyn_buf T
avio_closep T
avio_enum_protocols T
avio_flush T
avio_get_str T
avio_get_str16be T
avio_get_str16le T
avio_open T
avio_open2 T
avio_open_dyn_buf T
avio_pause T
avio_printf T
avio_put_str T
avio_put_str16le T
avio_r8 T
avio_rb16 T
avio_rb24 T
avio_rb32 T
avio_rb64 T
avio_read T
avio_rl16 T
avio_rl24 T
avio_rl32 T
avio_rl64 T
avio_seek T
avio_seek_time T
avio_size T
avio_w8 T
avio_wb16 T
avio_wb24 T
avio_wb32 T
avio_wb64 T
avio_wl16 T
avio_wl24 T
avio_wl32 T
avio_wl64 T
avio_write T
avpriv_dv_get_packet T
avpriv_dv_init_demux T
avpriv_dv_produce_packet T
avpriv_new_chapter T
avpriv_set_pts_info T

View File

@ -1,21 +0,0 @@
avresample_alloc_context T
avresample_available T
avresample_build_matrix T
avresample_close T
avresample_config T
avresample_configuration T
avresample_convert T
avresample_convert_frame T
avresample_free T
avresample_get_class T
avresample_get_delay T
avresample_get_matrix T
avresample_get_out_samples T
avresample_is_open T
avresample_license T
avresample_open T
avresample_read T
avresample_set_channel_mapping T
avresample_set_compensation T
avresample_set_matrix T
avresample_version T

View File

@ -1,272 +0,0 @@
av_add_q T
av_adler32_update T
av_aes_alloc T
av_aes_crypt T
av_aes_init T
av_aes_size R 4
av_audio_fifo_alloc T
av_audio_fifo_drain T
av_audio_fifo_free T
av_audio_fifo_read T
av_audio_fifo_realloc T
av_audio_fifo_reset T
av_audio_fifo_size T
av_audio_fifo_space T
av_audio_fifo_write T
av_base64_decode T
av_base64_encode T
av_basename T
av_blowfish_crypt T
av_blowfish_crypt_ecb T
av_blowfish_init T
av_bmg_get T
av_buffer_alloc T
av_buffer_allocz T
av_buffer_create T
av_buffer_default_free T
av_buffer_is_writable T
av_buffer_make_writable T
av_buffer_pool_get T
av_buffer_pool_init T
av_buffer_pool_uninit T
av_buffer_realloc T
av_buffer_ref T
av_buffer_unref T
av_channel_layout_extract_channel T
av_compare_mod T
av_compare_ts T
av_cpu_count T
av_crc T
av_crc_get_table T
av_crc_init T
av_ctz T
av_d2q T
av_d2str T
av_default_item_name T
av_des_crypt T
av_des_init T
av_des_mac T
av_dict_copy T
av_dict_count T
av_dict_free T
av_dict_get T
av_dict_parse_string T
av_dict_set T
av_dirname T
av_display_matrix_flip T
av_display_rotation_get T
av_display_rotation_set T
av_div_q T
av_downmix_info_update_side_data T
av_evaluate_lls T
av_expr_eval T
av_expr_free T
av_expr_parse T
av_expr_parse_and_eval T
av_fast_malloc T
av_fast_realloc T
av_fifo_alloc T
av_fifo_drain T
av_fifo_free T
av_fifo_generic_read T
av_fifo_generic_write T
av_fifo_realloc2 T
av_fifo_reset T
av_fifo_size T
av_fifo_space T
av_file_map T
av_file_unmap T
av_find_info_tag T
av_find_nearest_q_idx T
av_frame_alloc T
av_frame_clone T
av_frame_copy T
av_frame_copy_props T
av_frame_free T
av_frame_get_buffer T
av_frame_get_plane_buffer T
av_frame_get_side_data T
av_frame_is_writable T
av_frame_make_writable T
av_frame_move_ref T
av_frame_new_side_data T
av_frame_ref T
av_frame_remove_side_data T
av_frame_unref T
av_free T
av_freep T
av_gcd T
av_get_bits_per_pixel T
av_get_bytes_per_sample T
av_get_channel_layout T
av_get_channel_layout_channel_index T
av_get_channel_layout_nb_channels T
av_get_channel_layout_string T
av_get_channel_name T
av_get_cpu_flags T
av_get_default_channel_layout T
av_get_packed_sample_fmt T
av_get_picture_type_char T
av_get_pix_fmt T
av_get_pix_fmt_name T
av_get_pix_fmt_string T
av_get_planar_sample_fmt T
av_get_random_seed T
av_get_sample_fmt T
av_get_sample_fmt_name T
av_get_sample_fmt_string T
av_get_time_base_q T
av_get_token T
av_gettime T
av_hmac_alloc T
av_hmac_calc T
av_hmac_final T
av_hmac_free T
av_hmac_init T
av_hmac_update T
av_image_alloc T
av_image_check_sar T
av_image_check_size T
av_image_copy T
av_image_copy_plane T
av_image_fill_linesizes T
av_image_fill_max_pixsteps T
av_image_fill_pointers T
av_image_get_linesize T
av_init_lls T
av_isdigit T
av_isgraph T
av_isspace T
av_isxdigit T
av_lfg_init T
av_log T
av_log2 T
av_log2_16bit T
av_log_default_callback T
av_log_get_level T
av_log_set_callback T
av_log_set_flags T
av_log_set_level T
av_lzo1x_decode T
av_malloc T
av_mallocz T
av_match_name T
av_md5_alloc T
av_md5_final T
av_md5_init T
av_md5_size R 4
av_md5_sum T
av_md5_update T
av_memcpy_backptr T
av_mul_q T
av_nearer_q T
av_opt_child_class_next T
av_opt_child_next T
av_opt_eval_double T
av_opt_eval_flags T
av_opt_eval_float T
av_opt_eval_int T
av_opt_eval_int64 T
av_opt_eval_q T
av_opt_find T
av_opt_find2 T
av_opt_flag_is_set T
av_opt_free T
av_opt_get T
av_opt_get_dict_val T
av_opt_get_double T
av_opt_get_int T
av_opt_get_q T
av_opt_next T
av_opt_set T
av_opt_set_bin T
av_opt_set_defaults T
av_opt_set_dict T
av_opt_set_dict_val T
av_opt_set_double T
av_opt_set_int T
av_opt_set_q T
av_opt_show2 T
av_parse_color T
av_parse_cpu_flags T
av_parse_time T
av_parse_video_rate T
av_parse_video_size T
av_pix_fmt_count_planes T
av_pix_fmt_desc_get T
av_pix_fmt_desc_get_id T
av_pix_fmt_desc_next T
av_pix_fmt_descriptors D 3936
av_pix_fmt_get_chroma_sub_sample T
av_pix_fmt_swap_endianness T
av_rc4_crypt T
av_rc4_init T
av_read_image_line T
av_realloc T
av_realloc_array T
av_reallocp T
av_reallocp_array T
av_reduce T
av_rescale T
av_rescale_q T
av_rescale_q_rnd T
av_rescale_rnd T
av_reverse R 256
av_sample_fmt_is_planar T
av_samples_alloc T
av_samples_copy T
av_samples_fill_arrays T
av_samples_get_buffer_size T
av_samples_set_silence T
av_set_cpu_flags_mask T
av_set_options_string T
av_sha_alloc T
av_sha_final T
av_sha_init T
av_sha_size R 4
av_sha_update T
av_solve_lls T
av_stereo3d_alloc T
av_stereo3d_create_side_data T
av_strcasecmp T
av_strdup T
av_strerror T
av_stristart T
av_stristr T
av_strlcat T
av_strlcatf T
av_strlcpy T
av_strncasecmp T
av_strndup T
av_strnstr T
av_strstart T
av_strtod T
av_sub_q T
av_timegm T
av_tree_destroy T
av_tree_enumerate T
av_tree_find T
av_tree_insert T
av_tree_node_alloc T
av_tree_node_size R 4
av_update_lls T
av_usleep T
av_vlog T
av_write_image_line T
av_xtea_crypt T
av_xtea_init T
avpriv_float_dsp_init T
avpriv_init_lls T
avpriv_open T
avpriv_report_missing_feature T
avpriv_request_sample T
avpriv_scalarproduct_float_c T
avpriv_set_systematic_pal2 T
avpriv_solve_lls T
avutil_configuration T
avutil_license T
avutil_version T
ff_float_dsp_init_x86 T
ff_get_cpu_flags_x86 T
ff_init_lls_x86 T
ff_log2_tab R 256

View File

@ -1,36 +0,0 @@
sws_addVec T
sws_allocVec T
sws_alloc_context T
sws_cloneVec T
sws_context_class D 56
sws_convVec T
sws_convertPalette8ToPacked24 T
sws_convertPalette8ToPacked32 T
sws_format_name T
sws_freeContext T
sws_freeFilter T
sws_freeVec T
sws_getCachedContext T
sws_getCoefficients T
sws_getColorspaceDetails T
sws_getConstVec T
sws_getContext T
sws_getDefaultFilter T
sws_getGaussianVec T
sws_getIdentityVec T
sws_get_class T
sws_init_context T
sws_isSupportedEndiannessConversion T
sws_isSupportedInput T
sws_isSupportedOutput T
sws_normalizeVec T
sws_printVec2 T
sws_rgb2rgb_init T
sws_scale T
sws_scaleVec T
sws_setColorspaceDetails T
sws_shiftVec T
sws_subVec T
swscale_configuration T
swscale_license T
swscale_version T

View File

@ -1 +0,0 @@
453c3394e14101acc88735246488d154380735ed

View File

@ -1,22 +0,0 @@
LICENSE := GPLv3
VERSION := 11.6
DOWNLOADS := libav.archive
URL(libav) := https://www.libav.org/releases/libav-$(VERSION).tar.gz
SHA(libav) := 4df17921e3b87170d54b738f09241833c618d2173415adf398207b43d27e4b28
DIR(libav) := src/lib/libav
SIG(libav) := ${URL(libav)}.asc
PATCHES := src/app/avplay/avplay.patch \
src/lib/libav/avcodec.patch
include_subdirs := . libavcodec libavdevice libavfilter libavutil libavformat libswscale \
libavutil/x86 libavutil/arm libavutil/ppc libavcodec/x86 \
libavcodec/arm libavresample
DIRS := $(addprefix include/libav/,$(include_subdirs))
$(foreach dir,$(include_subdirs),\
$(eval DIR_CONTENT(include/libav/$(dir)) := src/lib/libav/$(dir)/*.h))
DIR_CONTENT(include/libav/libavutil) += src/lib/libav/libavutil/log2_tab.c

View File

@ -1,27 +0,0 @@
MIRROR_FROM_REP_DIR := lib/symbols/avcodec \
lib/symbols/avfilter \
lib/symbols/avformat \
lib/symbols/avresample \
lib/symbols/avutil \
lib/import/import-av.inc \
lib/import/import-avcodec.mk \
lib/import/import-avfilter.mk \
lib/import/import-avformat.mk \
lib/import/import-avresample.mk \
lib/import/import-avutil.mk \
lib/symbols/swscale lib/import/import-swscale.mk
content: $(MIRROR_FROM_REP_DIR) include LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/libav)
include:
mkdir -p $@
cp -r $(PORT_DIR)/include/libav/* $@/
cp -r $(REP_DIR)/src/lib/libav/libavutil $@/
LICENSE:
cp $(PORT_DIR)/src/lib/libav/LICENSE $@

View File

@ -1 +0,0 @@
2018-01-10 6e494745c06e22be75779d1d953d112ee24f2ab6

View File

@ -1,12 +0,0 @@
content: player_play.png \
player_pause.png \
player_stop.png \
volume.png
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt5)
player_play.png player_pause.png player_stop.png:
cp $(PORT_DIR)/src/lib/qt5/qt5/qtbase/examples/network/torrent/icons/$@ $@
volume.png:
cp $(PORT_DIR)/src/lib/qt5/qt5/qtwebkit/Source/WebCore/platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/unmutebutton.png $@

View File

@ -1 +0,0 @@
2018-04-23 e85bededc3e8b4b4a356c2918f890d82806e8e40

View File

@ -1,18 +0,0 @@
content: src/app/avplay lib/import LICENSE
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/libav)
lib/import:
mkdir -p $@
cp $(REP_DIR)/$@/import-av.inc $@
src/app/avplay:
mkdir -p $@
cp $(PORT_DIR)/src/lib/libav/avplay.c \
$(PORT_DIR)/src/lib/libav/cmdutils.* $@
cp $(REP_DIR)/src/app/avplay/* $@
cp $(REP_DIR)/src/lib/libav/config.h $@
rm $@/avplay.patch
LICENSE:
cp $(PORT_DIR)/src/lib/libav/LICENSE $@

View File

@ -1 +0,0 @@
2018-11-28 cfb13f8eb263dafeb04a824118ccb511bf2f0ac5

View File

@ -1,11 +0,0 @@
base
os
timer_session
so
libc
vfs
libav
sdl
audio_out_session
framebuffer_session
input_session

View File

@ -1 +0,0 @@
libav

View File

@ -1,26 +0,0 @@
content: src/lib/libav/target.mk lib/import lib/mk LICENSE
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/libav)
src/lib/libav:
mkdir -p $@
cp -r $(PORT_DIR)/src/lib/libav/* $@
cp -r $(REP_DIR)/src/lib/libav/* $@
src/lib/libav/target.mk: src/lib/libav
echo "LIBS += avfilter avformat avcodec avutil avresample swscale" > $@
lib/import:
mkdir -p $@
cp $(REP_DIR)/lib/import/import-av* $@
cp $(REP_DIR)/lib/import/import-swscale.mk $@
lib/mk:
mkdir -p $@
cp $(addprefix $(REP_DIR)/$@/,av* swscale.mk) $@
for spec in x86 x86_32 x86_64 arm; do \
mkdir -p $@/spec/$$spec; \
cp $(addprefix $(REP_DIR)/$@/spec/$$spec/,av*) $@/spec/$$spec/; done
LICENSE:
cp $(PORT_DIR)/src/lib/libav/LICENSE $@

View File

@ -1 +0,0 @@
2018-11-27 600d2e80cb59323ce411ee5d3e24cbdeb179bd82

View File

@ -1,3 +0,0 @@
so
libc
zlib

View File

@ -1,21 +0,0 @@
MIRROR_FROM_REP_DIR := src/app/qt5/qt_avplay \
src/app/qt5/tmpl/target_defaults.inc \
src/app/qt5/tmpl/target_final.inc
content: $(MIRROR_FROM_REP_DIR) LICENSE
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
MIRROR_FROM_OS := include/init/child_policy.h
content: $(MIRROR_FROM_OS)
$(MIRROR_FROM_OS):
mkdir -p $(dir $@)
cp -r $(GENODE_DIR)/repos/os/$@ $(dir $@)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/qt5)
LICENSE:
cp $(GENODE_DIR)/LICENSE $@

View File

@ -1 +0,0 @@
2018-11-28 67aa9279cfbfb5d2e807070555803489e094ab47

View File

@ -1,19 +0,0 @@
audio_out_session
base
framebuffer_session
input_session
libc
mesa
nitpicker_session
os
qoost
qt5_core
qt5_gui
qt5_qpa_nitpicker
qt5_qjpeg
qt5_qnitpickerviewwidget
qt5_widgets
qt5_xml
stdcxx
timer_session
vfs

View File

@ -1,133 +0,0 @@
#
# Build
#
set build_components {
core init
drivers/timer
drivers/framebuffer drivers/input drivers/audio
app/avplay drivers/acpi
}
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components
build $build_components
#
# Download media file
#
set media_url "ftp://ftp.untergrund.net/users/ae/dhstv/escape-chotro.mp4"
if {![file exists bin/mediafile]} {
puts "downloading media file from $media_url"
catch { exec wget -O bin/mediafile $media_url }
}
#
# Generate config
#
create_boot_directory
set config {
<config>
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<default caps="100"/>
}
append_if [have_spec sdl] config {
<start name="fb_sdl" ld="no">
<resource name="RAM" quantum="4M"/>
<provides>
<service name="Input"/>
<service name="Framebuffer"/>
</provides>
</start>}
append_platform_drv_config
append_if [have_spec framebuffer] config {
<start name="fb_drv">
<resource name="RAM" quantum="8M"/>
<provides><service name="Framebuffer"/></provides>
<config buffered="yes"/>
</start>}
append_if [have_spec ps2] config {
<start name="ps2_drv">
<resource name="RAM" quantum="1M"/>
<provides><service name="Input"/></provides>
</start> }
append config {
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="audio_drv">
<binary name="} [audio_drv_binary] {"/>
<resource name="RAM" quantum="8M"/>
<provides>
<service name="Audio_out"/>
</provides>
</start>
<start name="avplay" caps="200">
<resource name="RAM" quantum="64M"/>
<config>
<arg value="avplay"/>
<arg value="mediafile"/>
<sdl_audio_volume value="100"/>
<vfs>
<dir name="dev"> <log/> </dir>
<rom name="mediafile"/>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log"/>
</config>
<route>
<service name="Platform"> <any-child /> </service>
<service name="Audio_out"> <child name="audio_drv"/> </service>
<any-service> <parent/> <any-child /> </any-service>
</route>
</start>
</config>
}
install_config $config
#
# Boot modules
#
append boot_modules {
core init timer } [audio_drv_binary] { avplay
ld.lib.so libc.lib.so vfs.lib.so vfs.lib.so vfs.lib.so libm.lib.so zlib.lib.so sdl.lib.so
avfilter.lib.so avutil.lib.so avcodec.lib.so avformat.lib.so swscale.lib.so
avresample.lib.so
mediafile
}
lappend_if [have_spec linux] boot_modules fb_sdl
lappend_if [have_spec framebuffer] boot_modules fb_drv
lappend_if [have_spec ps2] boot_modules ps2_drv
append_platform_drv_boot_modules
build_boot_image $boot_modules
append qemu_args " -soundhw es1370"
run_genode_until forever

View File

@ -1,96 +0,0 @@
source ${genode_dir}/repos/libports/run/qt5_common.inc
import_from_depot [depot_user]/raw/qt5_avplay \
[depot_user]/src/avplay \
[depot_user]/src/libav \
[depot_user]/src/qt5_avplay \
[depot_user]/src/qt5_qnitpickerviewwidget \
[depot_user]/src/qt5_widgets \
[depot_user]/src/qt5_xml \
[depot_user]/src/sdl
set feature(Audio_out) 1
#
# Build
#
append build_components [qt5_build_components feature]
build $build_components
#
# Download media file
#
set media_url "ftp://ftp.untergrund.net/users/ae/dhstv/escape-chotro.mp4"
if {![file exists bin/mediafile]} {
puts "downloading media file from $media_url"
catch { exec wget -O bin/mediafile $media_url }
}
#
# Generate config
#
append config {
<config>
<parent-provides>}
append config [qt5_parent_provides feature]
append config {
</parent-provides>
<default caps="100"/>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>}
append config [qt5_start_nodes feature]
append config {
<start name="qt_avplay" caps="400">
<resource name="RAM" quantum="2G"/>
<config>
<vfs>
<dir name="dev">
<log/>
<inline name="rtc">2018-01-01 00:01</inline>
</dir>
<tar name="qt5_dejavusans.tar"/>
<rom name="player_play.png"/>
<rom name="player_pause.png"/>
<rom name="player_stop.png"/>
<rom name="volume.png"/>
</vfs>
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
<mediafile name="mediafile"/>
</config>
<route>
<service name="Nitpicker"> <child name="wm"/> </service>
<service name="Report" label="shape">
<child name="pointer" label="wm -> qt_avplay -> shape"/>
</service>
<service name="ROM" label="egl_drv.lib.so"> <parent label="egl_swrast.lib.so" /> </service>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>
</config>
}
install_config $config
#
# Boot modules
#
append boot_modules [qt5_boot_modules feature]
append boot_modules {
mediafile
}
build_boot_image $boot_modules
append qemu_args " -m 768 -soundhw es1370"
run_genode_until forever

View File

@ -1,40 +0,0 @@
- don't show status messages
- fix audio/video synchronicity (needs more testing)
- override requested video mode with size of the framebuffer
+++ src/lib/libav/avplay.c
@@ -240,7 +240,7 @@
};
static int seek_by_bytes = -1;
static int display_disable;
-static int show_status = 1;
+static int show_status = 0;
static int av_sync_type = AV_SYNC_AUDIO_MASTER;
static int64_t start_time = AV_NOPTS_VALUE;
static int64_t duration = AV_NOPTS_VALUE;
@@ -902,6 +902,16 @@
&& is->height== screen->h && screen->h == h)
return 0;
+ /* override geometry with framebuffer size */
+ SDL_Rect **modes = SDL_ListModes(NULL, flags);
+ if (modes == (SDL_Rect**)0) {
+ fprintf(stderr, "SDL: could not get mode list - exiting\n");
+ return -1;
+ }
+
+ w = modes[0]->w;
+ h = modes[0]->h;
+
#if defined(__APPLE__) && !SDL_VERSION_ATLEAST(1, 2, 14)
/* setting bits_per_pixel = 0 or 32 causes blank video on OS X and older SDL */
screen = SDL_SetVideoMode(w, h, 24, flags);
@@ -962,7 +972,7 @@
av_get_bytes_per_sample(is->sdl_sample_fmt);
}
if (bytes_per_sec)
- pts -= (double)hw_buf_size / bytes_per_sec;
+ pts -= 0.5;
return pts;
}

View File

@ -1,15 +0,0 @@
/*
* \brief Suppress 'not implemented' messages
* \author Christian Prochaska
* \date 2012-04-01
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
void feholdexcept() { }
void feupdateenv() { }

View File

@ -1,23 +0,0 @@
include $(REP_DIR)/lib/import/import-av.inc
TARGET = avplay
SRC_C = avplay.c cmdutils.c libc_dummies.c
LIBS += avfilter avformat avcodec avutil avresample swscale
LIBS += base sdl sdlmain libc libm
CC_WARN += -Wno-parentheses -Wno-switch -Wno-uninitialized \
-Wno-format-zero-length -Wno-pointer-sign
LIBAV_PORT_DIR := $(call select_from_ports,libav)
# version.h
INC_DIR += $(PRG_DIR)
# config.h
INC_DIR += $(REP_DIR)/src/lib/libav
CC_C_OPT += -DLIBAV_VERSION=\"0.8\"
vpath %.c $(LIBAV_PORT_DIR)/src/lib/libav
CC_CXX_WARN_STRICT =

View File

@ -1,18 +0,0 @@
This directory contains a simple Qt-based media player which is actually a
graphical user interface for the SDL-based 'avplay' media player from 'libav'.
It starts 'avplay' as a child and shows its graphical output in a
'QNitpickerViewWidget'. The widgets for controlling the player state send the
according keyboard and mouse input events to 'avplay'.
The 'qt_avplay' player supports the following configuration options:
:'<mediafile name="..."/>:'
name of the media file to play
:'<framebuffer_filter name="..." ram_quota="..."/>':
This node contains the name of a framebuffer filter service to filter the
video output. It may appear multiple times. If specified more than once, it
is possible to build a post-processing pipeline for the video display where
each processing stage is executed by a separate program.

View File

@ -1,189 +0,0 @@
/*
* \brief Avplay slave
* \author Christian Prochaska
* \date 2012-04-05
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _AVPLAY_SLAVE_H_
#define _AVPLAY_SLAVE_H_
/* Qt includes */
#include <QDebug>
#include <QObject>
#include <QDomDocument>
#include <QDomElement>
#include <QDomText>
/* Genode includes */
#include <input/component.h>
#include <timer_session/timer_session.h>
#include <audio_out_session/audio_out_session.h>
#include <os/static_parent_services.h>
#include <os/slave.h>
/* local includes */
#include "framebuffer_service_factory.h"
typedef Genode::Local_service<Input::Session_component> Input_service;
class Avplay_slave : public QObject
{
Q_OBJECT
private:
class Policy
:
private Genode::Static_parent_services<Genode::Cpu_session,
Genode::Log_session,
Genode::Pd_session,
Genode::Rom_session,
Timer::Session,
Audio_out::Session>,
public Genode::Slave::Policy
{
private:
Input_service &_input_service;
Framebuffer_service_factory &_framebuffer_service_factory;
const char *_mediafile;
int _sdl_audio_volume;
QByteArray _config_byte_array;
const char *_config()
{
QDomDocument config_doc;
QDomElement config_node = config_doc.createElement("config");
config_doc.appendChild(config_node);
QDomElement arg0_node = config_doc.createElement("arg");
arg0_node.setAttribute("value", "avplay");
config_node.appendChild(arg0_node);
QDomElement arg1_node = config_doc.createElement("arg");
arg1_node.setAttribute("value", _mediafile);
config_node.appendChild(arg1_node);
/*
* Configure libc of avplay to direct output to LOG and to obtain
* the mediafile from ROM.
*/
QDomElement vfs_node = config_doc.createElement("vfs");
QDomElement vfs_dev_node = config_doc.createElement("dir");
vfs_dev_node.setAttribute("name", "dev");
QDomElement vfs_dev_log_node = config_doc.createElement("log");
vfs_dev_node.appendChild(vfs_dev_log_node);
QDomElement vfs_dev_rtc_node = config_doc.createElement("inline");
vfs_dev_rtc_node.setAttribute("name", "rtc");
QDomText vfs_dev_rtc_node_text = config_doc.createTextNode("2018-01-01 00:01");
vfs_dev_rtc_node.appendChild(vfs_dev_rtc_node_text);
vfs_dev_node.appendChild(vfs_dev_rtc_node);
vfs_node.appendChild(vfs_dev_node);
QDomElement vfs_mediafile_node = config_doc.createElement("rom");
vfs_mediafile_node.setAttribute("name", "mediafile");
vfs_node.appendChild(vfs_mediafile_node);
config_node.appendChild(vfs_node);
QDomElement libc_node = config_doc.createElement("libc");
libc_node.setAttribute("stdout", "/dev/log");
libc_node.setAttribute("stderr", "/dev/log");
libc_node.setAttribute("rtc", "/dev/rtc");
config_node.appendChild(libc_node);
QDomElement sdl_audio_volume_node = config_doc.createElement("sdl_audio_volume");
sdl_audio_volume_node.setAttribute("value", QString::number(_sdl_audio_volume));
config_node.appendChild(sdl_audio_volume_node);
_config_byte_array = config_doc.toByteArray(4);
return _config_byte_array.constData();
}
static Genode::Cap_quota _caps() { return { 150 }; }
static Genode::Ram_quota _ram_quota() { return { 32*1024*1024 }; }
static Name _name() { return "avplay"; }
public:
Policy(Genode::Rpc_entrypoint &entrypoint,
Genode::Region_map &rm,
Genode::Pd_session &ref_pd,
Genode::Pd_session_capability ref_pd_cap,
Input_service &input_service,
Framebuffer_service_factory &framebuffer_service_factory,
char const *mediafile)
:
Genode::Slave::Policy(_name(), _name(), *this, entrypoint,
rm, ref_pd, ref_pd_cap, _caps(),
_ram_quota()),
_input_service(input_service),
_framebuffer_service_factory(framebuffer_service_factory),
_mediafile(mediafile),
_sdl_audio_volume(100)
{
configure(_config());
}
Genode::Service &resolve_session_request(Genode::Service::Name const &service_name,
Genode::Session_state::Args const &args) override
{
if (service_name == "Input")
return _input_service;
if (service_name == "Framebuffer")
return _framebuffer_service_factory.create(args);
return Genode::Slave::Policy::resolve_session_request(service_name, args);
}
void volume_changed(int value)
{
_sdl_audio_volume = value;
configure(_config());
}
};
Genode::size_t const _ep_stack_size = 4*1024*sizeof(Genode::addr_t);
Genode::Rpc_entrypoint _ep;
Policy _policy;
Genode::Child _child;
public:
/**
* Constructor
*/
Avplay_slave(Genode::Region_map &rm,
Genode::Pd_session &ref_pd,
Genode::Pd_session_capability ref_pd_cap,
Input_service &input_service,
Framebuffer_service_factory &framebuffer_service_factory,
char const *mediafile)
:
_ep(&ref_pd, _ep_stack_size, "avplay_ep"),
_policy(_ep, rm, ref_pd, ref_pd_cap, input_service,
framebuffer_service_factory, mediafile),
_child(rm, _ep, _policy)
{ }
public Q_SLOTS:
void volume_changed(int value)
{
_policy.volume_changed(value);
}
};
#endif /* _AVPLAY_SLAVE_H_ */

View File

@ -1,74 +0,0 @@
/*
* \brief Control bar
* \author Christian Prochaska
* \date 2012-03-30
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* Genode includes */
#include <input/keycodes.h>
/* Qoost includes */
#include <qoost/style.h>
/* local includes */
#include "main_window.h"
void Control_bar::_rewind()
{
/* mouse click at horizontal position 0 */
_input.submit(Input::Press {Input::BTN_LEFT});
_input.submit(Input::Release{Input::BTN_LEFT});
}
void Control_bar::_pause_resume()
{
_input.submit(Input::Press {Input::KEY_SPACE});
_input.submit(Input::Release{Input::KEY_SPACE});
_playing = !_playing;
if (_playing)
update_style_id(_play_pause_button, "play");
else
update_style_id(_play_pause_button, "pause");
}
void Control_bar::_stop()
{
if (_playing)
_pause_resume();
_rewind();
}
Control_bar::Control_bar(Input::Session_component &input)
:
_input(input), _playing(true)
{
update_style_id(_play_pause_button, "play");
_volume_slider->setOrientation(Qt::Horizontal);
_volume_slider->setRange(0, 100);
_volume_slider->setTickInterval(10);
_volume_slider->setValue(100);
_layout->addWidget(_play_pause_button);
_layout->addWidget(_stop_button);
_layout->addStretch();
_layout->addWidget(_volume_label);
_layout->addWidget(_volume_slider);
connect(_play_pause_button, SIGNAL(clicked()), this, SLOT(_pause_resume()));
connect(_stop_button, SIGNAL(clicked()), this, SLOT(_stop()));
connect(_volume_slider, SIGNAL(valueChanged(int)), this, SIGNAL(volume_changed(int)));
}

View File

@ -1,64 +0,0 @@
/*
* \brief Control bar
* \author Christian Prochaska
* \date 2012-03-30
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _CONTROL_BAR_H_
#define _CONTROL_BAR_H_
/* Qt includes */
#include <QtGui>
#include <QtWidgets>
/* Qoost includes */
#include <qoost/compound_widget.h>
#include <qoost/qmember.h>
/* Genode includes */
#include <input/component.h>
struct Play_pause_button : QPushButton { Q_OBJECT };
struct Stop_button : QPushButton { Q_OBJECT };
struct Volume_label : QLabel { Q_OBJECT };
struct Volume_slider : QSlider { Q_OBJECT };
class Control_bar : public Compound_widget<QWidget, QHBoxLayout>
{
Q_OBJECT
private:
Input::Session_component &_input;
QMember<Play_pause_button> _play_pause_button;
QMember<Stop_button> _stop_button;
QMember<Volume_label> _volume_label;
QMember<Volume_slider> _volume_slider;
bool _playing;
void _rewind();
private Q_SLOTS:
void _pause_resume();
void _stop();
public:
Control_bar(Input::Session_component &input);
Q_SIGNALS:
void volume_changed(int value);
};
#endif /* _CONTROL_BAR_H_ */

View File

@ -1,99 +0,0 @@
/*
* \brief Filter framebuffer policy
* \author Christian Prochaska
* \date 2012-04-11
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _FILTER_FRAMEBUFFER_SLAVE_H_
#define _FILTER_FRAMEBUFFER_SLAVE_H_
/* Genode includes */
#include <base/service.h>
#include <os/static_parent_services.h>
#include <os/slave.h>
#include <timer_session/timer_session.h>
/* local includes */
#include "framebuffer_service_factory.h"
class Filter_framebuffer_slave
{
private:
class Policy
:
private Genode::Static_parent_services<Genode::Cpu_session,
Genode::Log_session,
Genode::Pd_session,
Genode::Rom_session,
Timer::Session>,
public Genode::Slave::Policy
{
private:
Framebuffer_service_factory &_framebuffer_service_factory;
public:
Policy(Genode::Rpc_entrypoint &entrypoint,
Genode::Region_map &rm,
Genode::Pd_session &ref_pd,
Genode::Pd_session_capability ref_pd_cap,
Name const &name,
size_t caps,
size_t ram_quota,
Framebuffer_service_factory &framebuffer_service_factory)
:
Genode::Slave::Policy(name, name, *this, entrypoint, rm,
ref_pd, ref_pd_cap,
Genode::Cap_quota{caps},
Genode::Ram_quota{ram_quota}),
_framebuffer_service_factory(framebuffer_service_factory)
{ }
Genode::Service &resolve_session_request(Genode::Service::Name const &service_name,
Genode::Session_state::Args const &args) override
{
if (service_name == "Framebuffer")
return _framebuffer_service_factory.create(args);
return Genode::Slave::Policy::resolve_session_request(service_name, args);
}
};
Genode::size_t const _ep_stack_size = 2*1024*sizeof(Genode::addr_t);
Genode::Rpc_entrypoint _ep;
Policy _policy;
Genode::Child _child;
public:
/**
* Constructor
*/
Filter_framebuffer_slave(Genode::Region_map &rm,
Genode::Pd_session &ref_pd,
Genode::Pd_session_capability ref_pd_cap,
Genode::Slave::Policy::Name const &name,
size_t caps,
size_t ram_quota,
Framebuffer_service_factory &framebuffer_service_factory)
:
_ep(&ref_pd, _ep_stack_size, "filter_framebuffer_ep"),
_policy(_ep, rm, ref_pd, ref_pd_cap, name, caps, ram_quota,
framebuffer_service_factory),
_child(rm, _ep, _policy)
{ }
Genode::Slave::Policy &policy() { return _policy; }
};
#endif /* _FILTER_FRAMEBUFFER_SLAVE_H_ */

View File

@ -1,141 +0,0 @@
/*
* \brief Framebuffer service factory
* \author Christian Prochaska
* \date 2016-11-24
*/
/*
* Copyright (C) 2016-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _FRAMEBUFFER_SERVICE_FACTORY_H_
#define _FRAMEBUFFER_SERVICE_FACTORY_H_
/* Genode includes */
#include <base/service.h>
#include <os/slave.h>
#include <framebuffer_session/connection.h>
#include <os/single_session_service.h>
#include <nitpicker_session/connection.h>
/* Qt includes */
#include <qnitpickerplatformwindow.h>
#include <qnitpickerviewwidget/qnitpickerviewwidget.h>
struct Framebuffer_service_factory
{
virtual Genode::Service &create(Genode::Session_state::Args const &args) = 0;
typedef Genode::Single_session_service<Framebuffer::Session> Session_service;
};
class Nitpicker_framebuffer_service_factory : public Framebuffer_service_factory
{
private:
Nitpicker::Connection _nitpicker;
Session_service _service;
QNitpickerViewWidget &_nitpicker_view_widget;
int _max_width;
int _max_height;
int _limited_size(int requested_size, int max_size)
{
if (requested_size == 0)
return max_size;
else
return (max_size > 0) ? Genode::min(requested_size, max_size) : requested_size;
}
static inline long _session_arg(Genode::Session_state::Args const &args, const char *key)
{
return Genode::Arg_string::find_arg(args.string(), key).long_value(0);
}
public:
Nitpicker_framebuffer_service_factory(Genode::Env &env,
QNitpickerViewWidget &nitpicker_view_widget,
int max_width = 0,
int max_height = 0)
: _nitpicker(env),
_service(_nitpicker.framebuffer_session()),
_nitpicker_view_widget(nitpicker_view_widget),
_max_width(max_width), _max_height(max_height)
{ }
Genode::Service &create(Genode::Session_state::Args const &args)
{
Framebuffer::Mode const
mode(_limited_size(_session_arg(args, "fb_width"), _max_width),
_limited_size(_session_arg(args, "fb_height"), _max_height),
_nitpicker.mode().format());
_nitpicker.buffer(mode, false);
QNitpickerPlatformWindow *platform_window =
dynamic_cast<QNitpickerPlatformWindow*>(_nitpicker_view_widget
.window()->windowHandle()->handle());
Nitpicker::Session::View_handle parent_view_handle =
_nitpicker.view_handle(platform_window->view_cap());
Nitpicker::Session::View_handle nitpicker_view_handle =
_nitpicker.create_view(parent_view_handle);
_nitpicker.release_view_handle(parent_view_handle);
Framebuffer::Session_client framebuffer(_nitpicker.framebuffer_session());
Framebuffer::Mode framebuffer_mode = framebuffer.mode();
_nitpicker_view_widget.setNitpickerView(&_nitpicker,
nitpicker_view_handle,
0, 0,
framebuffer_mode.width(),
framebuffer_mode.height());
return _service.service();
}
};
class Filter_framebuffer_service_factory : public Framebuffer_service_factory
{
private:
typedef Genode::Slave::Connection<Framebuffer::Connection> Framebuffer_connection;
Genode::Slave::Policy &_policy;
Framebuffer_connection *_slave_connection { nullptr };
Session_service *_service { nullptr };
public:
Filter_framebuffer_service_factory(Genode::Slave::Policy &policy)
: _policy(policy)
{ }
~Filter_framebuffer_service_factory()
{
delete _service;
delete _slave_connection;
}
Genode::Service &create(Genode::Session_state::Args const &args)
{
_slave_connection = new Framebuffer_connection(_policy, args);
_service = new Session_service(*_slave_connection);
return _service->service();
}
};
#endif /* _FRAMEBUFFER_SERVICE_FACTORY_H_ */

View File

@ -1,59 +0,0 @@
/*
* \brief Simple Qt interface for 'avplay' media player
* \author Christian Prochaska
* \date 2012-03-21
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* Qt includes */
#include <QApplication>
/* qt_avplay includes */
#include "main_window.h"
/* Genode includes */
#include <libc/component.h>
static inline void load_stylesheet()
{
QFile file(":style.qss");
if (!file.open(QFile::ReadOnly)) {
qWarning() << "Warning:" << file.errorString()
<< "opening file" << file.fileName();
return;
}
qApp->setStyleSheet(QLatin1String(file.readAll()));
}
extern void initialize_qt_core(Genode::Env &);
extern void initialize_qt_gui(Genode::Env &);
void Libc::Component::construct(Libc::Env &env)
{
Libc::with_libc([&] {
initialize_qt_core(env);
initialize_qt_gui(env);
int argc = 1;
char const *argv[] = { "qt_avplay", 0 };
QApplication app(argc, (char**)argv);
load_stylesheet();
QMember<Main_window> main_window(env);
main_window->show();
app.exec();
});
}

View File

@ -1,98 +0,0 @@
/*
* \brief Main window of the media player
* \author Christian Prochaska
* \date 2012-03-29
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* qt_avplay includes */
#include "filter_framebuffer_slave.h"
#include "main_window.h"
using namespace Genode;
struct Framebuffer_filter
{
enum { MAX_FILTER_NAME_SIZE = 32 };
char name[MAX_FILTER_NAME_SIZE];
size_t caps;
Genode::Number_of_bytes ram_quota;
Filter_framebuffer_slave *slave;
};
Main_window::Main_window(Genode::Env &env)
:
_env(env),
_mediafile_name(env),
_control_bar(_input_session_component)
{
_input_session_component.event_queue().enabled(true);
_ep.manage(&_input_session_component);
/* add widgets to layout */
_layout->addWidget(_avplay_widget);
_layout->addWidget(_control_bar);
/*
* The main window must be visible before avplay or a framebuffer filter
* requests the framebuffer session which goes to Nitpicker, because the
* parent view of the new Nitpicker view is part of the
* QNitpickerPlatformWindow object, which is created when the main window
* becomes visible.
*/
show();
/* find out which filtering framebuffer services to start and sort them in reverse order */
static QList<Framebuffer_filter*> framebuffer_filters;
try {
Genode::Attached_rom_dataspace config(_env, "config");
Xml_node node = config.xml().sub_node("framebuffer_filter");
for (; ; node = node.next("framebuffer_filter")) {
Framebuffer_filter *framebuffer_filter = new Framebuffer_filter;
node.attribute("name").value(framebuffer_filter->name, sizeof(framebuffer_filter->name));
node.attribute("caps").value(&framebuffer_filter->caps);
node.attribute("ram_quota").value(&framebuffer_filter->ram_quota);
qDebug() << "filter:" << framebuffer_filter->name << "," << framebuffer_filter->ram_quota;
framebuffer_filters.prepend(framebuffer_filter);
}
} catch (Xml_node::Nonexistent_sub_node) { }
Framebuffer_service_factory *framebuffer_service_factory =
&_nitpicker_framebuffer_service_factory;
/* start the filtering framebuffer services */
Q_FOREACH(Framebuffer_filter *framebuffer_filter, framebuffer_filters) {
framebuffer_filter->slave = new Filter_framebuffer_slave(_env.rm(),
_env.pd(),
_env.pd_session_cap(),
framebuffer_filter->name,
framebuffer_filter->caps,
framebuffer_filter->ram_quota,
*framebuffer_service_factory);
framebuffer_service_factory =
new Filter_framebuffer_service_factory(framebuffer_filter->slave->policy());
}
/* start avplay */
Avplay_slave *avplay_slave = new Avplay_slave(_env.rm(),
_env.pd(), _env.pd_session_cap(),
_input_service,
*framebuffer_service_factory,
_mediafile_name.buf);
connect(_control_bar, SIGNAL(volume_changed(int)), avplay_slave, SLOT(volume_changed(int)));
}

View File

@ -1,85 +0,0 @@
/*
* \brief Main window of the media player
* \author Christian Prochaska
* \date 2012-03-29
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _MAIN_WINDOW_H_
#define _MAIN_WINDOW_H_
/* Qt includes */
#include <QVBoxLayout>
#include <QWidget>
#include <qnitpickerviewwidget/qnitpickerviewwidget.h>
/* Qoost includes */
#include <qoost/compound_widget.h>
#include <qoost/qmember.h>
/* Genode includes */
#include <base/attached_rom_dataspace.h>
#include <base/service.h>
#include <input/root.h>
#include <rom_session/connection.h>
/* local includes */
#include "avplay_slave.h"
#include "control_bar.h"
#include "framebuffer_service_factory.h"
class Main_window : public Compound_widget<QWidget, QVBoxLayout>
{
Q_OBJECT
private:
struct Mediafile_name
{
/* get the name of the media file from the config file */
enum { MAX_LEN_MEDIAFILE_NAME = 256 };
char buf[MAX_LEN_MEDIAFILE_NAME];
Mediafile_name(Genode::Env &env)
{
Genode::strncpy(buf, "mediafile", sizeof(buf));
try {
Genode::Attached_rom_dataspace config(env, "config");
config.xml().sub_node("mediafile")
.attribute("name").value(buf, sizeof(buf));
} catch(...) {
Genode::warning("no <mediafile> config node found, using \"mediafile\"");
}
}
};
Genode::Env &_env;
Mediafile_name _mediafile_name;
QMember<QNitpickerViewWidget> _avplay_widget;
QMember<Control_bar> _control_bar;
Genode::size_t const _ep_stack_size { 2*sizeof(Genode::addr_t)*1024 };
Genode::Rpc_entrypoint _ep { &_env.pd(), _ep_stack_size, "avplay_ep" };
Nitpicker_framebuffer_service_factory _nitpicker_framebuffer_service_factory { _env,
*_avplay_widget,
640, 480 };
Input::Session_component _input_session_component { _env, _env.ram() };
Input_service::Single_session_factory _input_factory { _input_session_component };
Input_service _input_service { _input_factory };
public:
Main_window(Genode::Env &env);
};
#endif /* _MAIN_WINDOW_H_ */

View File

@ -1,10 +0,0 @@
TEMPLATE = app
TARGET = qt_avplay
QT = core gui widgets xml
HEADERS = avplay_slave.h \
control_bar.h \
main_window.h
SOURCES = control_bar.cpp \
main.cpp \
main_window.cpp
RESOURCES = style.qrc

View File

@ -1,6 +0,0 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/">
<file>style.qss</file>
</qresource>
</RCC>

View File

@ -1,32 +0,0 @@
Main_window {
max-width: 640px;
max-height: 512px;
}
Play_pause_button, Stop_button {
width: 32px;
height: 32px;
}
Play_pause_button#play {
border-image: url(/player_pause.png);
}
Play_pause_button#pause {
border-image: url(/player_play.png);
}
Stop_button {
border-image: url(/player_stop.png);
}
Volume_label {
border-image: url(/volume.png);
min-width: 32px;
max-width: 32px;
min-height: 32px;
max-height: 32px;
margin-right: 5px;
}

View File

@ -1,7 +0,0 @@
include $(call select_from_repositories,src/app/qt5/tmpl/target_defaults.inc)
include $(call select_from_repositories,src/app/qt5/tmpl/target_final.inc)
LIBS += qt5_qnitpickerviewwidget qoost
CC_CXX_WARN_STRICT =

View File

@ -1,23 +0,0 @@
- avoid relocation errors by hiding symbols
+++ src/lib/libav/libavcodec/cabac.c
@@ -31,7 +31,7 @@
#include "cabac.h"
#include "cabac_functions.h"
-uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63] = {
+uint8_t __attribute__((visibility("hidden"))) ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63]= {
9,8,7,7,6,6,6,6,5,5,5,5,5,5,5,5,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
+++ src/lib/libav/libavcodec/x86/constants.c
@@ -37,7 +37,7 @@ DECLARE_ALIGNED(16, const xmm_reg, ff_pw_17) = { 0x0011001100110011ULL, 0x001
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_18) = { 0x0012001200120012ULL, 0x0012001200120012ULL };
DECLARE_ALIGNED(8, const uint64_t, ff_pw_20) = 0x0014001400140014ULL;
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_32) = { 0x0020002000200020ULL, 0x0020002000200020ULL };
-DECLARE_ALIGNED(8, const uint64_t, ff_pw_42) = 0x002A002A002A002AULL;
+DECLARE_ALIGNED(8, const uint64_t __attribute__((visibility("hidden"))), ff_pw_42) = 0x002A002A002A002AULL;
DECLARE_ALIGNED(8, const uint64_t, ff_pw_53) = 0x0035003500350035ULL;
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_64) = { 0x0040004000400040ULL, 0x0040004000400040ULL };
DECLARE_ALIGNED(8, const uint64_t, ff_pw_96) = 0x0060006000600060ULL;
--

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
#include <stddef.h>
#define AV_HAVE_BIGENDIAN 0
#define AV_HAVE_FAST_UNALIGNED 1
#endif /* AVUTIL_AVCONFIG_H */