Add new libgstcdda with GstCddaBaseSrc class.
Original commit message from CVS:
* configure.ac:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/cdda/Makefile.am:
* gst-libs/gst/cdda/base64.c:
* gst-libs/gst/cdda/base64.h:
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type), (gst_cdda_base_src_base_init),
(gst_cdda_base_src_class_init), (gst_cdda_base_src_init),
(gst_cdda_base_src_finalize), (gst_cdda_base_src_set_property),
(gst_cdda_base_src_get_property),
(gst_cdda_base_src_get_track_from_sector),
(gst_cdda_base_src_get_query_types), (gst_cdda_base_src_convert),
(gst_cdda_base_src_query), (gst_cdda_base_src_is_seekable),
(gst_cdda_base_src_do_seek), (gst_cdda_base_src_handle_track_seek),
(gst_cdda_base_src_handle_event), (gst_cdda_base_src_uri_get_type),
(gst_cdda_base_src_uri_get_protocols),
(gst_cdda_base_src_uri_get_uri), (gst_cdda_base_src_uri_set_uri),
(gst_cdda_base_src_uri_handler_init),
(gst_cdda_base_src_setup_interfaces),
(gst_cdda_base_src_add_track), (gst_cdda_base_src_update_duration),
(cddb_sum), (gst_cddabasesrc_calculate_musicbrainz_discid),
(lba_to_msf), (gst_cdda_base_src_calculate_cddb_id),
(gst_cdda_base_src_add_tags),
(gst_cdda_base_src_add_index_associations),
(gst_cdda_base_src_set_index), (gst_cdda_base_src_get_index),
(gst_cdda_base_src_track_sort_func), (gst_cdda_base_src_start),
(gst_cdda_base_src_clear_tracks), (gst_cdda_base_src_stop),
(gst_cdda_base_src_create):
* gst-libs/gst/cdda/gstcddabasesrc.h:
* gst-libs/gst/cdda/sha1.c:
* gst-libs/gst/cdda/sha1.h:
Add new libgstcdda with GstCddaBaseSrc class.
2005-12-28 18:06:50 +00:00
|
|
|
/* NIST Secure Hash Algorithm */
|
|
|
|
/* heavily modified by Uwe Hollerbach <uh@alumni.caltech edu> */
|
|
|
|
/* from Peter C. Gutmann's implementation as found in */
|
|
|
|
/* Applied Cryptography by Bruce Schneier */
|
|
|
|
/* This code is in the public domain */
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef __GST_CDDA_SHA_H__
|
|
|
|
#define __GST_CDDA_SHA_H__
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
/* Useful defines & typedefs */
|
|
|
|
typedef unsigned char SHA_BYTE; /* 8-bit quantity */
|
|
|
|
typedef unsigned long SHA_LONG; /* 32-or-more-bit quantity */
|
|
|
|
|
|
|
|
#define SHA_BLOCKSIZE 64
|
|
|
|
#define SHA_DIGESTSIZE 20
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
SHA_LONG digest[5]; /* message digest */
|
|
|
|
SHA_LONG count_lo, count_hi; /* 64-bit bit count */
|
|
|
|
SHA_BYTE data[SHA_BLOCKSIZE]; /* SHA data buffer */
|
|
|
|
int local; /* unprocessed amount in data */
|
|
|
|
} SHA_INFO;
|
|
|
|
|
2007-12-13 10:10:35 +00:00
|
|
|
#define sha_init __gst_cdda_sha_init
|
|
|
|
#define sha_update __gst_cdda_sha_update
|
|
|
|
#define sha_final __gst_cdda_sha_final
|
Add new libgstcdda with GstCddaBaseSrc class.
Original commit message from CVS:
* configure.ac:
* gst-libs/gst/Makefile.am:
* gst-libs/gst/cdda/Makefile.am:
* gst-libs/gst/cdda/base64.c:
* gst-libs/gst/cdda/base64.h:
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type), (gst_cdda_base_src_base_init),
(gst_cdda_base_src_class_init), (gst_cdda_base_src_init),
(gst_cdda_base_src_finalize), (gst_cdda_base_src_set_property),
(gst_cdda_base_src_get_property),
(gst_cdda_base_src_get_track_from_sector),
(gst_cdda_base_src_get_query_types), (gst_cdda_base_src_convert),
(gst_cdda_base_src_query), (gst_cdda_base_src_is_seekable),
(gst_cdda_base_src_do_seek), (gst_cdda_base_src_handle_track_seek),
(gst_cdda_base_src_handle_event), (gst_cdda_base_src_uri_get_type),
(gst_cdda_base_src_uri_get_protocols),
(gst_cdda_base_src_uri_get_uri), (gst_cdda_base_src_uri_set_uri),
(gst_cdda_base_src_uri_handler_init),
(gst_cdda_base_src_setup_interfaces),
(gst_cdda_base_src_add_track), (gst_cdda_base_src_update_duration),
(cddb_sum), (gst_cddabasesrc_calculate_musicbrainz_discid),
(lba_to_msf), (gst_cdda_base_src_calculate_cddb_id),
(gst_cdda_base_src_add_tags),
(gst_cdda_base_src_add_index_associations),
(gst_cdda_base_src_set_index), (gst_cdda_base_src_get_index),
(gst_cdda_base_src_track_sort_func), (gst_cdda_base_src_start),
(gst_cdda_base_src_clear_tracks), (gst_cdda_base_src_stop),
(gst_cdda_base_src_create):
* gst-libs/gst/cdda/gstcddabasesrc.h:
* gst-libs/gst/cdda/sha1.c:
* gst-libs/gst/cdda/sha1.h:
Add new libgstcdda with GstCddaBaseSrc class.
2005-12-28 18:06:50 +00:00
|
|
|
|
|
|
|
void sha_init(SHA_INFO *);
|
|
|
|
void sha_update(SHA_INFO *, SHA_BYTE *, int);
|
|
|
|
void sha_final(unsigned char [20], SHA_INFO *);
|
|
|
|
|
|
|
|
#define SHA_VERSION 1
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
# if SIZEOF_LONG == 4
|
|
|
|
# define SHA_BYTE_ORDER 4321
|
|
|
|
# elif SIZEOF_LONG == 8
|
|
|
|
# define SHA_BYTE_ORDER 87654321
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# if SIZEOF_LONG == 4
|
|
|
|
# define SHA_BYTE_ORDER 1234
|
|
|
|
# elif SIZEOF_LONG == 8
|
|
|
|
# define SHA_BYTE_ORDER 12345678
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define SHA_BYTE_ORDER 1234
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __GST_CDDA_SHA_H__ */
|