2 * GPAC - Multimedia Framework C SDK
\r
4 * Copyright (c) Jean Le Feuvre 2000-2005
\r
5 * All rights reserved
\r
7 * This file is part of GPAC / SL header file
\r
9 * GPAC is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation; either version 2, or (at your option)
\r
12 * any later version.
\r
14 * GPAC is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public
\r
20 * License along with this library; see the file COPYING. If not, write to
\r
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
25 #ifndef _GF_SYNC_LAYER_H_
\r
26 #define _GF_SYNC_LAYER_H_
\r
33 /*the Sync Layer config descriptor*/
\r
40 u8 useAccessUnitStartFlag;
\r
41 u8 useAccessUnitEndFlag;
\r
42 u8 useRandomAccessPointFlag;
\r
43 u8 hasRandomAccessUnitsOnlyFlag;
\r
45 u8 useTimestampsFlag;
\r
48 u32 timestampResolution;
\r
53 u8 instantBitrateLength;
\r
54 u8 degradationPriorityLength;
\r
56 u8 packetSeqNumLength;
\r
64 /***************************************
\r
66 ***************************************/
\r
69 SLPredef_Null = 0x01,
\r
70 SLPredef_MP4 = 0x02,
\r
71 /*intern to GPAC, means NO SL at all (for streams unable to handle AU reconstruction a timing)*/
\r
72 SLPredef_SkipSL = 0xF0
\r
75 /*set SL predefined (assign all fields according to sl->predefined value)*/
\r
76 GF_Err gf_odf_slc_set_pref(GF_SLConfig *sl);
\r
81 u8 accessUnitStartFlag;
\r
82 u8 accessUnitEndFlag;
\r
84 u8 randomAccessPointFlag;
\r
87 u8 decodingTimeStampFlag;
\r
88 u8 compositionTimeStampFlag;
\r
89 u8 instantBitrateFlag;
\r
90 u8 degradationPriorityFlag;
\r
93 u16 packetSequenceNumber;
\r
94 u64 objectClockReference;
\r
95 u16 AU_sequenceNumber;
\r
96 u64 decodingTimeStamp;
\r
97 u64 compositionTimeStamp;
\r
98 u16 accessUnitLength;
\r
100 u16 degradationPriority;
\r
102 /*this is NOT part of standard SL, only used internally: signals duration of access unit if known
\r
103 this is usefull for streams with very random updates, to prevent buffering for instance a subtitle stream
\r
104 which is likely to have no updates during the first minutes... expressed in media timescale*/
\r
106 /*ISMACryp extensions*/
\r
112 /*packetize SL-PDU. If PDU is NULL or size 0, only writes the SL header*/
\r
113 void gf_sl_packetize(GF_SLConfig* slConfig, GF_SLHeader *Header, char *PDU, u32 size, char **outPacket, u32 *OutSize);
\r
114 /*gets SL header size in bytes*/
\r
115 u32 gf_sl_get_header_size(GF_SLConfig* slConfig, GF_SLHeader *Header);
\r
117 /*depacketize SL-PDU*/
\r
118 void gf_sl_depacketize(GF_SLConfig *slConfig, GF_SLHeader *Header, char *PDU, u32 PDULength, u32 *HeaderLen);
\r
125 #endif /*_GF_SYNC_LAYER_H_*/
\r