[譯]Page Multiplexing and Ordering in a Physical Ogg Stream

Page Multiplexing and Ordering in a Physical Ogg Stream原文html

Page Multiplexing and Ordering in a Physical Ogg Stream 物理Ogg流中的頁面多路複用和排序

The low-level mechanisms of an Ogg stream (as described in the Ogg Bitstream Overview) provide means for mixing multiple logical streams and media types into a single linear-chronological stream. This document specifies the high-level arrangement and use of page structure to multiplex multiple streams of mixed media type within a physical Ogg stream. Ogg流的低級機制(如Ogg位流概述中所述)提供了將多個邏輯流和媒體類型混合到單個線性時序流中的方法。該文檔指定了頁面結構的高級排列和使用,以在物理Ogg流中多路混合媒體類型的多個流。算法

Design Elements 設計元素

The design and arrangement of the Ogg container format is governed by several high-level design decisions that form the reasoning behind specific low-level design decisions. Ogg容器格式的設計和排列受幾個高級設計決策支配,這些決策構成了特定的低級設計決策的依據。markdown

Linear media 線性媒體

The Ogg bitstream is intended to encapsulate chronological, time-linear mixed media into a single delivery stream or file. The design is such that an application can always encode and/or decode a full-featured bitstream in one pass with no seeking and minimal buffering. Seeking to provide optimized encoding (such as two-pass encoding) or interactive decoding (such as scrubbing or instant replay) is not disallowed or discouraged, however no bitstream feature must require nonlinear operation on the bitstream. Ogg比特流旨在將按時間順序,時間線性的混合媒體封裝到單個傳輸流或文件中。這種設計使得應用程序始終能夠在一次遍歷中對功能齊全的比特流進行編碼和/或解碼,而無需尋找和最小化緩衝。尋求或建議不要提供優化的編碼(例如兩次經過編碼)或交互式解碼(例如擦洗或即時重放),可是,沒有比特流功能必須對比特流進行非線性操做。併發

Multiplexing 多路複用

Ogg bitstreams multiplex multiple logical streams into a single physical stream at the page level. Each page contains an abstract time stamp (the Granule Position) that represents an absolute time landmark within the stream. After the pages representing stream headers (all logical stream headers occur at the beginning of a physical bitstream section before any logical stream data), logical stream data pages are arranged in a physical bitstream in strict non-decreasing order by chronological absolute time as specified by the granule position. Ogg位流在頁面級別將多個邏輯流多路複用爲單個物理流。每一個頁面都包含一個抽象時間戳(粒度位置),表明流中的絕對時間界標。在表示流頭的頁面(全部邏輯流頭在任何邏輯流數據以前的物理位流部分的開頭出現)以後,邏輯流數據頁面按照嚴格的非降序按時間絕對絕對時間排列在物理位流中,以下所示:顆粒位置。 The only exception to arranging pages in strictly ascending time order by granule position is those pages that do not set the granule position value. This is a special case when exceptionally large packets span multiple pages; the specifics of handling this special case are described later under 'Continuous and Discontinuous Streams'. 按顆粒位置嚴格按時間升序排列頁面的惟一例外是未設置顆粒位置值的頁面。當異常大的數據包跨越多個頁面時,這是一種特殊狀況。稍後在「連續和不連續流」中介紹處理此特殊狀況的細節。app

Seeking

