ffi_version added
This commit is contained in:
@@ -5,6 +5,8 @@ project(ao-play-async LANGUAGES C)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
add_library(ao-play-async SHARED
|
||||
ao_playasync.c
|
||||
ao_playasync.h
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "ao_playasync.h"
|
||||
#include "../ffi_version.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
@@ -326,7 +327,7 @@ static DWORD run(LPVOID arg)
|
||||
|
||||
int ao_async_version()
|
||||
{
|
||||
return VERSION;
|
||||
return ffi_version();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -702,9 +703,6 @@ void ao_pause_async(void *ao_handle, int paused)
|
||||
MUTEX_UNLOCK(h->mutex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int ao_real_output_bits_async(void *handle)
|
||||
{
|
||||
AO_Handle *h = (AO_Handle *) handle;
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#define AOPLAYASYNC_EXPORT extern
|
||||
#endif
|
||||
|
||||
#define VERSION 3
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_PATCH 0
|
||||
|
||||
typedef enum {
|
||||
ao = 1,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef __FFI_VERSION__
|
||||
#define __FFI_VERSION__
|
||||
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_PATCH 0
|
||||
|
||||
#define ffi_version() ((VERSION_MAJOR << 16) + (VERSION_MINOR << 8) + VERSION_PATCH)
|
||||
|
||||
#endif
|
||||
@@ -8,6 +8,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
add_library(ffmpeg_audio SHARED
|
||||
ffmpeg_audio.cpp
|
||||
ffmpeg_audio.h
|
||||
../ffi_version.h
|
||||
)
|
||||
|
||||
add_executable(demo_ffmpeg_audio
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include "ffmpeg_audio.h"
|
||||
#include "../ffi_version.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
@@ -1021,3 +1022,8 @@ const char *fmpg_int_version2string(int ver)
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
int fmpg_version()
|
||||
{
|
||||
return ffi_version();
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ FFMPEG_EXTERN int64_t fmpg_sample_position(fmpg_instance *instance);
|
||||
/* Approximate start time of the current decoded block in seconds. */
|
||||
FFMPEG_EXTERN double fmpg_timecode(fmpg_instance *instance);
|
||||
|
||||
FFMPEG_EXTERN int fmpg_version();
|
||||
FFMPEG_EXTERN const char *fmpg_ffmpeg_version();
|
||||
FFMPEG_EXTERN const char *fmpg_int_version2string(int ver);
|
||||
FFMPEG_EXTERN int fmpg_compatible_ffmpeg();
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user