Compare commits
19 Commits
85d1832a0c
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| f8f82bc653 | |||
| 8bc6f68b3b | |||
| fa9190b0e5 | |||
| 7cb6dbc3e6 | |||
| 59cb6fb6c1 | |||
| 3d85440aac | |||
| 2adf75973a | |||
| 7fa5294e02 | |||
| 91a4a2079b | |||
| 2af0361ac5 | |||
| 7e1894984c | |||
| 53a7ed7890 | |||
| 6305d0b096 | |||
| ae9571d270 | |||
| ba39a0e5eb | |||
| 4ec664c8db | |||
| 07af9deb6a | |||
| 6dc54f9ef6 | |||
| 6ac2b1fde0 |
@@ -8,6 +8,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
option(TRACY_ENABLE "Enable Tracy profiling" OFF)
|
||||
|
||||
# glm
|
||||
add_subdirectory(libs/glm)
|
||||
target_compile_definitions(glm PUBLIC GLM_FORCE_SWIZZLE GLM_FORCE_XYZW_ONLY)
|
||||
|
||||
# SDL
|
||||
set(SDL_SHARED OFF)
|
||||
set(SDL_STATIC ON)
|
||||
@@ -18,7 +22,10 @@ add_subdirectory(libs/wgpu)
|
||||
|
||||
# SDL3_mixer
|
||||
set(BUILD_SHARED_LIBS ${SDL_SHARED})
|
||||
set(SDLMIXER_DEPS_SHARED OFF)
|
||||
set(SDLMIXER_VENDORED ON)
|
||||
set(SDLMIXER_OPUS ON)
|
||||
set(SDLMIXER_VORBIS_VORBISFILE OFF)
|
||||
set(SDLMIXER_AIFF OFF)
|
||||
set(SDLMIXER_WAVE OFF)
|
||||
set(SDLMIXER_VOC OFF)
|
||||
@@ -57,15 +64,14 @@ option(TRACY_ONLY_LOCALHOST "" ON)
|
||||
add_subdirectory(libs/tracy)
|
||||
|
||||
add_executable(mikemon
|
||||
src/log.cpp
|
||||
src/smol-atlas.cpp
|
||||
src/math_graphics.cpp
|
||||
src/change_directory.c
|
||||
src/shaders/shaders.c
|
||||
src/main.cpp
|
||||
)
|
||||
target_link_libraries(mikemon
|
||||
PRIVATE
|
||||
glm
|
||||
SDL3::SDL3
|
||||
SDL3_mixer::SDL3_mixer
|
||||
stb_image
|
||||
|
||||
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 324 B |
|
After Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 449 B |
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
|
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 191 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 422 B |
|
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 561 B |
@@ -0,0 +1,50 @@
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
ChangeLog
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.h.in~
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
libogg.spec
|
||||
libtool
|
||||
ltmain.sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
missing
|
||||
mkinstalldirs
|
||||
ogg.pc
|
||||
ogg-uninstalled.pc
|
||||
stamp-h1
|
||||
.project
|
||||
include/ogg/config_types.h
|
||||
src/*.o
|
||||
src/*.lo
|
||||
src/lib*.la
|
||||
src/.libs
|
||||
src/.deps
|
||||
src/test_*
|
||||
macosx/build/
|
||||
/m4
|
||||
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
CMakeSettings.json
|
||||
|
||||
*[Bb]uild*/
|
||||
|
||||
.vs/
|
||||
.vscode/
|
||||
@@ -0,0 +1,26 @@
|
||||
default:
|
||||
tags:
|
||||
- docker
|
||||
# Image from https://hub.docker.com/_/gcc/ based on Debian.
|
||||
image: gcc:9
|
||||
|
||||
autoconf:
|
||||
stage: build
|
||||
before_script:
|
||||
- apt-get update &&
|
||||
apt-get install -y zip cmake
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- ./configure
|
||||
- make
|
||||
- make distcheck
|
||||
|
||||
cmake:
|
||||
stage: build
|
||||
before_script:
|
||||
- apt-get update &&
|
||||
apt-get install -y cmake ninja-build
|
||||
script:
|
||||
- mkdir build
|
||||
- cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release
|
||||
- cmake --build build
|
||||
@@ -0,0 +1,25 @@
|
||||
language: c
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
env:
|
||||
- BUILD=AUTOTOOLS
|
||||
- BUILD=CMAKE
|
||||
|
||||
script:
|
||||
- if [[ "$BUILD" == "AUTOTOOLS" ]] ; then ./autogen.sh ; fi
|
||||
- if [[ "$BUILD" == "AUTOTOOLS" ]] ; then ./configure ; fi
|
||||
- if [[ "$BUILD" == "AUTOTOOLS" ]] ; then make distcheck ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then mkdir build ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then pushd build ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCPACK_PACKAGE_CONTACT="Xiph.Org Foundation" .. ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then cmake --build . ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then ctest ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" && "$TRAVIS_OS_NAME" == "linux" ]] ; then cpack -G DEB ; fi
|
||||
- if [[ "$BUILD" == "CMAKE" ]] ; then popd ; fi
|
||||
@@ -0,0 +1,7 @@
|
||||
Monty <monty@xiph.org>
|
||||
Greg Maxwell <greg@xiph.org>
|
||||
Ralph Giles <giles@xiph.org>
|
||||
Cristian Adam <cristian.adam@gmail.com>
|
||||
Tim Terriberry <tterribe@xiph.org>
|
||||
|
||||
and the rest of the Xiph.Org Foundation.
|
||||
@@ -0,0 +1,17 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ogg
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/android
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
src/framing.c \
|
||||
src/bitwise.c
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
@@ -0,0 +1,112 @@
|
||||
Version 1.3.5 (2020 June 3)
|
||||
|
||||
* Fix unsigned typedef problem on macOS.
|
||||
* Fix overflow check in ogg_sync_buffer.
|
||||
* Clean up cmake and autotools build files.
|
||||
* Remove Symbian and Apple XCode build files.
|
||||
* Fix documentation cross-reference links.
|
||||
|
||||
Version 1.3.4 (2019 August 30)
|
||||
|
||||
* Faster slice-by-8 CRC32 implementation.
|
||||
see https://lwn.net/Articles/453931/ for motivation.
|
||||
* Add CMake build.
|
||||
* Deprecate Visual Studio project files in favor of CMake.
|
||||
* configure --disable-crc option for fuzzing.
|
||||
* Various build fixes.
|
||||
* Documentation and example code fixes.
|
||||
|
||||
Version 1.3.3 (2017 November 7)
|
||||
|
||||
* Fix an issue with corrupt continued packet handling.
|
||||
* Update Windows projects and build settings.
|
||||
* Remove Mac OS 9 build support.
|
||||
|
||||
Version 1.3.2 (2014 May 27)
|
||||
|
||||
* Fix an bug in oggpack_writecopy().
|
||||
|
||||
Version 1.3.1 (2013 May 12)
|
||||
|
||||
* Guard against very large packets.
|
||||
* Respect the configure --docdir override.
|
||||
* Documentation fixes.
|
||||
* More Windows build fixes.
|
||||
|
||||
Version 1.3.0 (2011 August 4)
|
||||
|
||||
* Add ogg_stream_flush_fill() call
|
||||
This produces longer packets on flush, similar to
|
||||
what ogg_stream_pageout_fill() does for single pages.
|
||||
* Windows build fixes
|
||||
|
||||
Version 1.2.2 (2010 December 07)
|
||||
|
||||
* Build fix (types correction) for Mac OS X
|
||||
* Update win32 project files to Visual Studio 2008
|
||||
* ogg_stream_pageout_fill documentation fix
|
||||
|
||||
Version 1.2.1 (2010 November 01)
|
||||
|
||||
* Various build updates (see SVN)
|
||||
* Add ogg_stream_pageout_fill() to API to allow applications
|
||||
greater explicit flexibility in page sizing.
|
||||
* Documentation updates including multiplexing description,
|
||||
terminology and API (incl. ogg_packet_clear(),
|
||||
ogg_stream_pageout_fill())
|
||||
* Correct possible buffer overwrite in stream encoding on 32 bit
|
||||
when a single packet exceed 250MB.
|
||||
* Correct read-buffer overrun [without side effects] under
|
||||
similar circumstances.
|
||||
* Update unit testing to work properly with new page spill
|
||||
heuristic.
|
||||
|
||||
Version 1.2.0 (2010 March 25)
|
||||
|
||||
* Alter default flushing behavior to span less often and use larger page
|
||||
sizes when packet sizes are large.
|
||||
* Build fixes for additional compilers
|
||||
* Documentation updates
|
||||
|
||||
Version 1.1.4 (2009 June 24)
|
||||
|
||||
* New async error reporting mechanism. Calls made after a fatal error are
|
||||
now safely handled in the event an error code is ignored
|
||||
* Added allocation checks useful to some embedded applications
|
||||
* fix possible read past end of buffer when reading 0 bits
|
||||
* Updates to API documentation
|
||||
* Build fixes
|
||||
|
||||
Version 1.1.3 (2005 November 27)
|
||||
|
||||
* Correct a bug in the granulepos field of pages where no packet ends
|
||||
* New VS2003 and XCode builds, minor fixes to other builds
|
||||
* documentation fixes and cleanup
|
||||
|
||||
Version 1.1.2 (2004 September 23)
|
||||
|
||||
* fix a bug with multipage packet assembly after seek
|
||||
|
||||
Version 1.1.1 (2004 September 12)
|
||||
|
||||
* various bugfixes
|
||||
* important bugfix for 64-bit platforms
|
||||
* various portability fixes
|
||||
* autotools cleanup from Thomas Vander Stichele
|
||||
* Symbian OS build support from Colin Ward at CSIRO
|
||||
* new multiplexed Ogg stream documentation
|
||||
|
||||
Version 1.1 (2003 November 17)
|
||||
|
||||
* big-endian bitpacker routines for Theora
|
||||
* various portability fixes
|
||||
* improved API documentation
|
||||
* RFC 3533 documentation of the format by Silvia Pfeiffer at CSIRO
|
||||
* RFC 3534 documentation of the application/ogg mime-type by Linus Walleij
|
||||
|
||||
Version 1.0 (2002 July 19)
|
||||
|
||||
* First stable release
|
||||
* little-endian bitpacker routines for Vorbis
|
||||
* basic Ogg bitstream sync and coding support
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
cmake_minimum_required(VERSION 2.8.12...3.10)
|
||||
project(libogg)
|
||||
|
||||
# Required modules
|
||||
include(GNUInstallDirs)
|
||||
include(CheckIncludeFiles)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(CTest)
|
||||
|
||||
# Build options
|
||||
option(BUILD_SHARED_LIBS "Build shared library" OFF)
|
||||
if(APPLE)
|
||||
option(BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF)
|
||||
endif()
|
||||
|
||||
# Install options
|
||||
option(INSTALL_DOCS "Install documentation" ON)
|
||||
option(INSTALL_PKG_CONFIG_MODULE "Install ogg.pc file" ON)
|
||||
option(INSTALL_CMAKE_PACKAGE_MODULE "Install CMake package configuration module" ON)
|
||||
|
||||
# Extract project version from configure.ac
|
||||
file(READ configure.ac CONFIGURE_AC_CONTENTS)
|
||||
string(REGEX MATCH "AC_INIT\\(\\[libogg\\],\\[([0-9]*).([0-9]*).([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS})
|
||||
set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
set(PROJECT_VERSION_MINOR ${CMAKE_MATCH_2})
|
||||
set(PROJECT_VERSION_PATCH ${CMAKE_MATCH_3})
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
||||
|
||||
# Extract library version from configure.ac
|
||||
string(REGEX MATCH "LIB_CURRENT=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS})
|
||||
set(LIB_CURRENT ${CMAKE_MATCH_1})
|
||||
|
||||
string(REGEX MATCH "LIB_AGE=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS})
|
||||
set(LIB_AGE ${CMAKE_MATCH_1})
|
||||
|
||||
string(REGEX MATCH "LIB_REVISION=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS})
|
||||
set(LIB_REVISION ${CMAKE_MATCH_1})
|
||||
|
||||
math(EXPR LIB_SOVERSION "${LIB_CURRENT} - ${LIB_AGE}")
|
||||
set(LIB_VERSION "${LIB_SOVERSION}.${LIB_AGE}.${LIB_REVISION}")
|
||||
|
||||
|
||||
# Helper function to configure pkg-config files
|
||||
function(configure_pkg_config_file pkg_config_file_in)
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
|
||||
set(VERSION ${PROJECT_VERSION})
|
||||
string(REPLACE ".in" "" pkg_config_file ${pkg_config_file_in})
|
||||
configure_file(${pkg_config_file_in} ${pkg_config_file} @ONLY)
|
||||
endfunction()
|
||||
|
||||
message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
|
||||
# Configure config_type.h
|
||||
check_include_files(inttypes.h INCLUDE_INTTYPES_H)
|
||||
check_include_files(stdint.h INCLUDE_STDINT_H)
|
||||
check_include_files(sys/types.h INCLUDE_SYS_TYPES_H)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
set(SIZE16 int16_t)
|
||||
set(USIZE16 uint16_t)
|
||||
set(SIZE32 int32_t)
|
||||
set(USIZE32 uint32_t)
|
||||
set(SIZE64 int64_t)
|
||||
set(USIZE64 uint64_t)
|
||||
|
||||
include(CheckSizes)
|
||||
|
||||
configure_file(include/ogg/config_types.h.in include/ogg/config_types.h @ONLY)
|
||||
|
||||
set(OGG_HEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/ogg/config_types.h
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/ogg/ogg.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/ogg/os_types.h"
|
||||
)
|
||||
|
||||
set(OGG_SOURCES
|
||||
src/bitwise.c
|
||||
src/framing.c
|
||||
src/crctable.h
|
||||
)
|
||||
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
list(APPEND OGG_SOURCES win32/ogg.def)
|
||||
endif()
|
||||
|
||||
if(BUILD_FRAMEWORK)
|
||||
set(BUILD_SHARED_LIBS TRUE)
|
||||
endif()
|
||||
|
||||
add_library(ogg ${OGG_HEADERS} ${OGG_SOURCES})
|
||||
add_library(Ogg::ogg ALIAS ogg)
|
||||
target_include_directories(ogg PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
set_target_properties(
|
||||
ogg PROPERTIES
|
||||
SOVERSION ${LIB_SOVERSION}
|
||||
VERSION ${LIB_VERSION}
|
||||
#PUBLIC_HEADER "${OGG_HEADERS}"
|
||||
)
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
# FIXME: keep soversion in sync with autotools
|
||||
set_property(TARGET ogg PROPERTY RUNTIME_OUTPUT_NAME "ogg-0")
|
||||
# Requires CMake 3.27, so not sufficient
|
||||
set_property(TARGET ogg PROPERTY DLL_NAME_WITH_SOVERSION FALSE)
|
||||
endif()
|
||||
|
||||
if(BUILD_FRAMEWORK)
|
||||
set_target_properties(ogg PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_FRAMEWORK_IDENTIFIER org.xiph.ogg
|
||||
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION}
|
||||
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
||||
OUTPUT_NAME Ogg
|
||||
)
|
||||
endif()
|
||||
|
||||
configure_pkg_config_file(ogg.pc.in)
|
||||
|
||||
install(TARGETS ogg
|
||||
EXPORT OggTargets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ogg
|
||||
)
|
||||
if(0) # libsdl-org: cannot export a target twice (fixes 'export called with target "vorbis" which requires target "ogg" that is not in this export set, but in multiple other export sets')
|
||||
export(EXPORT OggTargets NAMESPACE Ogg:: FILE OggTargets.cmake)
|
||||
endif()
|
||||
if(INSTALL_CMAKE_PACKAGE_MODULE)
|
||||
set(CMAKE_INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/Ogg)
|
||||
install(EXPORT OggTargets
|
||||
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||
NAMESPACE Ogg::
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/OggConfig.cmake.in ${PROJECT_BINARY_DIR}/OggConfig.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||
PATH_VARS CMAKE_INSTALL_FULL_INCLUDEDIR
|
||||
)
|
||||
|
||||
write_basic_package_version_file(${PROJECT_BINARY_DIR}/OggConfigVersion.cmake
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
install(FILES ${PROJECT_BINARY_DIR}/OggConfig.cmake ${PROJECT_BINARY_DIR}/OggConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_CONFIGDIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(INSTALL_PKG_CONFIG_MODULE)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ogg.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
)
|
||||
endif()
|
||||
|
||||
if(INSTALL_DOCS)
|
||||
set(OGG_DOCS
|
||||
doc/framing.html
|
||||
doc/index.html
|
||||
doc/oggstream.html
|
||||
doc/ogg-multiplex.html
|
||||
doc/fish_xiph_org.png
|
||||
doc/multiplex1.png
|
||||
doc/packets.png
|
||||
doc/pages.png
|
||||
doc/stream.png
|
||||
doc/vorbisword2.png
|
||||
doc/white-ogg.png
|
||||
doc/white-xifish.png
|
||||
doc/rfc3533.txt
|
||||
doc/rfc5334.txt
|
||||
doc/skeleton.html
|
||||
)
|
||||
install(FILES ${OGG_DOCS} DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
|
||||
install(DIRECTORY doc/libogg DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_executable(test_bitwise src/bitwise.c ${OGG_HEADERS})
|
||||
target_compile_definitions(test_bitwise PRIVATE _V_SELFTEST)
|
||||
target_include_directories(test_bitwise PRIVATE
|
||||
include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
)
|
||||
add_test(NAME test_bitwise COMMAND $<TARGET_FILE:test_bitwise>)
|
||||
|
||||
add_executable(test_framing src/framing.c ${OGG_HEADERS})
|
||||
target_compile_definitions(test_framing PRIVATE _V_SELFTEST)
|
||||
target_include_directories(test_framing PRIVATE
|
||||
include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
)
|
||||
add_test(NAME test_framing COMMAND $<TARGET_FILE:test_framing>)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
include(CPack)
|
||||
@@ -0,0 +1,28 @@
|
||||
Copyright (c) 2002, Xiph.org Foundation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of the Xiph.org Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
|
||||
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,44 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
|
||||
#AUTOMAKE_OPTIONS = foreign 1.6 dist-zip
|
||||
AUTOMAKE_OPTIONS = foreign 1.11 dist-zip dist-xz
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
SUBDIRS = src include doc
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = ogg.m4
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = ogg.pc
|
||||
|
||||
EXTRA_DIST = README.md AUTHORS CHANGES COPYING \
|
||||
libogg.spec libogg.spec.in \
|
||||
ogg.m4 ogg.pc.in ogg-uninstalled.pc.in \
|
||||
win32 CMakeLists.txt cmake
|
||||
|
||||
dist-hook:
|
||||
for item in $(EXTRA_DIST); do \
|
||||
if test -d $$item; then \
|
||||
echo -n "cleaning dir $$item for distribution..."; \
|
||||
rm -rf `find $(distdir)/$$item -name .svn`; \
|
||||
echo "OK"; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Verify cmake works with the dist tarball.
|
||||
cmake_builddir = _build.cmake
|
||||
distcheck-hook:
|
||||
$(RM) -rf $(cmake_builddir)
|
||||
mkdir $(cmake_builddir)
|
||||
cd $(cmake_builddir) && cmake ../$(top_distdir)
|
||||
cd $(cmake_builddir) && cmake --build .
|
||||
cd $(cmake_builddir) && ctest
|
||||
$(RM) -rf $(cmake_builddir)
|
||||
|
||||
debug:
|
||||
$(MAKE) all CFLAGS="@DEBUG@"
|
||||
|
||||
profile:
|
||||
$(MAKE) all CFLAGS="@PROFILE@"
|
||||
@@ -0,0 +1,160 @@
|
||||
# Ogg
|
||||
|
||||
[](https://travis-ci.org/xiph/ogg)
|
||||
[](https://mf4.xiph.org/jenkins/job/libogg/)
|
||||
[](https://ci.appveyor.com/project/rillian/ogg)
|
||||
|
||||
Ogg project codecs use the Ogg bitstream format to arrange the raw,
|
||||
compressed bitstream into a more robust, useful form. For example,
|
||||
the Ogg bitstream makes seeking, time stamping and error recovery
|
||||
possible, as well as mixing several sepearate, concurrent media
|
||||
streams into a single physical bitstream.
|
||||
|
||||
## What's here ##
|
||||
This source distribution includes libogg and nothing else. Other modules
|
||||
(eg, the modules libvorbis, vorbis-tools for the Vorbis music codec,
|
||||
libtheora for the Theora video codec) contain the codec libraries for
|
||||
use with Ogg bitstreams.
|
||||
|
||||
Directory:
|
||||
|
||||
- `src` The source for libogg, a BSD-license inplementation of the public domain Ogg bitstream format
|
||||
|
||||
- `include` Library API headers
|
||||
|
||||
- `doc` Ogg specification and libogg API documents
|
||||
|
||||
- `win32` Win32 projects and build automation
|
||||
|
||||
## Contact ##
|
||||
|
||||
The Ogg homepage is located at https://www.xiph.org/ogg/ .
|
||||
Up to date technical documents, contact information, source code and
|
||||
pre-built utilities may be found there.
|
||||
|
||||
## Building ##
|
||||
|
||||
#### Building from tarball distributions ####
|
||||
|
||||
./configure
|
||||
make
|
||||
|
||||
and optionally (as root):
|
||||
|
||||
make install
|
||||
|
||||
This will install the Ogg libraries (static and shared) into
|
||||
/usr/local/lib, includes into /usr/local/include and API
|
||||
documentation into /usr/local/share/doc.
|
||||
|
||||
#### Building from repository source ####
|
||||
|
||||
A standard svn build should consist of nothing more than:
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
|
||||
and as root if desired :
|
||||
|
||||
make install
|
||||
|
||||
#### Building on Windows ####
|
||||
|
||||
Use the project file in the win32 directory. It should compile out of the box.
|
||||
|
||||
#### Cross-compiling from Linux to Windows ####
|
||||
|
||||
It is also possible to cross compile from Linux to windows using the MinGW
|
||||
cross tools and even to run the test suite under Wine, the Linux/*nix
|
||||
windows emulator.
|
||||
|
||||
On Debian and Ubuntu systems, these cross compiler tools can be installed
|
||||
by doing:
|
||||
|
||||
sudo apt-get mingw32 mingw32-binutils mingw32-runtime wine
|
||||
|
||||
Once these tools are installed its possible to compile and test by
|
||||
executing the following commands, or something similar depending on
|
||||
your system:
|
||||
|
||||
./configure --host=i586-mingw32msvc --target=i586-mingw32msvc --build=i586-linux
|
||||
make
|
||||
make check
|
||||
|
||||
(Build instructions for Ogg codecs such as vorbis are similar and may
|
||||
be found in those source modules' README files)
|
||||
|
||||
## Building with CMake ##
|
||||
|
||||
Ogg supports building using [CMake](http://www.cmake.org/). CMake is a meta build system that generates native projects for each platform.
|
||||
To generate projects just run cmake replacing `YOUR-PROJECT-GENERATOR` with a proper generator from a list [here](http://www.cmake.org/cmake/help/v3.2/manual/cmake-generators.7.html):
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G YOUR-PROJECT-GENERATOR ..
|
||||
|
||||
Note that by default cmake generates projects that will build static libraries.
|
||||
To generate projects that will build dynamic library use `BUILD_SHARED_LIBS` option like this:
|
||||
|
||||
cmake -G YOUR-PROJECT-GENERATOR -DBUILD_SHARED_LIBS=1 ..
|
||||
|
||||
After projects are generated use them as usual
|
||||
|
||||
#### Building on Windows ####
|
||||
|
||||
Use proper generator for your Visual Studio version like:
|
||||
|
||||
cmake -G "Visual Studio 12 2013" ..
|
||||
|
||||
#### Building on Mac OS X ####
|
||||
|
||||
Use Xcode generator. To build framework run:
|
||||
|
||||
cmake -G Xcode -DBUILD_FRAMEWORK=1 ..
|
||||
|
||||
#### Building on Linux ####
|
||||
|
||||
Use Makefile generator which is default one.
|
||||
|
||||
cmake ..
|
||||
make
|
||||
|
||||
## Testing ##
|
||||
|
||||
This package includes a collection of automated tests.
|
||||
Running them is not part of building nor installation but optional.
|
||||
|
||||
### Unix-like System or MinGW ###
|
||||
|
||||
If build under automake:
|
||||
|
||||
make check
|
||||
|
||||
If build under CMake:
|
||||
|
||||
make test
|
||||
|
||||
or:
|
||||
|
||||
ctest
|
||||
|
||||
### Windows with MSBuild ###
|
||||
|
||||
If build with configuration type "Debug", then:
|
||||
|
||||
ctest -C Debug
|
||||
|
||||
If build with configuration type "Release", then:
|
||||
|
||||
ctest -C Release
|
||||
|
||||
## License ##
|
||||
|
||||
THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.
|
||||
USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS
|
||||
GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE
|
||||
IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.
|
||||
|
||||
THE OggVorbis SOURCE CODE IS COPYRIGHT (C) 1994-2019
|
||||
by the Xiph.Org Foundation https://www.xiph.org/
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef __CONFIG_TYPES_H__
|
||||
#define __CONFIG_TYPES_H__
|
||||
|
||||
/* these are filled in by configure */
|
||||
#define INCLUDE_INTTYPES_H 1
|
||||
#define INCLUDE_STDINT_H 1
|
||||
#define INCLUDE_SYS_TYPES_H 1
|
||||
|
||||
#if INCLUDE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#if INCLUDE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#if INCLUDE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
typedef int16_t ogg_int16_t;
|
||||
typedef uint16_t ogg_uint16_t;
|
||||
typedef int32_t ogg_int32_t;
|
||||
typedef uint32_t ogg_uint32_t;
|
||||
typedef int64_t ogg_int64_t;
|
||||
typedef uint64_t ogg_uint64_t;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
image: Visual Studio 2015
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
platform:
|
||||
- Win32
|
||||
- x64
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- BUILD_SYSTEM: MSVC
|
||||
- BUILD_SYSTEM: CMAKE
|
||||
|
||||
build_script:
|
||||
- if "%BUILD_SYSTEM%" == "MSVC" (
|
||||
msbuild "%APPVEYOR_BUILD_FOLDER%\win32\VS2015\libogg.sln" /m /v:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:Configuration=%CONFIGURATION%;Platform=%PLATFORM%
|
||||
)
|
||||
- if "%BUILD_SYSTEM%" == "CMAKE" (
|
||||
mkdir "%APPVEYOR_BUILD_FOLDER%\build" &&
|
||||
pushd "%APPVEYOR_BUILD_FOLDER%\build" &&
|
||||
cmake -A "%PLATFORM%" -G "Visual Studio 14 2015" .. &&
|
||||
cmake --build . --config "%CONFIGURATION%" -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
|
||||
popd
|
||||
)
|
||||
|
||||
after_build:
|
||||
- if "%BUILD_SYSTEM%" == "MSVC" (
|
||||
7z a ogg.zip win32\VS2015\%PLATFORM%\%CONFIGURATION%\libogg.lib include\ogg\*.h
|
||||
)
|
||||
|
||||
artifacts:
|
||||
- path: ogg.zip
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# Run this to set up the build system: configure, makefiles, etc.
|
||||
set -e
|
||||
|
||||
package="libogg"
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -n "$srcdir" && cd "$srcdir"
|
||||
|
||||
echo "Updating build configuration files for $package, please wait...."
|
||||
|
||||
mkdir -p m4
|
||||
autoreconf -if
|
||||
@@ -0,0 +1,73 @@
|
||||
include(CheckTypeSize)
|
||||
|
||||
check_type_size("int16_t" INT16_SIZE LANGUAGE C)
|
||||
check_type_size("uint16_t" UINT16_SIZE LANGUAGE C)
|
||||
check_type_size("u_int16_t" U_INT16_SIZE LANGUAGE C)
|
||||
check_type_size("int32_t" INT32_SIZE LANGUAGE C)
|
||||
check_type_size("uint32_t" UINT32_SIZE LANGUAGE C)
|
||||
check_type_size("u_int32_t" U_INT32_SIZE LANGUAGE C)
|
||||
check_type_size("int64_t" INT64_SIZE LANGUAGE C)
|
||||
check_type_size("short" SHORT_SIZE LANGUAGE C)
|
||||
check_type_size("int" INT_SIZE LANGUAGE C)
|
||||
check_type_size("long" LONG_SIZE LANGUAGE C)
|
||||
check_type_size("long long" LONG_LONG_SIZE LANGUAGE C)
|
||||
|
||||
if(INT16_SIZE EQUAL 2)
|
||||
set(SIZE16 "int16_t")
|
||||
elseif(SHORT_SIZE EQUAL 2)
|
||||
set(SIZE16 "short")
|
||||
elseif(INT_SIZE EQUAL 2)
|
||||
set(SIZE16 "int")
|
||||
else()
|
||||
message(FATAL_ERROR "No 16 bit type found on this platform!")
|
||||
endif()
|
||||
|
||||
if(UINT16_SIZE EQUAL 2)
|
||||
set(USIZE16 "uint16_t")
|
||||
elseif(SHORT_SIZE EQUAL 2)
|
||||
set(USIZE16 "unsigned short")
|
||||
elseif(INT_SIZE EQUAL 2)
|
||||
set(USIZE16 "unsigned int")
|
||||
elseif(U_INT_SIZE EQUAL 2)
|
||||
set(USIZE16 "u_int16_t")
|
||||
else()
|
||||
message(FATAL_ERROR "No unsigned 16 bit type found on this platform!")
|
||||
endif()
|
||||
|
||||
if(INT32_SIZE EQUAL 4)
|
||||
set(SIZE32 "int32_t")
|
||||
elseif(SHORT_SIZE EQUAL 4)
|
||||
set(SIZE32 "short")
|
||||
elseif(INT_SIZE EQUAL 4)
|
||||
set(SIZE32 "int")
|
||||
elseif(LONG_SIZE EQUAL 4)
|
||||
set(SIZE16 "long")
|
||||
else()
|
||||
message(FATAL_ERROR "No 32 bit type found on this platform!")
|
||||
endif()
|
||||
|
||||
if(UINT32_SIZE EQUAL 4)
|
||||
set(USIZE32 "uint32_t")
|
||||
elseif(SHORT_SIZE EQUAL 4)
|
||||
set(USIZE32 "unsigned short")
|
||||
elseif(INT_SIZE EQUAL 4)
|
||||
set(USIZE32 "unsigned int")
|
||||
elseif(LONG_SIZE EQUAL 4)
|
||||
set(USIZE32 "unsigned long")
|
||||
elseif(U_INT_SIZE EQUAL 4)
|
||||
set(USIZE32 "u_int32_t")
|
||||
else()
|
||||
message(FATAL_ERROR "No unsigned 32 bit type found on this platform!")
|
||||
endif()
|
||||
|
||||
if(INT64_SIZE EQUAL 8)
|
||||
set(SIZE64 "int64_t")
|
||||
elseif(INT_SIZE EQUAL 8)
|
||||
set(SIZE64 "int")
|
||||
elseif(LONG_SIZE EQUAL 8)
|
||||
set(SIZE64 "long")
|
||||
elseif(LONG_LONG_SIZE EQUAL 8)
|
||||
set(SIZE64 "long long")
|
||||
else()
|
||||
message(FATAL_ERROR "No 64 bit type found on this platform!")
|
||||
endif()
|
||||
@@ -0,0 +1,16 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set(Ogg_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set(OGG_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set(Ogg_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set(OGG_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/OggTargets.cmake)
|
||||
|
||||
set(Ogg_LIBRARY Ogg::ogg)
|
||||
set(OGG_LIBRARY Ogg::ogg)
|
||||
set(Ogg_LIBRARIES Ogg::ogg)
|
||||
set(OGG_LIBRARIES Ogg::ogg)
|
||||
|
||||
check_required_components(Ogg)
|
||||
set(OGG_FOUND 1)
|
||||
@@ -0,0 +1,209 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([libogg],[1.3.5],[ogg-dev@xiph.org])
|
||||
|
||||
LT_INIT
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_SRCDIR(src/framing.c)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
dnl Library versioning
|
||||
|
||||
LIB_CURRENT=8
|
||||
LIB_REVISION=5
|
||||
LIB_AGE=8
|
||||
AC_SUBST(LIB_CURRENT)
|
||||
AC_SUBST(LIB_REVISION)
|
||||
AC_SUBST(LIB_AGE)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
dnl Set some options based on environment
|
||||
|
||||
cflags_save="$CFLAGS"
|
||||
if test -z "$GCC"; then
|
||||
case $host in
|
||||
*-*-irix*)
|
||||
DEBUG="-g -signed"
|
||||
CFLAGS="-O2 -w -signed"
|
||||
PROFILE="-p -g3 -O2 -signed"
|
||||
;;
|
||||
sparc-sun-solaris*)
|
||||
DEBUG="-v -g"
|
||||
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
|
||||
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
|
||||
;;
|
||||
*)
|
||||
DEBUG="-g"
|
||||
CFLAGS="-O"
|
||||
PROFILE="-g -p"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
DEBUG="-g -Wall -fsigned-char"
|
||||
CFLAGS="-O2 -Wall -ffast-math -fsigned-char"
|
||||
PROFILE="-Wall -W -pg -g -O2 -ffast-math -fsigned-char"
|
||||
;;
|
||||
sparc-sun-*)
|
||||
DEBUG="-g -Wall -fsigned-char"
|
||||
CFLAGS="-O2 -ffast-math -fsigned-char"
|
||||
PROFILE="-pg -g -O2 -fsigned-char"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
DEBUG="-fno-common -g -Wall -fsigned-char"
|
||||
CFLAGS="-fno-common -O4 -Wall -fsigned-char -ffast-math"
|
||||
PROFILE="-fno-common -O4 -Wall -pg -g -fsigned-char -ffast-math"
|
||||
;;
|
||||
*)
|
||||
DEBUG="-g -Wall -fsigned-char"
|
||||
CFLAGS="-O2 -fsigned-char"
|
||||
PROFILE="-O2 -g -pg -fsigned-char"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
CFLAGS="$CFLAGS $cflags_save"
|
||||
DEBUG="$DEBUG $cflags_save"
|
||||
PROFILE="$PROFILE $cflags_save"
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
INCLUDE_INTTYPES_H=0
|
||||
INCLUDE_STDINT_H=0
|
||||
INCLUDE_SYS_TYPES_H=0
|
||||
AC_CHECK_HEADER(inttypes.h,INCLUDE_INTTYPES_H=1)
|
||||
AC_CHECK_HEADER(stdint.h,INCLUDE_STDINT_H=1)
|
||||
AC_CHECK_HEADER(sys/types.h,INCLUDE_SYS_TYPES_H=1)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
dnl Check for types
|
||||
|
||||
AC_CHECK_SIZEOF(int16_t)
|
||||
AC_CHECK_SIZEOF(uint16_t)
|
||||
AC_CHECK_SIZEOF(u_int16_t)
|
||||
AC_CHECK_SIZEOF(int32_t)
|
||||
AC_CHECK_SIZEOF(uint32_t)
|
||||
AC_CHECK_SIZEOF(u_int32_t)
|
||||
AC_CHECK_SIZEOF(int64_t)
|
||||
AC_CHECK_SIZEOF(uint64_t)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
|
||||
case 2 in
|
||||
$ac_cv_sizeof_int16_t) SIZE16="int16_t";;
|
||||
$ac_cv_sizeof_short) SIZE16="short";;
|
||||
$ac_cv_sizeof_int) SIZE16="int";;
|
||||
esac
|
||||
|
||||
case 2 in
|
||||
$ac_cv_sizeof_uint16_t) USIZE16="uint16_t";;
|
||||
$ac_cv_sizeof_short) USIZE16="unsigned short";;
|
||||
$ac_cv_sizeof_int) USIZE16="unsigned int";;
|
||||
$ac_cv_sizeof_u_int16_t) USIZE16="u_int16_t";;
|
||||
esac
|
||||
|
||||
case 4 in
|
||||
$ac_cv_sizeof_int32_t) SIZE32="int32_t";;
|
||||
$ac_cv_sizeof_short) SIZE32="short";;
|
||||
$ac_cv_sizeof_int) SIZE32="int";;
|
||||
$ac_cv_sizeof_long) SIZE32="long";;
|
||||
esac
|
||||
|
||||
case 4 in
|
||||
$ac_cv_sizeof_uint32_t) USIZE32="uint32_t";;
|
||||
$ac_cv_sizeof_short) USIZE32="unsigned short";;
|
||||
$ac_cv_sizeof_int) USIZE32="unsigned int";;
|
||||
$ac_cv_sizeof_long) USIZE32="unsigned long";;
|
||||
$ac_cv_sizeof_u_int32_t) USIZE32="u_int32_t";;
|
||||
esac
|
||||
|
||||
case 8 in
|
||||
$ac_cv_sizeof_int64_t) SIZE64="int64_t";;
|
||||
$ac_cv_sizeof_int) SIZE64="int";;
|
||||
$ac_cv_sizeof_long) SIZE64="long";;
|
||||
$ac_cv_sizeof_long_long) SIZE64="long long";;
|
||||
esac
|
||||
|
||||
case 8 in
|
||||
$ac_cv_sizeof_uint64_t) USIZE64="uint64_t";;
|
||||
$ac_cv_sizeof_unsigned_int) USIZE64="unsigned int";;
|
||||
$ac_cv_sizeof_unsigned_long) USIZE64="unsigned long";;
|
||||
$ac_cv_sizeof_unsigned_long_long) USIZE64="unsigned long long";;
|
||||
esac
|
||||
|
||||
if test -z "$SIZE16"; then
|
||||
AC_MSG_ERROR(No 16 bit type found on this platform!)
|
||||
fi
|
||||
if test -z "$USIZE16"; then
|
||||
AC_MSG_ERROR(No unsigned 16 bit type found on this platform!)
|
||||
fi
|
||||
if test -z "$SIZE32"; then
|
||||
AC_MSG_ERROR(No 32 bit type found on this platform!)
|
||||
fi
|
||||
if test -z "$USIZE32"; then
|
||||
AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
|
||||
fi
|
||||
if test -z "$SIZE64"; then
|
||||
AC_MSG_WARN(No 64 bit type found on this platform!)
|
||||
fi
|
||||
if test -z "$USIZE64"; then
|
||||
AC_MSG_WARN(No unsigned 64 bit type found on this platform!)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([crc],
|
||||
[AS_HELP_STRING([--disable-crc],
|
||||
[Disable CRC in the demuxer])],,
|
||||
[enable_crc=yes])
|
||||
|
||||
AM_CONDITIONAL([DISABLE_CRC], [test "$enable_crc" = "no"])
|
||||
|
||||
AS_IF([test "$enable_crc" = "no"],[
|
||||
AC_DEFINE([DISABLE_CRC], [1], [Do not build with CRC])
|
||||
])
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_MEMCMP
|
||||
|
||||
dnl Make substitutions
|
||||
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
AC_SUBST(INCLUDE_INTTYPES_H)
|
||||
AC_SUBST(INCLUDE_STDINT_H)
|
||||
AC_SUBST(INCLUDE_SYS_TYPES_H)
|
||||
AC_SUBST(SIZE16)
|
||||
AC_SUBST(USIZE16)
|
||||
AC_SUBST(SIZE32)
|
||||
AC_SUBST(USIZE32)
|
||||
AC_SUBST(SIZE64)
|
||||
AC_SUBST(USIZE64)
|
||||
AC_SUBST(OPT)
|
||||
AC_SUBST(LIBS)
|
||||
AC_SUBST(DEBUG)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(PROFILE)
|
||||
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
src/Makefile
|
||||
doc/Makefile doc/libogg/Makefile
|
||||
include/Makefile include/ogg/Makefile include/ogg/config_types.h
|
||||
libogg.spec
|
||||
ogg.pc
|
||||
ogg-uninstalled.pc
|
||||
])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,9 @@
|
||||
## Process this with automake to create Makefile.in
|
||||
|
||||
SUBDIRS = libogg
|
||||
|
||||
dist_html_DATA = framing.html index.html oggstream.html ogg-multiplex.html \
|
||||
fish_xiph_org.png multiplex1.png packets.png pages.png stream.png \
|
||||
vorbisword2.png white-ogg.png white-xifish.png \
|
||||
rfc3533.txt rfc5334.txt skeleton.html
|
||||
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,429 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
|
||||
<title>Ogg Documentation</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0 18px 0 18px;
|
||||
padding-bottom: 30px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #333333;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #3366cc;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#xiphlogo {
|
||||
margin: 30px 0 16px 0;
|
||||
}
|
||||
|
||||
#content p {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h1, h1 a, h2, h2 a, h3, h3 a {
|
||||
font-weight: bold;
|
||||
color: #ff9900;
|
||||
margin: 1.3em 0 8px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
margin-top: 30px;
|
||||
line-height: 1.5em;
|
||||
text-align: center;
|
||||
font-size: .8em;
|
||||
color: #888888;
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="xiphlogo">
|
||||
<a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
|
||||
</div>
|
||||
|
||||
<h1>Ogg logical bitstream framing</h1>
|
||||
|
||||
<h2>Ogg bitstreams</h2>
|
||||
|
||||
<p>The Ogg transport bitstream is designed to provide framing, error
|
||||
protection and seeking structure for higher-level codec streams that
|
||||
consist of raw, unencapsulated data packets, such as the Vorbis audio
|
||||
codec or Theora video codec.</p>
|
||||
|
||||
<h2>Application example: Vorbis</h2>
|
||||
|
||||
<p>Vorbis encodes short-time blocks of PCM data into raw packets of
|
||||
bit-packed data. These raw packets may be used directly by transport
|
||||
mechanisms that provide their own framing and packet-separation
|
||||
mechanisms (such as UDP datagrams). For stream based storage (such as
|
||||
files) and transport (such as TCP streams or pipes), Vorbis uses the
|
||||
Ogg bitstream format to provide framing/sync, sync recapture
|
||||
after error, landmarks during seeking, and enough information to
|
||||
properly separate data back into packets at the original packet
|
||||
boundaries without relying on decoding to find packet boundaries.</p>
|
||||
|
||||
<h2>Design constraints for Ogg bitstreams</h2>
|
||||
|
||||
<ol>
|
||||
<li>True streaming; we must not need to seek to build a 100%
|
||||
complete bitstream.</li>
|
||||
<li>Use no more than approximately 1-2% of bitstream bandwidth for
|
||||
packet boundary marking, high-level framing, sync and seeking.</li>
|
||||
<li>Specification of absolute position within the original sample
|
||||
stream.</li>
|
||||
<li>Simple mechanism to ease limited editing, such as a simplified
|
||||
concatenation mechanism.</li>
|
||||
<li>Detection of corruption, recapture after error and direct, random
|
||||
access to data at arbitrary positions in the bitstream.</li>
|
||||
</ol>
|
||||
|
||||
<h2>Logical and Physical Bitstreams</h2>
|
||||
|
||||
<p>A <em>logical</em> Ogg bitstream is a contiguous stream of
|
||||
sequential pages belonging only to the logical bitstream. A
|
||||
<em>physical</em> Ogg bitstream is constructed from one or more
|
||||
than one logical Ogg bitstream (the simplest physical bitstream
|
||||
is simply a single logical bitstream). We describe below the exact
|
||||
formatting of an Ogg logical bitstream. Combining logical
|
||||
bitstreams into more complex physical bitstreams is described in the
|
||||
<a href="oggstream.html">Ogg bitstream overview</a>. The exact
|
||||
mapping of raw Vorbis packets into a valid Ogg Vorbis physical
|
||||
bitstream is described in the Vorbis I Specification.</p>
|
||||
|
||||
<h2>Bitstream structure</h2>
|
||||
|
||||
<p>An Ogg stream is structured by dividing incoming packets into
|
||||
segments of up to 255 bytes and then wrapping a group of contiguous
|
||||
packet segments into a variable length page preceded by a page
|
||||
header. Both the header size and page size are variable; the page
|
||||
header contains sizing information and checksum data to determine
|
||||
header/page size and data integrity.</p>
|
||||
|
||||
<p>The bitstream is captured (or recaptured) by looking for the beginning
|
||||
of a page, specifically the capture pattern. Once the capture pattern
|
||||
is found, the decoder verifies page sync and integrity by computing
|
||||
and comparing the checksum. At that point, the decoder can extract the
|
||||
packets themselves.</p>
|
||||
|
||||
<h3>Packet segmentation</h3>
|
||||
|
||||
<p>Packets are logically divided into multiple segments before encoding
|
||||
into a page. Note that the segmentation and fragmentation process is a
|
||||
logical one; it's used to compute page header values and the original
|
||||
page data need not be disturbed, even when a packet spans page
|
||||
boundaries.</p>
|
||||
|
||||
<p>The raw packet is logically divided into [n] 255 byte segments and a
|
||||
last fractional segment of < 255 bytes. A packet size may well
|
||||
consist only of the trailing fractional segment, and a fractional
|
||||
segment may be zero length. These values, called "lacing values" are
|
||||
then saved and placed into the header segment table.</p>
|
||||
|
||||
<p>An example should make the basic concept clear:</p>
|
||||
|
||||
<pre>
|
||||
<tt>
|
||||
raw packet:
|
||||
___________________________________________
|
||||
|______________packet data__________________| 753 bytes
|
||||
|
||||
lacing values for page header segment table: 255,255,243
|
||||
</tt>
|
||||
</pre>
|
||||
|
||||
<p>We simply add the lacing values for the total size; the last lacing
|
||||
value for a packet is always the value that is less than 255. Note
|
||||
that this encoding both avoids imposing a maximum packet size as well
|
||||
as imposing minimum overhead on small packets (as opposed to, eg,
|
||||
simply using two bytes at the head of every packet and having a max
|
||||
packet size of 32k. Small packets (<255, the typical case) are
|
||||
penalized with twice the segmentation overhead). Using the lacing
|
||||
values as suggested, small packets see the minimum possible
|
||||
byte-aligned overhead (1 byte) and large packets, over 512 bytes or
|
||||
so, see a fairly constant ~.5% overhead on encoding space.</p>
|
||||
|
||||
<p>Note that a lacing value of 255 implies that a second lacing value
|
||||
follows in the packet, and a value of < 255 marks the end of the
|
||||
packet after that many additional bytes. A packet of 255 bytes (or a
|
||||
multiple of 255 bytes) is terminated by a lacing value of 0:</p>
|
||||
|
||||
<pre><tt>
|
||||
raw packet:
|
||||
_______________________________
|
||||
|________packet data____________| 255 bytes
|
||||
|
||||
lacing values: 255, 0
|
||||
</tt></pre>
|
||||
|
||||
<p>Note also that a 'nil' (zero length) packet is not an error; it
|
||||
consists of nothing more than a lacing value of zero in the header.</p>
|
||||
|
||||
<h3>Packets spanning pages</h3>
|
||||
|
||||
<p>Packets are not restricted to beginning and ending within a page,
|
||||
although individual segments are, by definition, required to do so.
|
||||
Packets are not restricted to a maximum size, although excessively
|
||||
large packets in the data stream are discouraged.</p>
|
||||
|
||||
<p>After segmenting a packet, the encoder may decide not to place all the
|
||||
resulting segments into the current page; to do so, the encoder places
|
||||
the lacing values of the segments it wishes to belong to the current
|
||||
page into the current segment table, then finishes the page. The next
|
||||
page is begun with the first value in the segment table belonging to
|
||||
the next packet segment, thus continuing the packet (data in the
|
||||
packet body must also correspond properly to the lacing values in the
|
||||
spanned pages. The segment data in the first packet corresponding to
|
||||
the lacing values of the first page belong in that page; packet
|
||||
segments listed in the segment table of the following page must begin
|
||||
the page body of the subsequent page).</p>
|
||||
|
||||
<p>The last mechanic to spanning a page boundary is to set the header
|
||||
flag in the new page to indicate that the first lacing value in the
|
||||
segment table continues rather than begins a packet; a header flag of
|
||||
0x01 is set to indicate a continued packet. Although mandatory, it
|
||||
is not actually algorithmically necessary; one could inspect the
|
||||
preceding segment table to determine if the packet is new or
|
||||
continued. Adding the information to the packet_header flag allows a
|
||||
simpler design (with no overhead) that needs only inspect the current
|
||||
page header after frame capture. This also allows faster error
|
||||
recovery in the event that the packet originates in a corrupt
|
||||
preceding page, implying that the previous page's segment table
|
||||
cannot be trusted.</p>
|
||||
|
||||
<p>Note that a packet can span an arbitrary number of pages; the above
|
||||
spanning process is repeated for each spanned page boundary. Also a
|
||||
'zero termination' on a packet size that is an even multiple of 255
|
||||
must appear even if the lacing value appears in the next page as a
|
||||
zero-length continuation of the current packet. The header flag
|
||||
should be set to 0x01 to indicate that the packet spanned, even though
|
||||
the span is a nil case as far as data is concerned.</p>
|
||||
|
||||
<p>The encoding looks odd, but is properly optimized for speed and the
|
||||
expected case of the majority of packets being between 50 and 200
|
||||
bytes (note that it is designed such that packets of wildly different
|
||||
sizes can be handled within the model; placing packet size
|
||||
restrictions on the encoder would have only slightly simplified design
|
||||
in page generation and increased overall encoder complexity).</p>
|
||||
|
||||
<p>The main point behind tracking individual packets (and packet
|
||||
segments) is to allow more flexible encoding tricks that requiring
|
||||
explicit knowledge of packet size. An example is simple bandwidth
|
||||
limiting, implemented by simply truncating packets in the nominal case
|
||||
if the packet is arranged so that the least sensitive portion of the
|
||||
data comes last.</p>
|
||||
|
||||
<a name="page_header"></a>
|
||||
<h3>Page header</h3>
|
||||
|
||||
<p>The headering mechanism is designed to avoid copying and re-assembly
|
||||
of the packet data (ie, making the packet segmentation process a
|
||||
logical one); the header can be generated directly from incoming
|
||||
packet data. The encoder buffers packet data until it finishes a
|
||||
complete page at which point it writes the header followed by the
|
||||
buffered packet segments.</p>
|
||||
|
||||
<h4>capture_pattern</h4>
|
||||
|
||||
<p>A header begins with a capture pattern that simplifies identifying
|
||||
pages; once the decoder has found the capture pattern it can do a more
|
||||
intensive job of verifying that it has in fact found a page boundary
|
||||
(as opposed to an inadvertent coincidence in the byte stream).</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
0 0x4f 'O'
|
||||
1 0x67 'g'
|
||||
2 0x67 'g'
|
||||
3 0x53 'S'
|
||||
</tt></pre>
|
||||
|
||||
<h4>stream_structure_version</h4>
|
||||
|
||||
<p>The capture pattern is followed by the stream structure revision:</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
4 0x00
|
||||
</tt></pre>
|
||||
|
||||
<h4>header_type_flag</h4>
|
||||
|
||||
<p>The header type flag identifies this page's context in the bitstream:</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
5 bitflags: 0x01: unset = fresh packet
|
||||
set = continued packet
|
||||
0x02: unset = not first page of logical bitstream
|
||||
set = first page of logical bitstream (bos)
|
||||
0x04: unset = not last page of logical bitstream
|
||||
set = last page of logical bitstream (eos)
|
||||
</tt></pre>
|
||||
|
||||
<h4>absolute granule position</h4>
|
||||
|
||||
<p>(This is packed in the same way the rest of Ogg data is packed; LSb
|
||||
of LSB first. Note that the 'position' data specifies a 'sample'
|
||||
number (eg, in a CD quality sample is four octets, 16 bits for left
|
||||
and 16 bits for right; in video it would likely be the frame number.
|
||||
It is up to the specific codec in use to define the semantic meaning
|
||||
of the granule position value). The position specified is the total
|
||||
samples encoded after including all packets finished on this page
|
||||
(packets begun on this page but continuing on to the next page do not
|
||||
count). The rationale here is that the position specified in the
|
||||
frame header of the last page tells how long the data coded by the
|
||||
bitstream is. A truncated stream will still return the proper number
|
||||
of samples that can be decoded fully.</p>
|
||||
|
||||
<p>A special value of '-1' (in two's complement) indicates that no packets
|
||||
finish on this page.</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
6 0xXX LSB
|
||||
7 0xXX
|
||||
8 0xXX
|
||||
9 0xXX
|
||||
10 0xXX
|
||||
11 0xXX
|
||||
12 0xXX
|
||||
13 0xXX MSB
|
||||
</tt></pre>
|
||||
|
||||
<h4>stream serial number</h4>
|
||||
|
||||
<p>Ogg allows for separate logical bitstreams to be mixed at page
|
||||
granularity in a physical bitstream. The most common case would be
|
||||
sequential arrangement, but it is possible to interleave pages for
|
||||
two separate bitstreams to be decoded concurrently. The serial
|
||||
number is the means by which pages physical pages are associated with
|
||||
a particular logical stream. Each logical stream must have a unique
|
||||
serial number within a physical stream:</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
14 0xXX LSB
|
||||
15 0xXX
|
||||
16 0xXX
|
||||
17 0xXX MSB
|
||||
</tt></pre>
|
||||
|
||||
<h4>page sequence no</h4>
|
||||
|
||||
<p>Page counter; lets us know if a page is lost (useful where packets
|
||||
span page boundaries).</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
18 0xXX LSB
|
||||
19 0xXX
|
||||
20 0xXX
|
||||
21 0xXX MSB
|
||||
</tt></pre>
|
||||
|
||||
<h4>page checksum</h4>
|
||||
|
||||
<p>32 bit CRC value (direct algorithm, initial val and final XOR = 0,
|
||||
generator polynomial=0x04c11db7). The value is computed over the
|
||||
entire header (with the CRC field in the header set to zero) and then
|
||||
continued over the page. The CRC field is then filled with the
|
||||
computed value.</p>
|
||||
|
||||
<p>(A thorough discussion of CRC algorithms can be found in <a
|
||||
href="http://www.ross.net/crc/download/crc_v3.txt">"A
|
||||
Painless Guide to CRC Error Detection Algorithms"</a> by Ross
|
||||
Williams <a href="mailto:ross@ross.net">ross@ross.net</a>.)</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
22 0xXX LSB
|
||||
23 0xXX
|
||||
24 0xXX
|
||||
25 0xXX MSB
|
||||
</tt></pre>
|
||||
|
||||
<h4>page_segments</h4>
|
||||
|
||||
<p>The number of segment entries to appear in the segment table. The
|
||||
maximum number of 255 segments (255 bytes each) sets the maximum
|
||||
possible physical page size at 65307 bytes or just under 64kB (thus
|
||||
we know that a header corrupted so as destroy sizing/alignment
|
||||
information will not cause a runaway bitstream. We'll read in the
|
||||
page according to the corrupted size information that's guaranteed to
|
||||
be a reasonable size regardless, notice the checksum mismatch, drop
|
||||
sync and then look for recapture).</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
26 0x00-0xff (0-255)
|
||||
</tt></pre>
|
||||
|
||||
<h4>segment_table (containing packet lacing values)</h4>
|
||||
|
||||
<p>The lacing values for each packet segment physically appearing in
|
||||
this page are listed in contiguous order.</p>
|
||||
|
||||
<pre><tt>
|
||||
byte value
|
||||
|
||||
27 0x00-0xff (0-255)
|
||||
[...]
|
||||
n 0x00-0xff (0-255, n=page_segments+26)
|
||||
</tt></pre>
|
||||
|
||||
<p>Total page size is calculated directly from the known header size and
|
||||
lacing values in the segment table. Packet data segments follow
|
||||
immediately after the header.</p>
|
||||
|
||||
<p>Page headers typically impose a flat .25-.5% space overhead assuming
|
||||
nominal ~8k page sizes. The segmentation table needed for exact
|
||||
packet recovery in the streaming layer adds approximately .5-1%
|
||||
nominal assuming expected encoder behavior in the 44.1kHz, 128kbps
|
||||
stereo encodings.</p>
|
||||
|
||||
<div id="copyright">
|
||||
The Xiph Fish Logo is a
|
||||
trademark (™) of Xiph.Org.<br/>
|
||||
|
||||
These pages © 1994 - 2005 Xiph.Org. All rights reserved.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
|
||||
<title>Ogg Documentation</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0 18px 0 18px;
|
||||
padding-bottom: 30px;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
color: #333333;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #3366cc;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#xiphlogo {
|
||||
margin: 30px 0 16px 0;
|
||||
}
|
||||
|
||||
#content p {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h1, h1 a, h2, h2 a, h3, h3 a {
|
||||
font-weight: bold;
|
||||
color: #ff9900;
|
||||
margin: 1.3em 0 8px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
li {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
margin-top: 30px;
|
||||
line-height: 1.5em;
|
||||
text-align: center;
|
||||
font-size: .8em;
|
||||
color: #888888;
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="xiphlogo">
|
||||
<a href="http://www.xiph.org/"><img src="fish_xiph_org.png" alt="Fish Logo and Xiph.org"/></a>
|
||||
</div>
|
||||
|
||||
<h1>Ogg Documentation</h1>
|
||||
|
||||
<h2>Ogg programming documentation</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="libogg/index.html">Programming with ogg</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Ogg bitstream documentation</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="oggstream.html">Ogg bitstream overview</a></li>
|
||||
<li><a href="framing.html">Ogg bitstream framing</a></li>
|
||||
<li><a href="ogg-multiplex.html">Ogg multi-stream multiplexing</a></li>
|
||||
<li><a href="skeleton.html">The Ogg Skeleton Metadata Bitstream</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>RFC documentation</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="rfc3533.txt">rfc3533: The Ogg Encapsulation Format Version 0</a></li>
|
||||
<li><a href="rfc5334.txt">rfc5334: Ogg Media Types</a></li>
|
||||
</ul>
|
||||
|
||||
<div id="copyright">
|
||||
The Xiph Fish Logo is a
|
||||
trademark (™) of Xiph.Org.<br/>
|
||||
|
||||
These pages © 1994 - 2010 Xiph.Org. All rights reserved.
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
apidocdir = $(htmldir)/libogg
|
||||
|
||||
dist_apidoc_DATA = bitpacking.html datastructures.html decoding.html encoding.html\
|
||||
general.html index.html ogg_iovec_t.html ogg_packet.html ogg_packet_clear.html\
|
||||
ogg_page.html ogg_page_bos.html ogg_page_checksum_set.html\
|
||||
ogg_page_continued.html ogg_page_eos.html ogg_page_granulepos.html\
|
||||
ogg_page_packets.html ogg_page_pageno.html ogg_page_serialno.html\
|
||||
ogg_page_version.html ogg_stream_check.html ogg_stream_clear.html ogg_stream_destroy.html\
|
||||
ogg_stream_eos.html ogg_stream_flush.html ogg_stream_flush_fill.html ogg_stream_init.html\
|
||||
ogg_stream_iovecin.html ogg_stream_packetin.html ogg_stream_packetout.html\
|
||||
ogg_stream_packetpeek.html ogg_stream_pagein.html\
|
||||
ogg_stream_pageout.html ogg_stream_pageout_fill.html ogg_stream_reset.html\
|
||||
ogg_stream_reset_serialno.html ogg_stream_state.html\
|
||||
ogg_sync_buffer.html ogg_sync_check.html ogg_sync_clear.html ogg_sync_destroy.html\
|
||||
ogg_sync_init.html ogg_sync_pageout.html ogg_sync_pageseek.html\
|
||||
ogg_sync_reset.html ogg_sync_state.html ogg_sync_wrote.html\
|
||||
oggpack_adv.html oggpack_adv1.html oggpack_bits.html\
|
||||
oggpack_buffer.html oggpack_bytes.html oggpack_get_buffer.html\
|
||||
oggpack_look.html oggpack_look1.html oggpack_read.html\
|
||||
oggpack_read1.html oggpack_readinit.html oggpack_reset.html\
|
||||
oggpack_write.html oggpack_writealign.html oggpack_writecheck.html oggpack_writeclear.html\
|
||||
oggpack_writecopy.html oggpack_writeinit.html oggpack_writetrunc.html\
|
||||
overview.html reference.html style.css
|
||||
|
||||
update-doc-version:
|
||||
@YEAR=$$(date +%Y); DAY=$$(date +%Y%m%d); \
|
||||
for f in $(srcdir)/*.html; do \
|
||||
sed -e "s/2000-[0-9]\{4\} Xiph.Org/2000-$$YEAR Xiph.Org/g" \
|
||||
-e "s/libogg release [0-9. -]\+/libogg release $(VERSION) - $$DAY/g"\
|
||||
< $$f > $$f.tmp; \
|
||||
if diff -q $$f $$f.tmp > /dev/null; then \
|
||||
rm $$f.tmp; \
|
||||
else \
|
||||
mv $$f.tmp $$f; \
|
||||
fi; \
|
||||
done;
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - Bitpacking Functions</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>Bitpacking Functions</h1>
|
||||
<p>Libogg contains a basic bitpacking library that is useful for manipulating data within a buffer.
|
||||
<p>
|
||||
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
|
||||
<p>
|
||||
|
||||
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td><b>function</b></td>
|
||||
<td><b>purpose</b></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_writeinit.html">oggpack_writeinit</a></td>
|
||||
<td>Initializes a buffer for writing using this bitpacking library.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_writecheck.html">oggpack_writecheck</a></td>
|
||||
<td>Asynchronously checks error status of bitpacker write buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_reset.html">oggpack_reset</a></td>
|
||||
<td>Clears and resets the buffer to the initial position.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_writeclear.html">oggpack_writeclear</a></td>
|
||||
<td>Frees the memory used by the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_readinit.html">oggpack_readinit</a></td>
|
||||
<td>Initializes a buffer for reading using this bitpacking library.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_write.html">oggpack_write</a></td>
|
||||
<td>Writes bytes to the specified location within the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_look.html">oggpack_look</a></td>
|
||||
<td>Look at a specified number of bits, <=32, without advancing the location pointer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_look1.html">oggpack_look1</a></td>
|
||||
<td>Looks at one bit without advancing the location pointer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_adv.html">oggpack_adv</a></td>
|
||||
<td>Advances the location pointer by a specified number of bits.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_adv1.html">oggpack_adv1</a></td>
|
||||
<td>Advances the location pointer by one bit.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_read.html">oggpack_read</a></td>
|
||||
<td>Reads a specified number of bits from the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_read1.html">oggpack_read1</a></td>
|
||||
<td>Reads one bit from the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_bytes.html">oggpack_bytes</a></td>
|
||||
<td>Returns the total number of bytes contained within the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_bits.html">oggpack_bits</a></td>
|
||||
<td>Returns the total number of bits contained within the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="oggpack_get_buffer.html">oggpack_get_buffer</a></td>
|
||||
<td>Returns a pointer to the buffer encapsulated within the <a href="oggpack_buffer.html">oggpack_buffer</a> struct.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - Base Data Structures</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>Base Data Structures</h1>
|
||||
<p>Libogg uses several data structures to hold data and state information.
|
||||
<p>
|
||||
All the <b>libogg</b> specific data structures are declared in "ogg/ogg.h".
|
||||
<p>
|
||||
|
||||
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td><b>datatype</b></td>
|
||||
<td><b>purpose</b></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page.html">ogg_page</a></td>
|
||||
<td>This structure encapsulates data into one ogg bitstream page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_state.html">ogg_stream_state</a></td>
|
||||
<td>This structure contains current encode/decode data for a logical bitstream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_packet.html">ogg_packet</a></td>
|
||||
<td>This structure encapsulates the data and metadata for a single Ogg packet.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_state.html">ogg_sync_state</a></td>
|
||||
<td>Contains bitstream synchronization information.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,104 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - Decoding</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>Decoding</h1>
|
||||
<p>Libogg contains a set of functions used in the decoding process.
|
||||
<p>
|
||||
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
|
||||
<p>
|
||||
<p>Decoding is based around the ogg synchronization layer. The <a href="ogg_sync_state.html">ogg_sync_state</a> struct coordinates between incoming data and the decoder. We read data into the synchronization layer, submit the data to the stream, and output raw packets to the decoder.
|
||||
<p>Decoding through the Ogg layer follows a specific logical sequence. A read loop follows these logical steps:
|
||||
<ul>
|
||||
<li>Expose a buffer using <a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>.
|
||||
<li>Read data into the buffer, using fread() or a similar function.
|
||||
<li>Call <a href="ogg_sync_wrote.html">ogg_sync_wrote()</a> to tell the synchronization layer how many bytes you wrote into the buffer.
|
||||
<li>Write out the data using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a>.
|
||||
<li>Submit the completed page to the streaming layer with <a href="ogg_stream_pagein.html">ogg_stream_pagein</a>.
|
||||
<li>Output a packet of data to the codec-specific decoding layer using <a href="ogg_stream_packetout.html">ogg_stream_packetout</a>.
|
||||
</ul>
|
||||
<p>In practice, streams are more complex, and Ogg also must handle headers, incomplete or dropped pages, and other errors in input.
|
||||
<br><br>
|
||||
|
||||
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td><b>function</b></td>
|
||||
<td><b>purpose</b></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_init.html">ogg_sync_init</a></td>
|
||||
<td>Initializes an Ogg bitstream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_clear.html">ogg_sync_clear</a></td>
|
||||
<td>Clears the status information from the synchronization struct.<td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_reset.html">ogg_sync_reset</a></td>
|
||||
<td>Resets the synchronization status to initial values.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_destroy.html">ogg_sync_destroy</a></td>
|
||||
<td>Frees the synchronization struct.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_check.html">ogg_sync_check</a></td>
|
||||
<td>Check for asynchronous errors.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_buffer.html">ogg_sync_buffer</a></td>
|
||||
<td>Exposes a buffer from the synchronization layer in order to read data.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_wrote.html">ogg_sync_wrote</a></td>
|
||||
<td>Tells the synchronization layer how many bytes were written into the buffer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_pageseek.html">ogg_sync_pageseek</a></td>
|
||||
<td>Finds the borders of pages and resynchronizes the stream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_sync_pageout.html">ogg_sync_pageout</a></td>
|
||||
<td>Outputs a page from the synchronization layer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_pagein.html">ogg_stream_pagein</a></td>
|
||||
<td>Submits a complete page to the stream layer.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_packetout.html">ogg_stream_packetout</a></td>
|
||||
<td>Outputs a packet to the codec-specific decoding engine.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_packetpeek.html">ogg_stream_packetpeek</a></td>
|
||||
<td>Provides access to the next packet in the bitstream without
|
||||
advancing decoding.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,76 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - Encoding</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>Encoding</h1>
|
||||
<p>Libogg contains a set of functions used in the encoding process.
|
||||
<p>
|
||||
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
|
||||
<p>
|
||||
<p>When encoding, the encoding engine will output raw packets which must be placed into an Ogg bitstream.
|
||||
<p>Raw packets are inserted into the stream, and an <a href="ogg_page.html">ogg_page</a> is output when enough packets have been written to create a full page. The pages output are pointers to buffered packet segments, and can then be written out and saved as an ogg stream.
|
||||
<p>There are a couple of basic steps:
|
||||
<ul>
|
||||
<li>Use the encoding engine to produce a raw packet of data.
|
||||
<li>Call <a href="ogg_stream_packetin.html">ogg_stream_packetin</a> to submit a raw packet to the stream.
|
||||
<li>Use <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> to output a page, if enough data has been submitted. Otherwise, continue submitting data.
|
||||
</ul>
|
||||
<br><br>
|
||||
|
||||
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td><b>function</b></td>
|
||||
<td><b>purpose</b></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_packetin.html">ogg_stream_packetin</a></td>
|
||||
<td>Submits a raw packet to the streaming layer, so that it can be formed into a page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_iovecin.html">ogg_stream_iovecin</a></td>
|
||||
<td>iovec version of ogg_stream_packetin() above.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_pageout.html">ogg_stream_pageout</a></td>
|
||||
<td>Outputs a completed page if the stream contains enough packets to form a full page.<td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a></td>
|
||||
<td>Similar to ogg_stream_pageout(), but specifies a page spill threshold in bytes.
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_flush.html">ogg_stream_flush</a></td>
|
||||
<td>Forces any remaining packets in the stream to be returned as a page of any size.<td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_flush_fill.html">ogg_stream_flush_fill</a></td>
|
||||
<td>Similar to ogg_stream_flush(), but specifies a page spill threshold in bytes.<td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - General Functions</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>General Functions</h1>
|
||||
<p>Libogg contains several functions which are generally useful when using Ogg streaming, whether encoding or decoding.
|
||||
<p>
|
||||
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
|
||||
<p>
|
||||
<p>These functions can be used to manipulate some of the basic elements of Ogg - streams and pages. Streams and pages are important during both the encode and decode process.
|
||||
<br>
|
||||
|
||||
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td><b>function</b></td>
|
||||
<td><b>purpose</b></td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_init.html">ogg_stream_init</a></td>
|
||||
<td>Initializes an Ogg bitstream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_clear.html">ogg_stream_clear</a></td>
|
||||
<td>Clears the storage within the Ogg stream, but does not free the stream itself.<td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_reset.html">ogg_stream_reset</a></td>
|
||||
<td>Resets the stream status to its initial position.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_destroy.html">ogg_stream_destroy</a></td>
|
||||
<td>Frees the entire Ogg stream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_check.html">ogg_stream_check</a></td>
|
||||
<td>Check for asynchronous errors.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_stream_eos.html">ogg_stream_eos</a></td>
|
||||
<td>Indicates whether we are at the end of the stream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_version.html">ogg_page_version</a></td>
|
||||
<td>Returns the version of ogg_page that this stream/page uses</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_continued.html">ogg_page_continued</a></td>
|
||||
<td>Indicates if the current page contains a continued packet from the last page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_packets.html">ogg_page_packets</a></td>
|
||||
<td>Indicates the number of packets contained in a page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_bos.html">ogg_page_bos</a></td>
|
||||
<td>Indicates if the current page is the beginning of the stream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_eos.html">ogg_page_eos</a></td>
|
||||
<td>Indicates if the current page is the end of the stream.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_granulepos.html">ogg_page_granulepos</a></td>
|
||||
<td>Returns the precise playback location of this page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_serialno.html">ogg_page_serialno</a></td>
|
||||
<td>Returns the unique serial number of the logical bitstream associated with this page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_pageno.html">ogg_page_pageno</a></td>
|
||||
<td>Returns the sequential page number for this page.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_packet_clear.html">ogg_packet_clear</a></td>
|
||||
<td>Clears the ogg_packet structure.</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<td><a href="ogg_page_checksum_set.html">ogg_page_checksum_set</a></td>
|
||||
<td>Checksums an ogg_page.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - Documentation</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>Libogg Documentation</h1>
|
||||
|
||||
<p>
|
||||
Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams.
|
||||
<p>This document explains how to use the libogg API in detail.
|
||||
<p>
|
||||
<a href="overview.html">libogg api overview</a><br>
|
||||
<a href="reference.html">libogg api reference</a><br>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - datatype - ogg_iovec_t</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_iovec_t</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h"</i></p>
|
||||
|
||||
<p>
|
||||
The ogg_iovec_t struct encapsulates a length-encoded buffer. An array
|
||||
of ogg_iovec_t is used to pass a list of buffers to functions that
|
||||
accept data in ogg_iovec_t* form.
|
||||
<p>
|
||||
|
||||
<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
typedef struct {
|
||||
void *iov_base;
|
||||
size_t iov_len;
|
||||
} ogg_iovec_t;
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Relevant Struct Members</h3>
|
||||
<dl>
|
||||
<dt><i>iov_base</i></dt>
|
||||
<dd>Pointer to the buffer data.</dd>
|
||||
<dt><i>iov_len</i></dt>
|
||||
<dd>Length of buffer data in bytes.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - datatype - ogg_packet</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_packet</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h"</i></p>
|
||||
|
||||
<p>
|
||||
The ogg_packet struct encapsulates the data for a single raw packet of data
|
||||
and is used to transfer data between the ogg framing layer and the handling codec.
|
||||
<p>
|
||||
|
||||
<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
typedef struct {
|
||||
unsigned char *packet;
|
||||
long bytes;
|
||||
long b_o_s;
|
||||
long e_o_s;
|
||||
|
||||
ogg_int64_t granulepos;
|
||||
ogg_int64_t packetno;
|
||||
|
||||
} ogg_packet;
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Relevant Struct Members</h3>
|
||||
<dl>
|
||||
<dt><i>packet</i></dt>
|
||||
<dd>Pointer to the packet's data. This is treated as an opaque type by the ogg layer.</dd>
|
||||
<dt><i>bytes</i></dt>
|
||||
<dd>Indicates the size of the packet data in bytes. Packets can be of arbitrary size.</dd>
|
||||
<dt><i>b_o_s</i></dt>
|
||||
<dd>Flag indicating whether this packet begins a logical bitstream. <tt>1</tt> indicates this is the first packet, <tt>0</tt> indicates any other position in the stream.</dd>
|
||||
<dt><i>e_o_s</i></dt>
|
||||
<dd>Flag indicating whether this packet ends a bitstream. <tt>1</tt> indicates the last packet, <tt>0</tt> indicates any other position in the stream.</dd>
|
||||
<dt><i>granulepos</i></dt>
|
||||
<dd>A number indicating the position of this packet in the decoded data. This is the last sample, frame or other unit of information ('granule') that can be completely decoded from this packet.</dd>
|
||||
<dt><i>packetno</i></dt>
|
||||
<dd>Sequential number of this packet in the ogg bitstream.<dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_packet_clear</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_packet_clear</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function clears the memory used by the <a href="ogg_packet.html">ogg_packet</a> struct,
|
||||
but does not free the structure itself.
|
||||
It unconditionally frees the <i>packet</i> data buffer,
|
||||
then it zeros all structure members.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
void ogg_packet_clear(ogg_packet *op);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>op</i></dt>
|
||||
<dd>Pointer to the ogg_packet struct to be cleared.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
None.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - datatype - ogg_page</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h"</i></p>
|
||||
|
||||
<p>
|
||||
The ogg_page struct encapsulates the data for an Ogg page.
|
||||
<p>
|
||||
Ogg pages are the fundamental unit of framing and interleave in an ogg bitstream.
|
||||
They are made up of packet segments of 255 bytes each. There can be as many as
|
||||
255 packet segments per page, for a maximum page size of a little under 64 kB.
|
||||
This is not a practical limitation as the segments can be joined across
|
||||
page boundaries allowing packets of arbitrary size. In practice many
|
||||
applications will not completely fill all pages because they flush the
|
||||
accumulated packets periodically order to bound latency more tightly.
|
||||
<p>
|
||||
<p>For a complete description of ogg pages and headers, please refer to the <a href="../framing.html">framing document</a>.
|
||||
|
||||
<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
typedef struct {
|
||||
unsigned char *header;
|
||||
long header_len;
|
||||
unsigned char *body;
|
||||
long body_len;
|
||||
} ogg_page;
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Relevant Struct Members</h3>
|
||||
<dl>
|
||||
<dt><i>header</i></dt>
|
||||
<dd>Pointer to the page header for this page. The exact contents of this header are defined in the framing spec document.</dd>
|
||||
<dt><i>header_len</i></dt>
|
||||
<dd>Length of the page header in bytes.</a>
|
||||
<dt><i>body</i></dt>
|
||||
<dd>Pointer to the data for this page.</dd>
|
||||
<dt><i>body_len</i></dt>
|
||||
<dd>Length of the body data in bytes.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_bos</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_bos</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Indicates whether this page is at the beginning of the logical bitstream.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_bos(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
greater than 0 if this page is the beginning of a bitstream.</li>
|
||||
<li>
|
||||
0 if this page is from any other location in the stream.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_checksum_set</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_checksum_set</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Checksums an ogg_page.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_checksum_set(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to an ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
None.
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_version</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_continued</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Indicates whether this page contains packet data which has been continued from the previous page.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_continued(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
1 if this page contains packet data continued from the last page.</li>
|
||||
<li>
|
||||
0 if this page does not contain continued data.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_eos</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_eos</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Indicates whether this page is at the end of the logical bitstream.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_eos(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
greater than zero if this page contains the end of a bitstream.</li>
|
||||
<li>
|
||||
0 if this page is from any other location in the stream.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_granulepos</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_granulepos</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Returns the exact granular position of the packet data contained at the end of this page.
|
||||
<p>This is useful for tracking location when seeking or decoding.
|
||||
<p>For example, in audio codecs this position is the pcm sample number and in video this is the frame number.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
ogg_int64_t ogg_page_granulepos(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
<i>n</i> is the specific last granular position of the decoded data contained in the page.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_packets</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_packets</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Returns the number of packets that are completed on this page. If the
|
||||
leading packet is begun on a previous page, but ends on this page, it's
|
||||
counted.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_packets(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
If a page consists of a packet begun on a previous page, and a new packet
|
||||
begun (but not completed) on this page, the return will be:<br>
|
||||
<br>
|
||||
ogg_page_packets(page) will return 1,<br>
|
||||
ogg_page_continued(paged) will return non-zero.<br>
|
||||
<br><br>
|
||||
If a page happens to be a single packet that was begun on a previous page, and
|
||||
spans to the next page (in the case of a three or more page packet), the
|
||||
return will be:<br>
|
||||
<br>
|
||||
ogg_page_packets(page) will return 0,<br>
|
||||
ogg_page_continued(page) will return non-zero.<br>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_pageno</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_pageno</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Returns the sequential page number.
|
||||
<p>This is useful for ordering pages or determining when pages have been lost.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
long ogg_page_pageno(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
<i>n</i> is the page number for this page.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_serialno</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_serialno</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>Returns the unique serial number for the logical bitstream of this page. Each page contains the serial number for the logical bitstream that it belongs to.
|
||||
<p>
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_serialno(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
<i>n</i> is the serial number for this page.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_page_version</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_page_version</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function returns the version of ogg_page used in this page.
|
||||
<p>In current versions of libogg, all ogg_page structs have the same version, so 0 should always be returned.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_page_version(ogg_page *og);
|
||||
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to the current ogg_page struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
<i>n</i> is the version number. In the current version of Ogg, the version number is always 0. Nonzero return values indicate an error in page encoding.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_check</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_check</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to check the error or readiness condition of an <a href="ogg_stream_state.html">ogg_stream_state</a> structure.
|
||||
<p>It is safe practice to ignore unrecoverable errors (such as an internal error caused by a malloc() failure) returned by ogg stream synchronization calls. Should an
|
||||
internal error occur, the <a href="ogg_stream_state.html">ogg_stream_state</a> structure will be cleared (equivalent to a
|
||||
call to
|
||||
<a href="ogg_stream_clear.html">ogg_stream_clear</a>) and subsequent calls
|
||||
using this <a href="ogg_stream_state.html">ogg_stream_state</a> will be
|
||||
noops. Error detection is then handled via a single call to
|
||||
ogg_stream_check at the end of the operational block. </p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_check(<a href="ogg_stream_state.html">ogg_stream_state</a> *os);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is returned if the <a href="ogg_stream_state.html">ogg_stream_state</a> structure is initialized and ready.</li>
|
||||
<li>
|
||||
nonzero is returned if the structure was never initialized, or if an unrecoverable internal error occurred in a previous call using the passed in <a href="ogg_stream_state.html">ogg_stream_state</a> struct.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_clear</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_clear</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function clears and frees the internal memory used by the <a href="ogg_stream_state.html">ogg_stream_state</a> struct, but does not free the structure itself. It is safe to call ogg_stream_clear on the same structure more than once.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_clear(ogg_stream_state *os);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the ogg_stream_state struct to be cleared.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_destroy</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_destroy</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function frees the internal memory used by
|
||||
the <a href="ogg_stream_state.html">ogg_stream_state</a> struct as
|
||||
well as the structure itself.
|
||||
|
||||
<p>This should be called when you are done working with an ogg stream.
|
||||
It can also be called to make sure that the struct does not exist.</p>
|
||||
|
||||
<p>It calls free() on its argument, so if the ogg_stream_state
|
||||
is not malloc()'d or will otherwise be freed by your own code, use
|
||||
<a href="ogg_stream_clear.html">ogg_stream_clear</a> instead.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_destroy(ogg_stream_state *os);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the ogg_stream_state struct to be destroyed.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_eos</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_eos</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function indicates whether we have reached the end of the stream or not.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_eos(ogg_stream_state *os);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the current ogg_stream_state struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>1 if we are at the end of the stream or an internal error occurred.</li>
|
||||
<li>
|
||||
0 if we have not yet reached the end of the stream.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_flush</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_flush</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function checks for remaining packets inside the stream and forces remaining packets into a page, regardless of the size of the page.
|
||||
<p>This should only be used when you want to flush an undersized page from the middle of the stream. Otherwise, <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> or <a href="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a> should always be used.
|
||||
<p>This function can also be used to verify that all packets have been flushed. If the return value is 0, all packets have been placed into a page. Like <a href="ogg_stream_pageout.html">ogg_stream_pageout</a>, it should generally be called in a loop until available packet data has been flushes, since even a single packet may span multiple pages.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_flush(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to a page of data. The remaining packets in the stream will be placed into this page, if any remain.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>0 means that all packet data has already been flushed into pages, and there are no packets to put into the page. 0 is also returned in the case of an <a href="ogg_stream_state.html">ogg_stream_state</a> that has been cleared explicitly or implicitly due to an internal error.</li>
|
||||
<li>
|
||||
Nonzero means that remaining packets have successfully been flushed into the page.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_flush_fill</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_flush_fill</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function flushes available packets into pages, similar to
|
||||
<a href="ogg_stream_flush.html">ogg_stream_flush()</a>, but
|
||||
allows applications to explicitly request a specific page spill
|
||||
size.</p>
|
||||
|
||||
<p>This function checks for remaining packets inside the stream and forces remaining packets into pages of approximately the requested size.
|
||||
This should be used when you want to flush all remaining data from a stream. <a href="ogg_stream_flush.html">ogg_stream_flush</a> may be used instead if a particular page size isn't important.
|
||||
<p>This function can be used to verify that all packets have been flushed. If the return value is 0, all packets have been placed into a page. Generally speaking, it should be called in a loop until all packets are flushed, since even a single packet may span multiple pages.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_flush_fill(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og, int fillbytes);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to a page of data. The remaining packets in the stream will be placed into this page, if any remain.
|
||||
<dt><i>fillbytes</i></dt>
|
||||
<dd>Packet data watermark in bytes.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>0 means that all packet data has already been flushed into pages, and there are no packets to put into the page. 0 is also returned in the case of an <a href="ogg_stream_state.html">ogg_stream_state</a> that has been cleared explicitly or implicitly due to an internal error.</li>
|
||||
<li>
|
||||
Nonzero means that remaining packets have successfully been flushed into the page.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,66 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_init</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_init</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to initialize an <a href="ogg_stream_state.html">ogg_stream_state</a> struct and allocates appropriate memory in preparation for encoding or decoding.
|
||||
<p>It also assigns the stream a given serial number.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_init(<a href="ogg_stream_state.html">ogg_stream_state</a> *os,int serialno);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the ogg_stream_state struct that we will be initializing.</dd>
|
||||
<dt><i>serialno</i></dt>
|
||||
<dd>Serial number that we will attach to this stream.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 if successful</li>
|
||||
<li>
|
||||
-1 if unsuccessful.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,80 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_iovecin</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_iovecin</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function submits packet data (in the form of
|
||||
an array of <a href="ogg_iovec_t.html">ogg_iovec_t</a>, rather than using
|
||||
an <a href="ogg_packet.html">ogg_packet</a> structure) to the
|
||||
bitstream for page encapsulation. After this is called, more packets
|
||||
can be submitted, or pages can be written out.</p>
|
||||
|
||||
<p>In a typical encoding situation, this should be used after filling a
|
||||
packet with data.
|
||||
The data in the packet is copied into the internal storage managed by
|
||||
the <a href="ogg_stream_state.html">ogg_stream_state</a>, so the caller
|
||||
is free to alter the contents of <i>os</i> after this call has returned.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_iovecin(ogg_stream_state *os, ogg_iovec_t *iov, int count, long e_o_s, ogg_int64_t granulepos);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct.</dd>
|
||||
<dt><i>iov</i></dt>
|
||||
<dd>Length-encoded buffers held in an array of <a href="ogg_iovec_t.html">ogg_iovec_t</a>.
|
||||
<dt><i>count</i></dt>
|
||||
<dd>Length of the iov array.
|
||||
<dt><i>e_o_s</i></dt>
|
||||
<dd>End of stream flag, analogous to the e_o_s field in an <a href="ogg_packet.html">ogg_packet</a>.
|
||||
<dt><i>granulepos</i></dt>
|
||||
<dd>Granule position value, analogous to the granpos field in an <a href="ogg_packet.html">ogg_packet</a>.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 returned on success. -1 returned in the event of internal error.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_packetin</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_packetin</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function submits a packet to the bitstream for page
|
||||
encapsulation. After this is called, more packets can be submitted,
|
||||
or pages can be written out.</p>
|
||||
|
||||
<p>In a typical encoding situation, this should be used after filling a
|
||||
packet with data.
|
||||
The data in the packet is copied into the internal storage managed by
|
||||
the <a href="ogg_stream_state.html">ogg_stream_state</a>, so the caller
|
||||
is free to alter the contents of <i>op</i> after this call has returned.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct.</dd>
|
||||
<dt><i>op</i></dt>
|
||||
<dd>Pointer to the packet we are putting into the bitstream.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 returned on success. -1 returned in the event of internal error.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_packetout</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_packetout</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function assembles a data packet for output to the codec
|
||||
decoding engine. The data has already been submitted to the
|
||||
<a href="ogg_stream_state.html">ogg_stream_state</a> and broken
|
||||
into segments. Each successive call returns the next complete packet
|
||||
built from those segments.</p>
|
||||
|
||||
<p>In a typical decoding situation, this should be used after calling
|
||||
<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to submit a
|
||||
page of data to the bitstream. If the function returns 0, more data is
|
||||
needed and another page should be submitted. A non-zero return value
|
||||
indicates successful return of a packet.</p>
|
||||
|
||||
<p>The <i>op</i> is filled in with pointers to memory managed by
|
||||
the stream state and is only valid until the next call. The client
|
||||
must copy the packet data if a longer lifetime is required.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_packetout(ogg_stream_state *os,ogg_packet *op);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a
|
||||
href="ogg_stream_state.html">ogg_stream_state</a> struct. Before this function is called, an <a href="ogg_page.html">ogg_page</a> should be submitted to the stream using <a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
|
||||
<dt><i>op</i></dt>
|
||||
<dd>Pointer to the packet to be filled in with pointers to the new data.
|
||||
This will typically be submitted to a codec for decode after this
|
||||
function is called. The pointers are only valid until the next call
|
||||
on this stream state.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li>-1 if we are out of sync and there is a gap in the data. This is usually a recoverable error and subsequent calls to ogg_stream_packetout are likely to succeed. <i>op</i> has not been updated.</li>
|
||||
<li>0 if there is insufficient data available to complete a packet, or on unrecoverable internal error occurred. <i>op</i> has not been updated.
|
||||
<li>1 if a packet was assembled normally. <i>op</i> contains the next packet from the stream.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
<br><br>
|
||||
|
||||
<hr noshade>
|
||||
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_packetpeek</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_packetpeek</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function attempts to assemble a raw data packet and returns
|
||||
it without advancing decoding.</p>
|
||||
|
||||
<p>In a typical situation, this would be called
|
||||
speculatively after <a
|
||||
href="ogg_stream_pagein.html">ogg_stream_pagein()</a> to check
|
||||
the packet contents before handing it off to a codec for
|
||||
decompression. To advance page decoding and remove
|
||||
the packet from the sync structure, call
|
||||
<a href="ogg_stream_packetout.html">ogg_stream_packetout()</a>.</p>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_packetpeek(ogg_stream_state *os,ogg_packet *op);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared
|
||||
<a href="ogg_stream_state.html">ogg_stream_state</a> struct. Before this
|
||||
function is called, an <a href="ogg_page.html">ogg_page</a> should be
|
||||
submitted to the stream using
|
||||
<a href="ogg_stream_pagein.html">ogg_stream_pagein()</a>.</dd>
|
||||
<dt><i>op</i></dt>
|
||||
<dd>Pointer to the next packet available in the bitstream, if
|
||||
any. A NULL value may be passed in the case of a simple "is there a
|
||||
packet?" check.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li>-1 if there's no packet available due to lost sync or a hole in the data.</li>
|
||||
<li>0 if there is insufficient data available to complete a packet, or on unrecoverable internal error occurred.</li>
|
||||
<li>1 if a packet is available.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
<hr noshade>
|
||||
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_pagein</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_pagein</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function adds a complete page to the bitstream.
|
||||
<p>In a typical decoding situation, this function would be called after using <a href="ogg_sync_pageout.html">ogg_sync_pageout</a> to create a valid <a href="ogg_page.html">ogg_page</a> struct.
|
||||
<p>Internally, this function breaks the page into packet segments in preparation for outputting a valid packet to the codec decoding layer.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_pagein(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream_state.html">ogg_stream_state</a> struct, which represents the current logical bitstream.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to a page of data. The data inside this page is being submitted to the streaming layer in order to be allocated into packets.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>-1 indicates failure. This means that the serial number of the page did not match the serial number of the bitstream, the page version was incorrect, or an internal error occurred.</li>
|
||||
<li>
|
||||
0 means that the page was successfully submitted to the bitstream.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_pageout</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_pageout</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function forms packets into pages.</p>
|
||||
|
||||
<p>In a typical encoding situation, this would be called after using <a
|
||||
href="ogg_stream_packetin.html">ogg_stream_packetin()</a> to submit
|
||||
data packets to the bitstream. Internally, this function assembles
|
||||
the accumulated packet bodies into an Ogg page suitable for writing
|
||||
to a stream. The function is typically called in a loop until there
|
||||
are no more pages ready for output.</p>
|
||||
|
||||
<p>This function will only return a page when a "reasonable" amount of
|
||||
packet data is available. Normally this is appropriate since it
|
||||
limits the overhead of the Ogg page headers in the bitstream, and so
|
||||
calling ogg_stream_pageout() after ogg_stream_packetin() should be the
|
||||
common case. Call <a href="ogg_stream_flush.html">ogg_stream_flush()</a>
|
||||
if immediate page generation is desired. This may be occasionally
|
||||
necessary, for example, to limit the temporal latency of a variable
|
||||
bitrate stream.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_pageout(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to an <a href="ogg_page.html">ogg_page</a> structure to fill
|
||||
in. Data pointed to is owned by libogg. The structure is valid until the
|
||||
next call to ogg_stream_pageout(), ogg_stream_packetin(), or
|
||||
ogg_stream_flush().</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>Zero means that insufficient data has accumulated to fill a page, or an internal error occurred. In
|
||||
this case <i>og</i> is not modified.</li>
|
||||
<li>Non-zero means that a page has been completed and returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,89 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_pageout_fill</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_pageout_fill</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function forms packets into pages, similar
|
||||
to <a href="ogg_stream_pageout.html">ogg_stream_pageout()</a>, but
|
||||
allows applications to explicitly request a specific page spill
|
||||
size.</p>
|
||||
|
||||
<p>In a typical encoding situation, this would be called after using <a
|
||||
href="ogg_stream_packetin.html">ogg_stream_packetin()</a> to submit
|
||||
data packets to the bitstream. Internally, this function assembles
|
||||
the accumulated packet bodies into an Ogg page suitable for writing
|
||||
to a stream. The function is typically called in a loop until there
|
||||
are no more pages ready for output.</p>
|
||||
|
||||
<p>This function will return a page when at least four packets have
|
||||
been accumulated and accumulated packet data meets or exceeds the
|
||||
specified number of bytes, <b>and/or</b> when the accumulated packet
|
||||
data meets/exceeds the maximum page size regardless of accumulated
|
||||
packet count.
|
||||
Call <a href="ogg_stream_flush.html">ogg_stream_flush()</a> or
|
||||
<a href="ogg_stream_flush_fill.html">ogg_stream_flush_fill()</a> if
|
||||
immediate page generation is desired regardless of accumulated data.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_pageout_fill(<a href="ogg_stream_state.html">ogg_stream_state</a> *os, <a href="ogg_page.html">ogg_page</a> *og, int fillbytes);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_stream.html">ogg_stream</a> struct, which represents the current logical bitstream.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to an <a href="ogg_page.html">ogg_page</a> structure to fill
|
||||
in. Data pointed to is owned by libogg. The structure is valid until the
|
||||
next call to ogg_stream_pageout(), ogg_stream_packetin(), or
|
||||
ogg_stream_flush().</dd>
|
||||
<dt><i>fillbytes</i></dt>
|
||||
<dd>Packet data watermark in bytes.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>Zero means that insufficient data has accumulated to fill a page, or an internal error occurred. In
|
||||
this case <i>og</i> is not modified.</li>
|
||||
<li>Non-zero means that a page has been completed and returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_reset</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_reset</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function sets values in the <a href="ogg_stream_state.html">ogg_stream_state</a> struct back to initial values.
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_reset(ogg_stream_state *os);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the ogg_stream_state struct to be reset.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 indicates success. nonzero is returned on internal error.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_stream_reset_serialno</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_reset</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function reinitializes the values in the
|
||||
<a href="ogg_stream_state.html">ogg_stream_state</a>,
|
||||
just like <a href="ogg_stream_reset.html">ogg_stream_reset()</a>.
|
||||
Additionally, it sets the stream serial number to the given value.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_stream_reset_serialno(ogg_stream_state *os, int serialno);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>os</i></dt>
|
||||
<dd>Pointer to the ogg_stream_state struct to be reset.</dd>
|
||||
<dt><i>serialno</i></dt>
|
||||
<dd>New stream serial number to use</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 indicates success. nonzero is returned on internal error.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,122 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - datatype - ogg_stream_state</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_stream_state</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h"</i></p>
|
||||
|
||||
<p>
|
||||
The ogg_stream_state struct tracks the current encode/decode state
|
||||
of the current logical bitstream.
|
||||
<p>
|
||||
|
||||
<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
typedef struct {
|
||||
unsigned char *body_data; /* bytes from packet bodies */
|
||||
long body_storage; /* storage elements allocated */
|
||||
long body_fill; /* elements stored; fill mark */
|
||||
long body_returned; /* elements of fill returned */
|
||||
|
||||
|
||||
int *lacing_vals; /* The values that will go to the segment table */
|
||||
ogg_int64_t *granule_vals; /* granulepos values for headers. Not compact
|
||||
this way, but it is simple coupled to the
|
||||
lacing fifo */
|
||||
long lacing_storage;
|
||||
long lacing_fill;
|
||||
long lacing_packet;
|
||||
long lacing_returned;
|
||||
|
||||
unsigned char header[282]; /* working space for header encode */
|
||||
int header_fill;
|
||||
|
||||
int e_o_s; /* set when we have buffered the last packet in the
|
||||
logical bitstream */
|
||||
int b_o_s; /* set after we've written the initial page
|
||||
of a logical bitstream */
|
||||
long serialno;
|
||||
long pageno;
|
||||
ogg_int64_t packetno; /* sequence number for decode; the framing
|
||||
knows where there's a hole in the data,
|
||||
but we need coupling so that the codec
|
||||
(which is in a separate abstraction
|
||||
layer) also knows about the gap */
|
||||
ogg_int64_t granulepos;
|
||||
|
||||
} ogg_stream_state;
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Relevant Struct Members</h3>
|
||||
<dl>
|
||||
<dt><i>body_data</i></dt>
|
||||
<dd>Pointer to data from packet bodies.</dd>
|
||||
<dt><i>body_storage</i></dt>
|
||||
<dd>Storage allocated for bodies in bytes (filled or unfilled).</dd>
|
||||
<dt><i>body_fill</i></dt>
|
||||
<dd>Amount of storage filled with stored packet bodies.</dd>
|
||||
<dt><i>body_returned</i></dt>
|
||||
<dd>Number of elements returned from storage.</dd>
|
||||
<dt><i>lacing_vals</i></dt>
|
||||
<dd>String of lacing values for the packet segments within the current page. Each value is a byte, indicating packet segment length.</dd>
|
||||
<dt><i>granule_vals</i></dt>
|
||||
<dd>Pointer to the lacing values for the packet segments within the current page.</dd>
|
||||
<dt><i>lacing_storage</i></dt>
|
||||
<dd>Total amount of storage (in bytes) allocated for storing lacing values.</dd>
|
||||
<dt><i>lacing_fill</i></dt>
|
||||
<dd>Fill marker for the current vs. total allocated storage of lacing values for the page.</dd>
|
||||
<dt><i>lacing_packet</i></dt>
|
||||
<dd>Lacing value for current packet segment.</dd>
|
||||
<dt><i>lacing_returned</i></dt>
|
||||
<dd>Number of lacing values returned from lacing_storage.</dd>
|
||||
<dt><i>header</i></dt>
|
||||
<dd>Temporary storage for page header during encode process, while the header is being created.</dd>
|
||||
<dt><i>header_fill</i></dt>
|
||||
<dd>Fill marker for header storage allocation. Used during the header creation process.</dd>
|
||||
<dt><i>e_o_s</i></dt>
|
||||
<dd>Marker set when the last packet of the logical bitstream has been buffered.</dd>
|
||||
<dt><i>b_o_s</i></dt>
|
||||
<dd>Marker set after we have written the first page in the logical bitstream.</dd>
|
||||
<dt><i>serialno</i></dt>
|
||||
<dd>Serial number of this logical bitstream.</dd>
|
||||
<dt><i>pageno</i></dt>
|
||||
<dd>Number of the current page within the stream.</dd>
|
||||
<dt><i>packetno</i></dt>
|
||||
<dd>Number of the current packet.</dd>
|
||||
<dt><i>granulepos</i></dt>
|
||||
<dd>Exact position of decoding/encoding process.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,67 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_buffer</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_buffer</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to provide a properly-sized buffer for writing.
|
||||
<p>Buffer space which has already been returned is cleared, and the buffer is extended as necessary by the size plus some additional bytes. Within the current implementation, an extra 4096 bytes are allocated, but applications should not rely on this additional buffer space.
|
||||
<p>The buffer exposed by this function is empty internal storage from the <a href="ogg_sync_state.html">ogg_sync_state</a> struct, beginning at the fill mark within the struct.
|
||||
<p>A pointer to this buffer is returned to be used by the calling application.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
char *ogg_sync_buffer(ogg_sync_state *oy, long size);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
<dt><i>size</i></dt>
|
||||
<dd>Size of the desired buffer. The actual size of the buffer returned will be this size plus some extra bytes (currently 4096).
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
Returns a pointer to the newly allocated buffer or NULL on error</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_check</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_check</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to check the error or readiness condition of an <a href="ogg_sync_state.html">ogg_sync_state</a> structure.
|
||||
<p>It is safe practice to ignore unrecoverable errors (such as an internal error caused by a malloc() failure) returned by ogg stream synchronization calls. Should an
|
||||
internal error occur, the <a href="ogg_sync_state.html">ogg_sync_state</a> structure will be cleared (equivalent to a
|
||||
call to
|
||||
<a href="ogg_sync_clear.html">ogg_sync_clear</a>) and subsequent calls
|
||||
using this <a href="ogg_sync_state.html">ogg_sync_state</a> will be
|
||||
noops. Error detection is then handled via a single call to
|
||||
ogg_sync_check at the end of the operational block. </p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_check(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is returned if the <a href="ogg_sync_state.html">ogg_sync_state</a> structure is initialized and ready.</li>
|
||||
<li>
|
||||
nonzero is returned if the structure was never initialized, or if an unrecoverable internal error occurred in a previous call using the passed in <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_clear</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_clear</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to free the internal storage of an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and resets the struct to the initial state. To free the entire struct, <a href="ogg_sync_destroy.html">ogg_sync_destroy</a> should be used instead. In situations where the struct needs to be reset but the internal storage does not need to be freed, <a href="ogg_sync_reset.html">ogg_sync_reset</a> should be used.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_clear(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,68 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_destroy</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_destroy</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to destroy an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and free all memory used.</p>
|
||||
|
||||
<p>Note this calls free() on its argument so you should only use this
|
||||
function if you've allocated the ogg_sync_state on the heap. If it is
|
||||
allocated on the stack, or it will otherwise be freed by your
|
||||
own code, use <a href="ogg_sync_clear.html">ogg_sync_clear</a> instead
|
||||
to release just the internal memory.</p>
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_destroy(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_init</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_init</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to initialize an <a href="ogg_sync_state.html">ogg_sync_state</a> struct to a known initial value in preparation for manipulation of an Ogg bitstream.
|
||||
<p>The ogg_sync struct is important when decoding, as it synchronizes retrieval and return of data.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_init(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct. After this function call, this struct has been initialized.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_pageout</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_pageout</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function takes the data stored in the buffer of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct and inserts them into an <a href="ogg_page.html">ogg_page</a>.
|
||||
|
||||
<p>In an actual decoding loop, this function should be called first to ensure that the buffer is cleared. The example code below illustrates a clean reading loop which will fill and output pages.
|
||||
<p><b>Caution:</b>This function should be called before reading into the buffer to ensure that data does not remain in the ogg_sync_state struct. Failing to do so may result in a memory leak. See the example code below for details.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_pageout(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy, <a href="ogg_page.html">ogg_page</a> *og);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct. Normally, the internal storage of this struct should be filled with newly read data and verified using <a href="ogg_sync_wrote.html">ogg_sync_wrote</a>.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to page struct filled by this function.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>-1 returned if stream has not yet captured sync (bytes were skipped).</li>
|
||||
<li>0 returned if more data needed or an internal error occurred.</li>
|
||||
<li>1 indicated a page was synced and returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<h3>Example Usage</h3>
|
||||
<pre>
|
||||
if (ogg_sync_pageout(&oy, &og) != 1) {
|
||||
buffer = ogg_sync_buffer(&oy, 8192);
|
||||
bytes = fread(buffer, 1, 8192, stdin);
|
||||
ogg_sync_wrote(&oy, bytes);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,68 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_pageseek</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_pageseek</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function synchronizes the ogg_sync_state struct to the next ogg_page.
|
||||
<p>This is useful when seeking within a bitstream. ogg_sync_pageseek will synchronize to the next page in the bitstream and return information about how many bytes we advanced or skipped in order to do so.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_pageseek(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy, <a href="ogg_page.html">ogg_page</a> *og);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
<dt><i>og</i></dt>
|
||||
<dd>Pointer to a page (or an incomplete page) of data. This is the page we are attempting to sync.
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>-n means that we skipped n bytes within the bitstream.</li>
|
||||
<li>
|
||||
0 means that the page isn't ready and we need more data, or than an internal error occurred. No bytes have been skipped.</li>
|
||||
<li>
|
||||
n means that the page was synced at the current location, with a page length of n bytes.
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_reset</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_reset</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to reset the internal counters of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct to initial values.
|
||||
<p>It is a good idea to call this before seeking within a bitstream.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_reset(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
0 is always returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - datatype - ogg_sync_state</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_state</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h"</i></p>
|
||||
|
||||
<p>
|
||||
The ogg_sync_state struct tracks the synchronization of the current page.
|
||||
<p>It is used during decoding to track the status of data as it is read in, synchronized, verified, and parsed into pages belonging to the various logical bistreams in the current physical bitstream link.
|
||||
<p>
|
||||
|
||||
<table border=0 width=100% color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
typedef struct {
|
||||
unsigned char *data;
|
||||
int storage;
|
||||
int fill;
|
||||
int returned;
|
||||
|
||||
int unsynced;
|
||||
int headerbytes;
|
||||
int bodybytes;
|
||||
} ogg_sync_state;
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Relevant Struct Members</h3>
|
||||
<dl>
|
||||
<dt><i>data</i></dt>
|
||||
<dd>Pointer to buffered stream data.</dd>
|
||||
<dt><i>storage</i></dt>
|
||||
<dd>Current allocated size of the stream buffer held in <tt>*data</tt>.</dd>
|
||||
<dt><i>fill</i></dt>
|
||||
<dd>The number of valid bytes currently held in <tt>*data</tt>; functions as the buffer head pointer.</dd>
|
||||
<dt><i>returned</i></dt>
|
||||
<dd>The number of bytes at the head of <tt>*data</tt> that have already been returned as pages; functions as the buffer tail pointer.</dd>
|
||||
<dt><i>unsynced</i></dt>
|
||||
<dd>Synchronization state flag; nonzero if sync has not yet been attained or has been lost.</dd>
|
||||
<dt><i>headerbytes</i></dt>
|
||||
<dd>If synced, the number of bytes used by the synced page's header.</dd>
|
||||
<dt><i>bodybytes</i></dt>
|
||||
<dd>If synced, the number of bytes used by the synced page's body.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,73 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - ogg_sync_wrote</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>ogg_sync_wrote</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function is used to tell the <a href="ogg_sync_state.html">ogg_sync_state</a> struct how many bytes we wrote into the buffer.
|
||||
|
||||
<p>
|
||||
The general procedure is to request a pointer into an internal
|
||||
<a href="ogg_sync_state.html">ogg_sync_state</a> buffer by calling
|
||||
<a href="ogg_sync_buffer.html">ogg_sync_buffer()</a>. The buffer
|
||||
is then filled up to the requested size with new input, and
|
||||
ogg_sync_wrote() is called to advance the fill pointer by however
|
||||
much data was actually available.</p>
|
||||
|
||||
<br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
int ogg_sync_wrote(<a href="ogg_sync_state.html">ogg_sync_state</a> *oy, long bytes);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>oy</i></dt>
|
||||
<dd>Pointer to a previously declared <a href="ogg_sync_state.html">ogg_sync_state</a> struct.</dd>
|
||||
<dt><i>bytes</i></dt>
|
||||
<dd>Number of bytes of new data written.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>-1 if the number of bytes written overflows the internal storage of the <a href="ogg_sync_state.html">ogg_sync_state</a> struct or an internal error occurred.
|
||||
<li>
|
||||
0 in all other cases.</li>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - oggpack_adv</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>oggpack_adv</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function advances the location pointer by the specified number of bits without reading any data.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
void oggpack_adv(oggpack_buffer *b,int bits);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>b</i></dt>
|
||||
<dd>Pointer to the current oggpack_buffer.</dd>
|
||||
<dt><i>bits</i></dt>
|
||||
<dd>Number of bits to advance.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>
|
||||
No values are returned.</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>libogg - function - oggpack_adv1</title>
|
||||
<link rel=stylesheet href="style.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
|
||||
<table border=0 width=100%>
|
||||
<tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h1>oggpack_adv1</h1>
|
||||
|
||||
<p><i>declared in "ogg/ogg.h";</i></p>
|
||||
|
||||
<p>This function advances the location pointer by one bit without reading any data.
|
||||
|
||||
<br><br>
|
||||
<table border=0 color=black cellspacing=0 cellpadding=7>
|
||||
<tr bgcolor=#cccccc>
|
||||
<td>
|
||||
<pre><b>
|
||||
void oggpack_adv1(oggpack_buffer *b);
|
||||
</b></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<dl>
|
||||
<dt><i>b</i></dt>
|
||||
<dd>Pointer to the current oggpack_buffer.</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<h3>Return Values</h3>
|
||||
<blockquote>
|
||||
<li>No values are returned.
|
||||
</li>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
<br><br>
|
||||
<hr noshade>
|
||||
<table border=0 width=100%>
|
||||
<tr valign=top>
|
||||
<td><p class=tiny>copyright © 2000-2021 Xiph.Org Foundation</p></td>
|
||||
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
|
||||
</tr><tr>
|
||||
<td><p class=tiny>libogg documentation</p></td>
|
||||
<td align=right><p class=tiny>libogg release 1.3.5 - 20210603</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||