Ogg is designed to use an interpolated bisection search to implement exact positional seeking. Interpolated bisection search is a spec-mandated mechanism. Ogg設計爲使用插值對分搜索來實現精確的位置搜索。內插二等分搜索是一種規範要求的機制。 An index may improve objective performance, but it seldom improves subjective performance outside of a few high-latency use cases and adds no additional functionality as bisection search delivers the same functionality for both one- and two-pass stream types. For these reasons, use of indexes is discouraged, except in cases where an index provides demonstrable and noticeable performance improvement. 索引能夠提升目標性能,可是在一些高延遲用例以外,它不多提升主觀性能,而且因爲二等分搜索爲一遍和兩遍流類型提供相同的功能,所以幾乎沒有添加任何其餘功能。因爲這些緣由,不鼓勵使用索引,除非索引提供了明顯且顯着的性能改進。 Seek operations are by absolute time; a direct bisection search must find the exact time position requested. Information in the Ogg bitstream is arranged such that all information to be presented for playback from the desired seek point will occur at or after the desired seek point. Seek operations are neither 'fuzzy' nor heuristic. 搜尋操做是按絕對時間進行的;直接二等分搜索必須找到所需的確切時間位置。 Ogg比特流中的信息被安排成使得將要呈現以從指望的搜索點回放的全部信息將出如今指望的搜索點處或以後。搜尋操做既不「模糊」也不啓發式。 Although key frame handling in video appears to be an exception to "all needed playback information lies ahead of a given seek", key frames can still be handled directly within this indexless framework. Seeking to a key frame in video (as well as seeking in other media types with analogous restraints) is handled as two seeks; first a seek to the desired time which extracts state information that decodes to the time of the last key frame, followed by a second seek directly to the key frame. The location of the previous key frame is embedded as state information in the granulepos; this mechanism is described in more detail later. 儘管視頻中的關鍵幀處理彷佛是「全部必需的播放信息都位於給定搜索以前」的例外,但關鍵幀仍能夠在此無索引框架中直接處理。在視頻中尋找關鍵幀(以及在具備相似限制的其餘媒體類型中尋找)被視爲兩次尋找。首先,尋找所需時間,提取狀態信息,該狀態信息解碼到最後一個關鍵幀的時間,而後進行第二次直接尋找關鍵幀的時間。前一個關鍵幀的位置做爲狀態信息嵌入到顆粒中;此機制將在後面詳細介紹。框架

Continuous and Discontinuous Streams

Logical streams within a physical Ogg stream belong to one of two categories, "Continuous" streams and "Discontinuous" streams. Although these are discussed in more detail later, the distinction is important to a high-level understanding of how to buffer an Ogg stream. 物理Ogg流中的邏輯流屬於如下兩個類別之一:「連續」流和「不連續」流。儘管稍後將更詳細地討論這些內容,可是這種區別對於高級瞭解如何緩衝Ogg流很是重要。 A stream that provides a gapless, time-continuous media type with a fine-grained timebase is considered to be 'Continuous'. A continuous stream should never be starved of data. Clear examples of continuous data types include broadcast audio and video. 提供具備細粒度時基的無間隙,時間連續的媒體類型的流被認爲是「連續的」。連續的數據流永遠不會餓死數據。連續數據類型的清晰示例包括廣播音頻和視頻。 A stream that delivers data in a potentially irregular pattern or with widely spaced timing gaps is considered to be 'Discontinuous'. A discontinuous stream may be best thought of as data representing scattered events; although they happen in order, they are typically unconnected data often located far apart. One possible example of a discontinuous stream types would be captioning. Although it's possible to design captions as a continuous stream type, it's most natural to think of captions as widely spaced pieces of text with little happening between. 以潛在的不規則模式或間隔較大的時間間隔傳送數據的流被認爲是「不連續的」。最好將不連續流視爲表明分散事件的數據。儘管它們是按順序發生的,但它們一般是一般彼此相距很遠的未鏈接數據。不連續流類型的一個可能示例是字幕。儘管能夠將字幕設計爲連續流類型,但將字幕視爲間隔很遠的文本片斷卻不多發生是很天然的。 The fundamental design distinction between continuous and discontinuous streams concerns buffering. 連續流和不連續流之間的基本設計區別涉及緩衝。less

Buffering

Because a continuous stream is, by definition, gapless, Ogg buffering is based on the simple premise of never allowing any active continuous stream to starve for data during decode; buffering proceeds ahead until all continuous streams in a physical stream have data ready to decode on demand. 根據定義,因爲連續流是無間隙的,所以Ogg緩衝基於這樣一個簡單的前提,即在解碼過程當中毫不容許任何活動的連續流餓死數據。緩衝將繼續進行,直到物理流中的全部連續流都準備好按需解碼的數據爲止。 Discontinuous stream data may occur on a fairly regular basis, but the timing of, for example, a specific caption is impossible to predict with certainty in most captioning systems. Thus the buffering system should take discontinuous data 'as it comes' rather than working ahead (for a potentially unbounded period) to look for future discontinuous data. As such, discontinuous streams are ignored when managing buffering; their pages simply 'fall out' of the stream when continuous streams are handled properly. 不連續的流數據可能會按期出現,可是在大多數字幕系統中,沒法肯定特定字幕的時間安排。所以,緩衝系統應「按需」獲取不連續數據,而不是提早進行工做(可能無限制的時間)以查找未來的不連續數據。這樣,在管理緩衝時,不連續的流將被忽略;若是正確地處理了連續流,它們的頁面只會從流中「掉出來」。 Buffering requirements need not be explicitly declared or managed for the encoded stream; the decoder simply reads as much data as is necessary to keep all continuous stream types gapless (also ensuring discontinuous data arrives in time) and no more, resulting in optimum implicit buffer usage for a given stream. Because all pages of all data types are stamped with absolute timing information within the stream, inter-stream synchronization timing is always explicitly maintained without the need for explicitly declared buffer-ahead hinting. 無需爲編碼流明確聲明或管理緩衝要求;解碼器簡單地讀取所需的數據,以保持全部連續流類型無間隙(也確保不連續數據及時到達),而且再也不讀取更多數據,從而爲給定流提供最佳的隱式緩衝區使用率。由於全部數據類型的全部頁面在流中都標有絕對定時信息,因此流間同步定時始終被顯式維護,而無需顯式聲明的提早緩衝提示。 Further details, mechanisms and reasons for the differing arrangement and behavior of continuous and discontinuous streams is discussed later. 稍後討論連續流和不連續流的不一樣排列和行爲的其餘詳細信息,機制和緣由。dom

