Commit 12579cda authored by Steve Lhomme's avatar Steve Lhomme

libmatroska2: export CompressFrameZLib() so data can be tested for compressibility

add MATROSKA_TRACKENTRY_CLASS so it can handle transparent compression/decompression of the CodecPrivate

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/foundation_src@731 a6f86f6d-0131-4f8e-9e7b-e335508773d5
parent dc85d8d5
......@@ -156,6 +156,10 @@ EBML_DLL filepos_t MATROSKA_MetaSeekAbsolutePos(const matroska_seekpoint *MetaSe
EBML_DLL matroska_cuepoint *MATROSKA_CuesGetTimecodeStart(const ebml_element *Cues, timecode_t Timecode);
#if defined(CONFIG_EBML_WRITING)
EBML_DLL err_t CompressFrameZLib(const uint8_t *Cursor, size_t CursorSize, uint8_t **OutBuf, size_t *OutSize);
#endif
EBML_DLL void MATROSKA_ClusterSort(matroska_cluster *Cluster); // not good with P frames!!!
EBML_DLL ebml_element *MATROSKA_BlockReadTrack(const matroska_block *Block);
......
......@@ -74,5 +74,6 @@ struct matroska_block
#define MATROSKA_SEGMENTUID_CLASS FOURCC('M','K','I','D')
#define MATROSKA_BIGBINARY_CLASS FOURCC('M','K','B','B')
#define MATROSKA_ATTACHMENT_CLASS FOURCC('M','K','A','T')
#define MATROSKA_TRACKENTRY_CLASS FOURCC('M','K','T','E')
#endif /* LIBMATROSKA2_INTERNAL_H */
......@@ -384,7 +384,7 @@ const ebml_semantic EBML_SemanticTrackEntry[] = {
{0, 1, &MATROSKA_ContextContentEncodings, PROFILE_WEBM},
{0, 0, NULL ,0} // end of the table
};
const ebml_context MATROSKA_ContextTrackEntry = {0xAE, EBML_MASTER_CLASS, 0, 0, "TrackEntry", EBML_SemanticTrackEntry, EBML_SemanticGlobals, NULL};
const ebml_context MATROSKA_ContextTrackEntry = {0xAE, MATROSKA_TRACKENTRY_CLASS, 0, 0, "TrackEntry", EBML_SemanticTrackEntry, EBML_SemanticGlobals, NULL};
const ebml_semantic EBML_SemanticTracks[] = {
{1, 0, &MATROSKA_ContextTrackEntry, 0},
......
......@@ -1514,7 +1514,7 @@ err_t MATROSKA_BlockAppendFrame(matroska_block *Block, const matroska_frame *Fra
}
#if defined(CONFIG_EBML_WRITING) && defined(CONFIG_ZLIB)
static err_t CompressFrameZLib(const uint8_t *Cursor, size_t CursorSize, uint8_t **OutBuf, size_t *OutSize)
err_t CompressFrameZLib(const uint8_t *Cursor, size_t CursorSize, uint8_t **OutBuf, size_t *OutSize)
{
err_t Err = ERR_NONE;
z_stream stream;
......@@ -2241,6 +2241,9 @@ META_PARAM(TYPE,MATROSKA_SEEKPOINT_ELEMENT,TYPE_NODE)
META_DATA(TYPE_NODE_REF,MATROSKA_SEEKPOINT_ELEMENT,matroska_seekpoint,Link)
META_END_CONTINUE(EBML_MASTER_CLASS)
META_START_CONTINUE(MATROSKA_TRACKENTRY_CLASS)
META_END_CONTINUE(EBML_MASTER_CLASS)
META_START_CONTINUE(MATROSKA_SEGMENTUID_CLASS)
META_VMT(TYPE_FUNC,ebml_element_vmt,ValidateSize,ValidateSizeSegUID)
META_END_CONTINUE(EBML_BINARY_CLASS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment