mirror of
https://github.com/zoriya/Kyoo.Transcoder.git
synced 2026-08-16 02:44:44 +00:00
Fixing windows export
This commit is contained in:
+1
-1
@@ -8,4 +8,4 @@
|
||||
#define API __declspec(dllexport)
|
||||
#else
|
||||
#define API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,16 +7,18 @@
|
||||
#include "export.h"
|
||||
#include "stream.h"
|
||||
|
||||
API int init();
|
||||
|
||||
API int transmux(const char *path, const char *out_path, float *playable_duration);
|
||||
|
||||
//API int transcode(const char *path, const char *out_path, float *playable_duration);
|
||||
|
||||
API stream *extract_infos(const char *path,
|
||||
const char *out_path,
|
||||
unsigned *stream_count,
|
||||
unsigned *track_count,
|
||||
bool reextract);
|
||||
const char *out_path,
|
||||
unsigned *stream_count,
|
||||
unsigned *track_count,
|
||||
bool reextract);
|
||||
|
||||
void destroy_stream(stream *s);
|
||||
API void destroy_stream(stream *s);
|
||||
|
||||
API void free_streams(stream *streamsPtr, unsigned count);
|
||||
+3
-2
@@ -3,9 +3,10 @@
|
||||
//
|
||||
|
||||
#include "stream.h"
|
||||
#include "export.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
void destroy_stream(stream *s)
|
||||
API void destroy_stream(stream *s)
|
||||
{
|
||||
free(s->title);
|
||||
free(s->language);
|
||||
@@ -13,7 +14,7 @@ void destroy_stream(stream *s)
|
||||
free(s->path);
|
||||
}
|
||||
|
||||
void free_streams(stream *s, unsigned count)
|
||||
API void free_streams(stream *s, unsigned count)
|
||||
{
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
destroy_stream(s + i);
|
||||
|
||||
+7
-6
@@ -4,10 +4,11 @@
|
||||
|
||||
#include <compatibility.h>
|
||||
#include <stdio.h>
|
||||
#include "export.h"
|
||||
#include "stream.h"
|
||||
#include "helper.h"
|
||||
|
||||
int init()
|
||||
API int init()
|
||||
{
|
||||
puts("Kyoo's transcoder initiated.");
|
||||
return sizeof(stream);
|
||||
@@ -70,11 +71,11 @@ stream parse_stream(AVStream *stream, type stream_type, const char *path)
|
||||
};
|
||||
}
|
||||
|
||||
stream *extract_infos(const char *path,
|
||||
const char *out_path,
|
||||
unsigned *stream_count,
|
||||
unsigned *track_count,
|
||||
bool reextract)
|
||||
API stream *extract_infos(const char *path,
|
||||
const char *out_path,
|
||||
unsigned *stream_count,
|
||||
unsigned *track_count,
|
||||
bool reextract)
|
||||
{
|
||||
AVFormatContext *ctx = NULL;
|
||||
AVFormatContext **output_list;
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include "compatibility.h"
|
||||
#include "export.h"
|
||||
#include "transcoder.h"
|
||||
#include "helper.h"
|
||||
#include "path_helper.h"
|
||||
@@ -104,7 +105,7 @@ static void destroy_context(AVFormatContext *in_ctx, AVFormatContext *out_ctx, A
|
||||
free(stream_map);
|
||||
}
|
||||
|
||||
int transmux(const char *path, const char *out_path, float *playable_duration)
|
||||
API int transmux(const char *path, const char *out_path, float *playable_duration)
|
||||
{
|
||||
AVFormatContext *in_ctx = NULL;
|
||||
AVFormatContext *out_ctx = NULL;
|
||||
|
||||
Reference in New Issue
Block a user