/* * section and descriptor parser * * Copyright (C) 2005 Kenneth Aafloy (kenneth@linuxtv.org) * Copyright (C) 2005 Andrew de Quincey (adq_dvb@lidskialf.net) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _UCSI_MPEG_METADATA_SECTION_H #define _UCSI_MPEG_METADATA_SECTION_H 1 #ifdef __cplusplus extern "C" { #endif #include /** * mpeg_metadata_section structure. */ struct mpeg_metadata_section { struct section_ext head; /* uint8_t data[] */ } __ucsi_packed; /** * Process an mpeg_metadata_section structure. * * @param section Pointer to the section_ext structure. * @return Pointer to the mpeg_metadata_section structure, or NULL on error. */ extern struct mpeg_metadata_section *mpeg_metadata_section_codec(struct section_ext *section); /** * Accessor for the random_access_indicator field of a metadata section. * * @param metadata metadata section pointer. * @return The random_access_indicator. */ static inline uint8_t mpeg_metadata_section_random_access_indicator(struct mpeg_metadata_section *metadata) { return metadata->head.reserved >> 1; } /** * Accessor for the decoder_config_flag field of a metadata section. * * @param metadata metadata section pointer. * @return The decoder_config_flag. */ static inline uint8_t mpeg_metadata_section_decoder_config_flag(struct mpeg_metadata_section *metadata) { return metadata->head.reserved & 1; } /** * Accessor for the fragment_indicator field of a metadata section. * * @param metadata metadata section pointer. * @return The fragment_indicator. */ static inline uint8_t mpeg_metadata_section_fragment_indicator(struct mpeg_metadata_section *metadata) { return metadata->head.reserved1; } /** * Accessor for the service_id field of a metadata section. * * @param metadata metadata section pointer. * @return The service_id. */ static inline uint16_t mpeg_metadata_section_service_id(struct mpeg_metadata_section *metadata) { return metadata->head.table_id_ext >> 8; } /** * Retrieve pointer to data field of an mpeg_metadata_section. * * @param s mpeg_metadata_section pointer. * @return Pointer to the field. */ static inline uint8_t * mpeg_metadata_section_data(struct mpeg_metadata_section *s) { return (uint8_t *) s + sizeof(struct mpeg_metadata_section); } /** * Determine length of the data field of an mpeg_copyright_descriptor. * * @param s mpeg_metadata_section_data pointer. * @return Length of field in bytes. */ static inline int mpeg_metadata_section_data_length(struct mpeg_metadata_section *s) { return section_ext_length(&s->head) - sizeof(struct mpeg_metadata_section); } #ifdef __cplusplus } #endif #endif ass='logheader'>2001-03-24[lcd4linux @ 2001-03-24 09:04:19 by reinelt]reinelt1-0/+5 new TODO item 2001-03-17[lcd4linux @ 2001-03-17 11:44:10 by ltoetsch]ltoetsch1-20/+42 allow more then 1 BAR_T 2001-03-17[lcd4linux @ 2001-03-17 11:11:31 by ltoetsch]ltoetsch1-2/+5 bugfix: max for BAR_T 2001-03-16[lcd4linux @ 2001-03-16 16:40:17 by ltoetsch]ltoetsch12-24/+112 implemented time bar 2001-03-16[lcd4linux @ 2001-03-16 09:28:08 by ltoetsch]ltoetsch5-11/+35 bugfixes 2001-03-15[lcd4linux @ 2001-03-15 15:49:22 by ltoetsch]ltoetsch3-14/+27 fixed compile HD44780.c, cosmetics 2001-03-15[lcd4linux @ 2001-03-15 14:25:05 by ltoetsch]ltoetsch11-125/+278 added unread/total news 2001-03-15[lcd4linux @ 2001-03-15 11:10:53 by ltoetsch]ltoetsch1-1/+8 added quit/logout to pop/imap 2001-03-15[lcd4linux @ 2001-03-15 09:47:13 by reinelt]reinelt3-16/+31 some fixes to ppdef off-by-one bug in processor.c fixed 2001-03-15[lcd4linux @ 2001-03-15 09:13:22 by ltoetsch]ltoetsch1-2/+9 delay first exec for faster start 2001-03-14[lcd4linux @ 2001-03-14 16:47:41 by reinelt]reinelt3-41/+59 minor cleanups 2001-03-14[lcd4linux @ 2001-03-14 15:30:53 by reinelt]reinelt1-21/+34 make ppdev compatible to earlier kernels 2001-03-14[lcd4linux @ 2001-03-14 15:14:59 by reinelt]reinelt8-152/+365 added ppdev parallel port access 2001-03-14[lcd4linux @ 2001-03-14 13:19:29 by ltoetsch]ltoetsch16-128/+773 Added pop3/imap4 mail support 2001-03-13[lcd4linux @ 2001-03-13 08:34:15 by reinelt]reinelt6-29/+50 corrected a off-by-one bug with sensors 2001-03-13[lcd4linux @ 2001-03-13 08:03:41 by reinelt]reinelt3-1/+35 added missing autoheader files 2001-03-13[lcd4linux @ 2001-03-13 07:53:00 by reinelt]reinelt2-13/+15 added several files for the distribution 2001-03-13[lcd4linux @ 2001-03-13 07:41:22 by reinelt]reinelt3-2/+52 added NEWS file 2001-03-12[lcd4linux @ 2001-03-12 13:44:58 by reinelt]reinelt8-58/+232 new udelay() using Time Stamp Counters 2001-03-12[lcd4linux @ 2001-03-12 12:49:24 by reinelt]reinelt2-63/+71 even better configure handling... 2001-03-12[lcd4linux @ 2001-03-12 12:39:36 by reinelt]reinelt14-448/+830 reworked autoconf a lot: drivers may be excluded, #define's went to config.h 2001-03-09[lcd4linux @ 2001-03-09 16:24:30 by ltoetsch]ltoetsch2-155/+345 disable driver in configure 2001-03-09[lcd4linux @ 2001-03-09 15:04:53 by reinelt]reinelt3-103/+109 rename 'raster' to 'Text in Text.c added TOTO item 2001-03-09[lcd4linux @ 2001-03-09 14:30:01 by reinelt]reinelt1-0/+7 new ideas for TODO 2001-03-09[lcd4linux @ 2001-03-09 14:24:49 by ltoetsch]ltoetsch3-7/+18 exec: Scale_x ->Min/Max_x 2001-03-09[lcd4linux @ 2001-03-09 13:08:11 by ltoetsch]ltoetsch12-86/+384 Added Text driver 2001-03-09[lcd4linux @ 2001-03-09 12:14:24 by reinelt]reinelt4-21/+34 minor cleanups 2001-03-08[lcd4linux @ 2001-03-08 15:25:38 by ltoetsch]ltoetsch9-93/+214 improved exec 2001-03-08[lcd4linux @ 2001-03-08 09:02:04 by reinelt]reinelt4-133/+21 seti client cleanup 2001-03-08[lcd4linux @ 2001-03-08 08:39:54 by reinelt]reinelt2-4/+12 fixed two typos 2001-03-07[lcd4linux @ 2001-03-07 18:10:21 by ltoetsch]ltoetsch10-110/+319 added e(x)ec commands 2001-03-05[lcd4linux @ 2001-03-05 18:20:21 by reinelt]reinelt2-13/+25 TOTO list update 2001-03-04[lcd4linux @ 2001-03-04 15:01:12 by ltoetsch]ltoetsch1-3/+3 Added PNG 2001-03-02[lcd4linux @ 2001-03-02 20:18:12 by reinelt]reinelt3-36/+89 allow compile on systems without net/if_ppp.h