Whole-stream navigation

Ogg is designed so that the simplest navigation operations treat the physical Ogg stream as a whole summary of its streams, rather than navigating each interleaved stream as a separate entity. Ogg的設計使最簡單的導航操做將物理Ogg流視爲其流的總體摘要,而不是將每一個交錯的流做爲單獨的實體進行導航。 First Example: seeking to a desired time position in a multiplexed (or unmultiplexed) Ogg stream can be accomplished through a bisection search on time position of all pages in the stream (as encoded in the granule position). More powerful searches (such as a key frame-aware seek within video) are also possible with additional search complexity, but similar computational complexity. 第一個示例:經過對流中全部頁面的時間位置進行二等分搜索(以顆粒位置編碼),能夠在多路複用(或非多路複用)Ogg流中尋找所需的時間位置。還能夠進行更強大的搜索(例如,在視頻內進行關鍵幀感知的搜索),同時增長搜索複雜度,但計算複雜度也類似。 Second Example: A bitstream section may consist of three multiplexed streams of differing lengths. The result of multiplexing these streams should be thought of as a single mixed stream with a length equal to the longest of the three component streams. Although it is also possible to think of the multiplexed results as three concurrent streams of different lengths and it is possible to recover the three original streams, it will also become obvious that once multiplexed, it isn't possible to find the internal lengths of the component streams without a linear search of the whole bitstream section. However, it is possible to find the length of the whole bitstream section easily (in near-constant time per section) just as it is for a single-media unmultiplexed stream. 第二個例子:一個比特流段能夠由三個不一樣長度的複用流組成。多路複用這些流的結果應被視爲長度等於三個份量流中最長的單個混合流。儘管也能夠將多路複用結果視爲三個不一樣長度的併發流,而且有可能恢復三個原始流,但也很明顯,一旦多路複用,就不可能找到其內部長度。份量流而無需線性搜索整個位流部分。可是,能夠像在單媒體非多路複用流中同樣容易地找到整個位流段的長度(每段接近恆定的時間)。ide

Granule Position

Description

