mirror of
https://github.com/zoriya/Kyoo.Transcoder.git
synced 2026-08-16 02:44:44 +00:00
Cleaning up the info prober
This commit is contained in:
+3
-1
@@ -7,8 +7,10 @@
|
||||
#include "libavformat/avformat.h"
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/timestamp.h"
|
||||
#include "stream.h"
|
||||
|
||||
int open_input_context(AVFormatContext **inputContext, const char *path);
|
||||
AVStream *copy_stream_to_output(AVFormatContext *out_ctx, AVStream *in_stream);
|
||||
int open_output_file_for_write(AVFormatContext *out_ctx, const char *out_path, AVDictionary **options);
|
||||
void process_packet(AVPacket *pkt, AVStream *in_stream, AVStream *out_stream);
|
||||
void process_packet(AVPacket *pkt, AVStream *in_stream, AVStream *out_stream);
|
||||
type type_fromffmpeg(int type);
|
||||
+11
-1
@@ -2,6 +2,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
none = 0,
|
||||
video = 1,
|
||||
audio = 2,
|
||||
subtitle = 3
|
||||
} type;
|
||||
|
||||
typedef struct stream
|
||||
{
|
||||
char *title;
|
||||
@@ -10,6 +18,7 @@ typedef struct stream
|
||||
bool is_default;
|
||||
bool is_forced;
|
||||
char *path;
|
||||
type type;
|
||||
} stream;
|
||||
|
||||
#define NULLSTREAM (struct stream) { \
|
||||
@@ -18,5 +27,6 @@ typedef struct stream
|
||||
NULL, \
|
||||
false, \
|
||||
false, \
|
||||
NULL \
|
||||
NULL, \
|
||||
none \
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include "stream.h"
|
||||
|
||||
//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 *get_track_info(const char *path, int *stream_count, int *track_count);
|
||||
|
||||
API stream *get_track_info(const char *path, unsigned *stream_count, unsigned *track_count);
|
||||
|
||||
//Take the path of the file and the path of the output directory. It will return the list of subtitle streams in the streams variable. The int returned is the number of subtitles extracted.
|
||||
API stream *extract_subtitles(char *path, const char *out_path, unsigned *stream_count, unsigned *subtitle_count);
|
||||
|
||||
Reference in New Issue
Block a user