aacs.h 1.72 KB
Newer Older
1 2
/*
 * This file is part of libbluray
npzacs's avatar
npzacs committed
3
 * Copyright (C) 2013-2015  VideoLAN
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * 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, see
 * <http://www.gnu.org/licenses/>.
 */

#ifndef _BD_LIBAACS_H_
#define _BD_LIBAACS_H_

23
#include "util/attributes.h"
24 25 26 27 28 29

#include <stdint.h>


typedef struct bd_aacs BD_AACS;

npzacs's avatar
npzacs committed
30
BD_PRIVATE int  libaacs_required(void *h, int (*have_file)(void *, const char *, const char *));
31
BD_PRIVATE BD_AACS *libaacs_load(void);
npzacs's avatar
npzacs committed
32 33 34
BD_PRIVATE int  libaacs_open(BD_AACS *p, const char *device,
                             void *file_open_handle, void *file_open_fp,
                             const char *keyfile_path);
35 36 37 38 39
BD_PRIVATE void libaacs_unload(BD_AACS **p);

BD_PRIVATE void libaacs_select_title(BD_AACS *p, uint32_t title);
BD_PRIVATE int  libaacs_decrypt_unit(BD_AACS *p, uint8_t *buf);

npzacs's avatar
npzacs committed
40 41 42 43 44 45
BD_PRIVATE uint32_t libaacs_get_mkbv(BD_AACS *p);

#define BD_AACS_DISC_ID            1
#define BD_AACS_MEDIA_VID          2
#define BD_AACS_MEDIA_PMSN         3
#define BD_AACS_DEVICE_BINDING_ID  4
46
#define BD_AACS_DEVICE_NONCE       5
anonymous's avatar
anonymous committed
47
#define BD_AACS_MEDIA_KEY          6
npzacs's avatar
npzacs committed
48 49 50

BD_PRIVATE const uint8_t *libaacs_get_aacs_data(BD_AACS *p, int type);

51 52

#endif /* _BD_LIBAACS_H_ */