The Granule Position is a signed 64 bit field appearing in the header of every Ogg page. Although the granule position represents absolute time within a logical stream, its value does not necessarily directly encode a simple timestamp. It may represent frames elapsed (as in Vorbis), a simple timestamp, or a more complex bit-division encoding (such as in Theora). The exact encoding of the granule position is up to a specific codec. 顆粒位置是一個有符號的64位字段,出如今每一個Ogg頁的頁眉中。儘管顆粒位置表示邏輯流中的絕對時間,但其值不必定直接編碼簡單的時間戳。它能夠表示通過的幀(如在Vorbis中),簡單的時間戳或較複雜的位分割編碼(如在Theora中)。顆粒位置的確切編碼取決於特定的編解碼器。 The granule position is governed by the following rules: 顆粒位置受如下規則支配: Granule Position must always increase forward or remain equal from page to page, be unset, or be zero for a header page. The absolute time to which any correct sequence of granule position maps must similarly always increase forward or remain equal. (A codec may make use of data, such as a control sequence, that only affects codec working state without producing data and thus advancing granule position and time. Although the packet sequence number increases in this case, the granule position, and thus the time position, do not.) 粒度位置必須始終向前增長或在頁面之間保持相等,未設置或對於標題頁爲零。相似地,任何正確位置的顆粒位置圖序列必須始終絕對增長或保持相等的絕對時間。 (編解碼器可使用諸如控制序列之類的數據,這些數據僅影響編解碼器的工做狀態而不會產生數據,所以不會提早顆粒位置和時間。儘管在這種狀況下,數據包序列號會增長,可是顆粒位置和時間都會增長位置,不要。) Granule position may only be unset if there no packet defining a time boundary on the page (that is, if no packet in a continuous stream ends on the page, or no packet in a discontinuous stream begins on the page. This will be discussed in more detail under Continuous and Discontinuous streams). A codec must be able to translate a given granule position value to a unique, deterministic absolute time value through direct calculation. A codec is not required to be able to translate an absolute time value into a unique granule position value. 僅當在頁面上沒有定義時間邊界的數據包(即,連續流中沒有數據包在頁面上結束,或者不連續流中沒有數據包在頁面上開始)時,才能夠設置顆粒位置。連續和不連續流下的更多詳細信息)。 編解碼器必須可以經過直接計算將給定的顆粒位置值轉換爲惟一的肯定性絕對時間值。不須要編解碼器就能將絕對時間值轉換爲惟一的顆粒位置值。 Codecs shall choose a granule position definition that allows that codec means to seek as directly as possible to an immediately decodable point, such as the bit-divided granule position encoding of Theora allows the codec to seek efficiently to key frame without using an index. That is, additional information other than absolute time may be encoded into a granule position value so long as the granule position obeys the above points. 編解碼器應選擇一種顆粒位置定義,以使該編解碼器可以儘量直接地尋找可當即解碼的點,例如Theora的按位劃分的顆粒位置編碼容許編解碼器在不使用索引的狀況下有效地查找關鍵幀。即,能夠將除絕對時間之外的附加信息編碼爲顆粒位置值,只要該顆粒位置遵照以上幾點便可。oop

Example: timestamp

In general, a codec/stream type should choose the simplest granule position encoding that addresses its requirements. The examples here are by no means exhaustive of the possibilities within Ogg. 一般,編解碼器/流類型應選擇可以知足其要求的最簡單的顆粒位置編碼。這裏的示例毫不是Ogg內的全部可能性的窮舉。 A simple granule position could encode a timestamp directly. For example, a granule position that encoded milliseconds from beginning of stream would allow a logical stream length of over 100,000,000,000 days before beginning a new logical stream (to avoid the granule position wrapping). 一個簡單的顆粒位置能夠直接編碼一個時間戳。例如,從流開始編碼毫秒的顆粒位置將容許邏輯流長度超過100,000,000,000天,而後再開始新的邏輯流(以免顆粒位置包裹)。

Example: framestamp

A simple millisecond timestamp granule encoding might suit many stream types, but a millisecond resolution is inappropriate to, eg, most audio encodings where exact single-sample resolution is generally a requirement. A millisecond is both too large a granule and often does not represent an integer number of samples. 簡單的毫秒級時間戳粒度編碼可能適合許多流類型,可是毫秒級分辨率不適用於例如一般要求精確的單樣本分辨率的大多數音頻編碼。毫秒既太大,又不表明整數的樣本。 In the event that audio frames are always encoded as the same number of samples, the granule position could simply be a linear count of frames since beginning of stream. This has the advantages of being exact and efficient. Position in time would simply be [granule_position] * [samples_per_frame] / [samples_per_second]. 在音頻幀始終被編碼爲相同數量的樣本的狀況下,自流開始以來,顆粒位置可能只是幀的線性計數。這具備精確和有效的優勢。時間位置只是[granule_position] * [samples_per_frame] / [samples_per_second]。

Example: samplestamp (Vorbis)

Frame counting is insufficient in codecs such as Vorbis where an audio frame [packet] encodes a variable number of samples. In Vorbis's case, the granule position is a count of the number of raw samples from the beginning of stream; the absolute time of a granule position is [granule_position] / [samples_per_second]. 在諸如Vorbis之類的編解碼器中,幀計數不足,其中音頻幀[packet]對可變數量的樣本進行編碼。在Vorbis的狀況下,顆粒位置是從流的開始算起的原始樣品數的計數。顆粒位置的絕對時間爲[granule_position] / [samples_per_second]。

Example: bit-divided framestamp (Theora)

