libdvbv5: lib/include/libdvbv5/crc32.h Source File

libdvbv5 1.32.0 Library to work with Digital TV devices on Linux

crc32.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2012 - Mauro Carvalho Chehab
3 * Copyright (c) 2012-2014 - Andre Roth <neolynx@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation version 2.1 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18 *
19 */
20
32
33#ifndef _CRC32_H
34#define _CRC32_H
35
36#include <stdint.h>
37#include <unistd.h> /* size_t */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
51uint32_t dvb_crc32(uint8_t *data, size_t datalen, uint32_t crc);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif
58
dvb_crc32
uint32_t dvb_crc32(uint8_t *data, size_t datalen, uint32_t crc)
Calculates the crc-32 as defined at the MPEG-TS specs.