set_unit_sizeを実装
オリジナルのバージョン0.2.7に追従
This commit is contained in:
parent
eeaa79ea24
commit
1718bdb4b5
@ -185,6 +185,14 @@ int B25Decoder::set_multi2_round(int32_t round)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int B25Decoder::set_unit_size(int size)
|
||||
{
|
||||
int rc = 0;
|
||||
if (_b25)
|
||||
rc = _b25->set_unit_size(_b25, size);
|
||||
return rc;
|
||||
}
|
||||
|
||||
int B25Decoder::reset()
|
||||
{
|
||||
int rc = 0;
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
int set_strip(int32_t strip);
|
||||
int set_emm_proc(int32_t on);
|
||||
int set_multi2_round(int32_t round);
|
||||
int set_unit_size(int size);
|
||||
int reset();
|
||||
int flush();
|
||||
int put(BYTE *pSrc, DWORD dwSrcSize);
|
||||
|
@ -1,7 +1,7 @@
|
||||
PREFIX = /usr/local
|
||||
MAJOR = 0
|
||||
MINOR = 2
|
||||
REVISION = 6
|
||||
REVISION = 7
|
||||
VER = $(MAJOR).$(MINOR).$(REVISION)
|
||||
|
||||
DEST_HEADER = $(PREFIX)/include/aribb25
|
||||
|
@ -316,6 +316,7 @@ static int set_multi2_round_arib_std_b25(void *std_b25, int32_t round);
|
||||
static int set_strip_arib_std_b25(void *std_b25, int32_t strip);
|
||||
static int set_emm_proc_arib_std_b25(void *std_b25, int32_t on);
|
||||
static int set_b_cas_card_arib_std_b25(void *std_b25, B_CAS_CARD *bcas);
|
||||
static int set_unit_size_arib_std_b25(void *std_b25, int size);
|
||||
static int reset_arib_std_b25(void *std_b25);
|
||||
static int flush_arib_std_b25(void *std_b25);
|
||||
static int put_arib_std_b25(void *std_b25, ARIB_STD_B25_BUFFER *buf);
|
||||
@ -352,6 +353,7 @@ ARIB_STD_B25 *create_arib_std_b25(void)
|
||||
r->set_strip = set_strip_arib_std_b25;
|
||||
r->set_emm_proc = set_emm_proc_arib_std_b25;
|
||||
r->set_b_cas_card = set_b_cas_card_arib_std_b25;
|
||||
r->set_unit_size = set_unit_size_arib_std_b25;
|
||||
r->reset = reset_arib_std_b25;
|
||||
r->flush = flush_arib_std_b25;
|
||||
r->put = put_arib_std_b25;
|
||||
@ -411,8 +413,6 @@ static void extract_emm_fixed_part(EMM_FIXED_PART *dst, uint8_t *src);
|
||||
static uint8_t *resync(uint8_t *head, uint8_t *tail, int32_t unit);
|
||||
static uint8_t *resync_force(uint8_t *head, uint8_t *tail, int32_t unit);
|
||||
|
||||
/* static uint32_t crc32(uint8_t *head, uint8_t *tail); */
|
||||
|
||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
interface method implementation
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
|
||||
@ -1140,6 +1140,20 @@ static void teardown(ARIB_STD_B25_PRIVATE_DATA *prv)
|
||||
release_work_buffer(&(prv->dbuf));
|
||||
}
|
||||
|
||||
static int set_unit_size_arib_std_b25(void *std_b25, int size)
|
||||
{
|
||||
ARIB_STD_B25_PRIVATE_DATA *prv;
|
||||
|
||||
prv = private_data(std_b25);
|
||||
if (prv == NULL || size < 188 || size > 320) {
|
||||
return ARIB_STD_B25_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
prv->unit_size = size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int select_unit_size(ARIB_STD_B25_PRIVATE_DATA *prv)
|
||||
{
|
||||
int i;
|
||||
|
@ -35,6 +35,8 @@ typedef struct {
|
||||
|
||||
int (* set_b_cas_card)(void *std_b25, B_CAS_CARD *bcas);
|
||||
|
||||
int (* set_unit_size)(void *std_b25, int size);
|
||||
|
||||
int (* reset)(void *std_b25);
|
||||
int (* flush)(void *std_b25);
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <winscard.h>
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
@ -13,7 +14,6 @@
|
||||
#define TCHAR char
|
||||
#define _tcslen strlen
|
||||
#endif
|
||||
#include <winscard.h>
|
||||
|
||||
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
inner structures
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define PORTABLE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#if !defined(_WIN32)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define VERSION_STRING "0.2.6"
|
||||
#define VERSION_STRING "0.2.7"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
Loading…
x
Reference in New Issue
Block a user