Some video codecs may be able to use the simple framestamp scheme for granule position. However, most modern video codecs introduce at least the following complications: 一些視頻編解碼器可能可以使用簡單的幀標記方案進行顆粒定位。可是,大多數現代視頻編解碼器至少會帶來如下複雜問題: video frames are relatively far apart compared to audio samples; for this reason, the point at which a video frame changes to the next frame is usually a strictly defined offset within the frame 'period'. That is, video at 50fps could just as easily define frame transitions <.015, .035, .055...> as at <.00, .02, .04...>. frame rates often include drop-frames, leap-frames or other rational-but-non-integer timings. 與音頻樣本相比,視頻幀相距較遠;所以,視頻幀更改成下一幀的點一般是幀「期間」內嚴格定義的偏移。也就是說,以50fps的視頻能夠像定義<.00,.02,.04 ...>同樣容易地定義幀過渡<.015,.035,.055 ...>。 幀速率一般包括丟幀,跳幀或其餘有理但非整數的時序。 Decode must begin at a 'key frame' or 'I frame'. Keyframes usually occur relatively seldom. 解碼必須從「關鍵幀」或「 I幀」開始。關鍵幀一般不多出現。 The first two points can be handled straightforwardly via the fact that the codec has complete control mapping granule position to absolute time; non-integer frame rates and offsets can be set in the codec's initial header, and the rest is just arithmetic. 經過編解碼器具備將粒子位置完整映射到絕對時間的完整控制,就能夠直接處理前兩點。能夠在編解碼器的初始標頭中設置非整數幀速率和偏移量,其他的只是算術運算。 The third point appears trickier at first glance, but it too can be handled through the granule position mapping mechanism. Here we arrange the granule position in such a way that granule positions of key frames are easy to find. Divide the granule position into two fields; the most-significant bits are an absolute frame counter, but it's only updated at each key frame. The least significant bits encode the number of frames since the last key frame. In this way, each granule position both encodes the absolute time of the current frame as well as the absolute time of the last key frame. 乍一看,第三點彷佛比較棘手,可是也能夠經過顆粒位置映射機制來處理。在這裏,咱們以易於找到關鍵幀的顆粒位置的方式排列顆粒位置。將顆粒位置分爲兩個字段;最重要的位是絕對幀計數器,但僅在每一個關鍵幀處更新。最低有效位編碼自上一個關鍵幀以來的幀數。這樣,每一個顆粒位置均可以編碼當前幀的絕對時間以及最後一個關鍵幀的絕對時間。 Seeking to a most recent preceding key frame is then accomplished by first seeking to the original desired point, inspecting the granulepos of the resulting video page, extracting from that granulepos the absolute time of the desired key frame, and then seeking directly to that key frame's page. Of course, it's still possible for an application to ignore key frames and use a simpler seeking algorithm (decode would be unable to present decoded video until the next key frame). Surprisingly many player applications do choose the simpler approach. 而後,經過首先尋找到原始的所需點,檢查所得視頻頁面的粒度,從該粒度中提取所需關鍵幀的絕對時間,而後直接尋找該關鍵幀的絕對時間,來尋找最近的關鍵幀。頁。固然,應用程序仍然能夠忽略關鍵幀並使用更簡單的查找算法(解碼將沒法在下一個關鍵幀以前顯示解碼的視頻)。使人驚訝的是,許多播放器應用程序確實選擇了更簡單的方法。

granule position, packets and pages顆粒位置,包裝和頁面

Although each packet of data in a logical stream theoretically has a specific granule position, only one granule position is encoded per page. It is possible to encode a logical stream such that each page contains only a single packet (so that granule positions are preserved for each packet), however a one-to-one packet/page mapping is not intended to be the general case. 儘管理論上邏輯流中的每一個數據包都具備特定的粒度位置,可是每頁僅編碼一個粒度位置。能夠對邏輯流進行編碼,以使每一個頁面僅包含一個數據包(這樣就能夠爲每一個數據包保留顆粒位置),可是一般狀況下並不打算採用一對一的數據包/頁面映射。 Because Ogg functions at the page, not packet, level, this once-per-page time information provides Ogg with the finest-grained time information is can use. Ogg passes this granule positioning data to the codec (along with the packets extracted from a page); it is the responsibility of codecs to track timing information at granularities finer than a single page. 由於Ogg是在頁面而不是在數據包級別上起做用,因此此每頁一次的時間信息爲Ogg提供了最細粒度的時間信息。 Ogg將此顆粒定位數據(連同從頁面提取的數據包)傳遞給編解碼器;編解碼器有責任以比單個頁面更精細的粒度跟蹤計時信息。

start-time and end-time positioning

