Nimbin2git.christianimmanuel.de / Games / dvd / imdb_aka.h

dvd files

last change 2026-09-04 (2 hours ago)

wget https://git.christianimmanuel.de/games/dvd/archive/dvd.tar.gz
imdb_aka.h 870 B · 42 lines raw
#ifndef IMDB_AKA_H
#define IMDB_AKA_H

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>


// Define the struct to hold the parsed data for each line
typedef struct {
    char *titleId;
    int ordering;
    char *title;
    char *region;
    char *language;
    char *types;
    char *attributes;
    int isOriginalTitle;
} TitleLanguages;

typedef struct {
    char *filename;
    long start_offset;
    long end_offset;
    TitleLanguages *parsed_lines;
    int *line_count;
    int thread_id;
} ThreadData;

char *strdup(const char *s);

// Function to process the file chunk for each thread
void* processAkaLinesThread(void *arg);

// Function to read the Akas file and process lines with multiple threads
int readAkasWithThreads(const char *filename, TitleLanguages **languages);

int testLanguages(void);

#endif