{ "name": "libogg", "version": "1.3.6", "summary": "libogg: the Ogg container library, for libvorbis and mkvtoolnix", "category": "library", "license": "BSD-3-Clause", "homepage": "https://xiph.org/ogg/", "source": { "url": "https://downloads.xiph.org/releases/ogg/libogg-1.3.6.tar.xz", "sha256": "5c8253428e181840cd20d41f3ca16557a9cc04bad4a3d04cce84808677fa1061" }, "watch": {"kind": "index", "url": "https://downloads.xiph.org/releases/ogg/", "regex": "libogg-([0-9]+\\.[0-9]+\\.[0-9]+)\\.tar\\.xz", "checksum": "https://downloads.xiph.org/releases/ogg/SHA256SUMS"}, "deps": [], "env_packages": [], "static": true, "nss": false, "check": "check_lib ogg ogg/ogg.h 'ogg_stream_state os, is; ogg_page og; ogg_packet op = {0}, in; ogg_sync_state oy; unsigned char h[] = \"bvs-head\", d[3000]; for (int i = 0; i < 3000; i++) d[i] = (unsigned char) (i * 7); if (ogg_stream_init(&os, 4242) || ogg_stream_init(&is, 4242)) return 1; op.packet = h; op.bytes = 8; op.b_o_s = 1; ogg_stream_packetin(&os, &op); op.packet = d; op.bytes = 3000; op.b_o_s = 0; op.e_o_s = 1; op.granulepos = 3000; op.packetno = 1; ogg_stream_packetin(&os, &op); ogg_sync_init(&oy); int pages = 0; while (ogg_stream_flush(&os, &og)) { char *b = ogg_sync_buffer(&oy, og.header_len + og.body_len); memcpy(b, og.header, og.header_len); memcpy(b + og.header_len, og.body, og.body_len); ogg_sync_wrote(&oy, og.header_len + og.body_len); pages++; } while (ogg_sync_pageout(&oy, &og) == 1) { if (ogg_page_serialno(&og) != 4242) return 2; ogg_stream_pagein(&is, &og); } if (ogg_stream_packetout(&is, &in) != 1 || in.bytes != 8 || memcmp(in.packet, h, 8) || !in.b_o_s) return 3; if (ogg_stream_packetout(&is, &in) != 1 || in.bytes != 3000 || memcmp(in.packet, d, 3000) || in.granulepos != 3000 || !in.e_o_s) return 4; printf(\"libogg: a header packet and a packet of 3000 bytes in %d pages, read back, granule position %lld\\n\", pages, (long long) in.granulepos); return pages < 2' && echo 'libogg 1.3.6: a header packet and a packet of 3000 bytes written into Ogg pages (stream 4242), synced from the bytes and read back unchanged, the data page with its granule position 3000, through check_lib'" }