A granule position represents the instantaneous time location between two pages. However, continuous streams and discontinuous streams differ on whether the granulepos represents the end-time of the data on a page or the start-time. Continuous streams are 'end-time' encoded; the granulepos represents the point in time immediately after the last data decoded from a page. Discontinuous streams are 'start-time' encoded; the granulepos represents the point in time of the first data decoded from the page. 顆粒位置表示兩頁之間的瞬時時間位置。可是,連續流和不連續流在粒度表示頁面上數據的結束時間仍是開始時間方面有所不一樣。連續流是「結束時間」編碼的; granulepos表示從頁面解碼的最後一個數據以後緊​​接的時間點。不連續的流是「開始時間」編碼的; granulepos表示從頁面解碼的第一個數據的時間點。 An Ogg stream type is declared continuous or discontinuous by its codec. A given codec may support both continuous and discontinuous operation so long as any given logical stream is continuous or discontinuous for its entirety and the codec is able to ascertain (and inform the Ogg layer) as to which after decoding the initial stream header. The majority of codecs will always be continuous (such as Vorbis) or discontinuous (such as Writ). Ogg流類型由其編解碼器聲明爲連續或不連續。給定的編解碼器能夠支持連續和不連續的操做,只要任何給定的邏輯流在總體上是連續的或不連續的,而且編解碼器就可以肯定(並通知Ogg層)在解碼初始流頭以後是哪一個。大多數編解碼器將始終是連續的(例如Vorbis)或不連續的(例如Writ)。 Start- and end-time encoding do not affect multiplexing sort-order; pages are still sorted by the absolute time a given granulepos maps to regardless of whether that granulepos represents start- or end-time. 開始時間和結束時間編碼不影響多路複用排序順序;仍然按照給定的granulepos映射到的絕對時間對頁面進行排序,不管該granulepos表明開始時間仍是結束時間。

Multiplex/Demultiplex Division of Labor多工/多工分工

The Ogg multiplex/demultiplex layer provides mechanisms for encoding raw packets into Ogg pages, decoding Ogg pages back into the original codec packets, determining the logical structure of an Ogg stream, and navigating through and synchronizing with an Ogg stream at a desired stream location. Strict multiplex/demultiplex operations are entirely in the Ogg domain and require no intervention from codecs. Ogg複用/解複用層提供瞭如下機制:將原始數據包編碼爲Ogg頁面,將Ogg頁面解碼回原始編解碼器數據包,肯定Ogg流的邏輯結構,並在所需的流位置導航Ogg流並與之同步。嚴格的複用/解複用操做徹底在Ogg域中,不須要編解碼器的干預。 Implementation of more complex operations does require codec knowledge, however. Unlike other framing systems, Ogg maintains strict separation between framing and the framed bitstream data; Ogg does not replicate codec-specific information in the page/framing data, nor does Ogg blur the line between framing and stream data/metadata. Because Ogg is fully data-agnostic toward the data it frames, operations which require specifics of bitstream data (such as 'seek to key frame') also require interaction with the codec layer (because, in this example, the Ogg layer is not aware of the concept of key frames). This is different from systems that blur the separation between framing and stream data in order to simplify the separation of code. The Ogg system purposely keeps the distinction in data simple so that later codec innovations are not constrained by framing design. 可是,執行更復雜的操做確實須要編解碼器知識。與其餘成幀系統不一樣,Ogg在成幀和成幀的比特流數據之間保持嚴格的分隔。 Ogg不會在頁面/框架數據中複製特定於編解碼器的信息,也不會模糊框架和流數據/元數據之間的界限。由於Ogg對其幀數據徹底不瞭解數據,因此須要特定位流數據的操做(例如「搜索關鍵幀」)也須要與編解碼器層進行交互(由於在此示例中,Ogg層不知道關鍵幀的概念)。這與模糊框架和流數據之間的分隔以簡化代碼分隔的系統不一樣。 Ogg系統有目的地使數據之間的區別保持簡單,從而使之後的編解碼器創新不受框架設計的限制。 For this reason, however, complex seeking operations require interaction with the codecs in order to decode the granule position of a given stream type back to absolute time or in order to find 'decodable points' such as key frames in video. 可是,因爲這個緣由,複雜的搜索操做須要與編解碼器進行交互,以便將給定流類型的顆粒位置解碼回絕對時間,或者找到「可解碼點」,例如視頻中的關鍵幀。

Unsorted Discussion Points未分類的討論點

flushes around key frames? RFC suggestion: repaginating or building a stream this way is nice but not required 在關鍵幀周圍刷新? RFC建議:以這種方式從新分頁或構建流很好,但不是必需的

Appendix A: multiplexing examples

附錄A:複用示例

相關文章
相關標籤/搜索