Merge pull request #248 from lukeIam/newAcinerella

Use new acinerella and ffmpeg (3.2) versions
This commit is contained in:
lukeIam authored and GitHub committed 2017-06-05 21:36:15 +02:00
commit 2e6b3880c1
6 files changed
+1547 -867

No files matched your search

+59 -59
View File
@@ -58,7 +58,22 @@ namespace Vocaluxe.Lib.Video.Acinerella
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct SACFileInfo
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)]
public readonly string title;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)]
public readonly string author;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)]
public readonly string copyright;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)]
public readonly string comment;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 512)]
public readonly string album;
public readonly int year;
public readonly int track;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public readonly string genre;
public readonly Int64 Duration;
public readonly int Bitrate;
}
// TAc_instance represents an Acinerella instance. Each instance can open and
@@ -105,14 +120,17 @@ namespace Vocaluxe.Lib.Video.Acinerella
}
// Contains information about an Acinerella stream.
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct SACStreamInfo
{
//Contains the type of the stream.
[FieldOffset(0)]
public readonly EACStreamType StreamType;
//Additional info about the stream
[FieldOffset(8)]
public SACAudioStreamInfo AudioInfo;
[FieldOffset(8)]
public SACVideoStreamInfo VideoInfo;
}
@@ -128,7 +146,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
//The timecode of the currently decoded picture in seconds.
public readonly double Timecode;
public readonly double VideoClock;
//public readonly double VideoClock;
//Contains information about the stream the decoder is attached to.
public SACStreamInfo StreamInfo;
@@ -219,14 +237,14 @@ namespace Vocaluxe.Lib.Video.Acinerella
// Initializes an Acinerella instance.
//function ac_init(): PAc_instance; cdecl; external ac_dll;
[DllImport(_AcDll, EntryPoint = "ac_init", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_init();
[DllImport(_AcDll, EntryPoint = "ac_init_of", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_init(EACOutputFormat outputFormat);
public static IntPtr AcInit()
{
lock (_Lock)
{
return _ac_init();
return _ac_init(EACOutputFormat.ACOutputRGBA32);
}
}
@@ -243,52 +261,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
}
}
// Opens a media file.
// @param(inst specifies the Acinerella Instance the stream should be opened for)
// @param(sender specifies a pointer that is sent to all callback functions to
// allow you to do object orientated programming. May be NULL.)
// @param(open_proc specifies the callback function that is called, when the
// media file is opened. May be NULL.)
// @param(close_proc specifies the callback function that is called when the media
// file is closed. May be NULL.)
/*function ac_open(
inst: PAc_instance;
sender: Pointer;
open_proc: TAc_openclose_callback;
read_proc: TAc_read_callback;
seek_proc: TAc_seek_callback;
close_proc: TAc_openclose_callback;
proberesult: PAc_proberesult): integer; cdecl; external ac_dll;
*/
/*
[DllImport(AcDll, EntryPoint = "ac_open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern Int32 _ac_open(
IntPtr PAc_instance,
IntPtr sender,
TAc_openclose_callback open_proc,
TAc_read_callback read_proc,
TAc_seek_callback seek_proc,
TAc_openclose_callback close_proc,
IntPtr proberesult
);
public static Int32 ac_open(
IntPtr PAc_instance,
IntPtr sender,
TAc_openclose_callback open_proc,
TAc_read_callback read_proc,
TAc_seek_callback seek_proc,
TAc_openclose_callback close_proc,
IntPtr proberesult
)
{
lock (_GetLockToken(pAcDecoder))
{
return _ac_open(PAc_instance, sender, open_proc, read_proc, seek_proc, close_proc, proberesult);
}
}*/
[DllImport(_AcDll, EntryPoint = "ac_open", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
[DllImport(_AcDll, EntryPoint = "ac_open_file", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
private static extern Int32 _ac_open2(IntPtr pAcInstance, string filename);
// ReSharper disable UnusedMethodReturnValue.Global
@@ -337,28 +310,55 @@ namespace Vocaluxe.Lib.Video.Acinerella
[DllImport(_AcDll, EntryPoint = "ac_free_package", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public static extern void ac_free_package(IntPtr pAcPackage);
[DllImport(_AcDll, EntryPoint = "ac_create_video_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_video_decoder(IntPtr pAcInstance);
[DllImport(_AcDll, EntryPoint = "ac_create_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_decoder(IntPtr pAcInstance, int i);
public static IntPtr AcCreateVideoDecoder(IntPtr pAcInstance)
{
lock (_GetLockToken(pAcInstance))
{
return _ac_create_video_decoder(pAcInstance);
var firstVideoStreamId = _GetFirstStreamByType(pAcInstance, EACStreamType.ACStreamTypeVideo);
if (firstVideoStreamId < 0)
{
throw new ArgumentException("The instace does not contain a video stream.");
}
return _ac_create_decoder(pAcInstance, firstVideoStreamId);
}
}
[DllImport(_AcDll, EntryPoint = "ac_create_audio_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
private static extern IntPtr _ac_create_audio_decoder(IntPtr pAcInstance);
public static IntPtr AcCreateAudioDecoder(IntPtr pAcInstance)
{
lock (_GetLockToken(pAcInstance))
{
return _ac_create_audio_decoder(pAcInstance);
var firstAudioStreamId = _GetFirstStreamByType(pAcInstance, EACStreamType.ACStreamTypeAudio);
if (firstAudioStreamId < 0)
{
throw new ArgumentException("The instace does not contain a audio stream.");
}
return _ac_create_decoder(pAcInstance, firstAudioStreamId);
}
}
private static int _GetFirstStreamByType(IntPtr pAcInstance, EACStreamType type)
{
var instance = (SACInstance)Marshal.PtrToStructure(pAcInstance, typeof(SACInstance));
int currentStream = 0;
SACStreamInfo currentStreamInfo;
while (currentStream < instance.StreamCount)
{
AcGetStreamInfo(pAcInstance, currentStream, out currentStreamInfo);
if (currentStreamInfo.StreamType == type)
return currentStream;
currentStream++;
}
return -1;
}
// Frees an created decoder.
//procedure ac_free_decoder(pDecoder: PAc_decoder); cdecl; external ac_dll;
[DllImport(_AcDll, EntryPoint = "ac_free_decoder", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
@@ -447,6 +447,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
{
_Free();
Stop();
return;
}
while (!_Terminated)
File diff suppressed because it is too large. Load diff
+466 -158
View File
@@ -15,8 +15,8 @@
along with Acinerella. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VIDEOPLAY_H
#define VIDEOPLAY_H
#ifndef _ACINERELLA_H_
#define _ACINERELLA_H_
#include <stdint.h>
#include <stdio.h>
@@ -24,187 +24,495 @@
#ifdef _WIN32
#define CALL_CONVT __cdecl
#define EXTERN extern __declspec(dllexport)
#else
#define CALL_CONVT
#define CALL_CONVT
#define EXTERN extern
#endif
typedef long long int64;
/**
* Defines the type of an Acinerella media stream. Currently only video and
* audio streams are supported, subtitle and data streams will be marked as
* "unknown".
*/
typedef enum _ac_stream_type {
/**
* The type of the media stream is not known. This kind of stream can not be
* decoded.
*/
AC_STREAM_TYPE_VIDEO = 0,
/*Defines the type of an Acinerella media stream. Currently only video and
audio streams are supported, subtitle and data streams will be marked as
"unknown".*/
enum _ac_stream_type {
/*The type of the media stream is not known. This kind of stream can not be
decoded.*/
AC_STREAM_TYPE_VIDEO = 0,
/*This media stream is a video stream.*/
AC_STREAM_TYPE_AUDIO = 1,
/*This media stream is an audio stream.*/
AC_STREAM_TYPE_UNKNOWN = -1
};
/**
* This media stream is a video stream.
*/
AC_STREAM_TYPE_AUDIO = 1,
typedef enum _ac_stream_type ac_stream_type;
/**
* This media stream is an audio stream.
*/
AC_STREAM_TYPE_UNKNOWN = -1
} ac_stream_type;
/*Defines the type of an Acinerella media decoder.*/
enum _ac_decoder_type {
/*This decoder is used to decode a video stream.*/
AC_DECODER_TYPE_VIDEO = 0,
/* This decoder is used to decode an audio stram.*/
AC_DECODER_TYPE_AUDIO = 1
};
/**
* Defines the type of an Acinerella media decoder.
*/
typedef enum _ac_decoder_type {
/**
* This decoder is used to decode a video stream.
*/
AC_DECODER_TYPE_VIDEO = 0,
typedef enum _ac_decoder_type ac_decoder_type;
/**
* This decoder is used to decode an audio stram.
*/
AC_DECODER_TYPE_AUDIO = 1
} ac_decoder_type;
/*Defines the format video/image data is outputted in*/
enum _ac_output_format {
AC_OUTPUT_RGB24 = 0,
AC_OUTPUT_BGR24 = 1,
AC_OUTPUT_RGBA32 = 2,
AC_OUTPUT_BGRA32 = 3
};
/**
* Defines the format video/image data is returned in.
*/
typedef enum _ac_output_format {
AC_OUTPUT_RGB24 = 0,
AC_OUTPUT_BGR24 = 1,
AC_OUTPUT_RGBA32 = 2,
AC_OUTPUT_BGRA32 = 3,
AC_OUTPUT_YUV420P = 4,
AC_OUTPUT_UYVY422 = 5,
AC_OUTPUT_YUYV422 = 6
} ac_output_format;
typedef enum _ac_output_format ac_output_format;
/*Contains information about the whole file/stream that has been opened. Default values are ""
/*Contains information about the whole file/stream that has been opened. Default
values are ""
for strings and -1 for integer values.*/
struct _ac_file_info {
/*Length of the file*/
int64_t duration;
};
typedef struct _ac_file_info {
/**
* Title of the media file
*/
char title[512];
typedef struct _ac_file_info ac_file_info;
typedef ac_file_info* lp_ac_file_info;
/**
* Author or artist of the media file.
*/
char author[512];
/*TAc_instance represents an Acinerella instance. Each instance can open and
decode one file at once. There can be only 26 Acinerella instances opened at
once.*/
struct _ac_instance {
/*If true, the instance currently opened a media file.*/
bool opened;
/*Contains the count of streams the media file has. This value is available
after calling the ac_open function.*/
int stream_count;
/*Set this value to change the image output format */
ac_output_format output_format;
/*Contains information about the opened stream/file*/
ac_file_info info;
};
/**
* Copyright information.
*/
char copyright[512];
typedef struct _ac_instance ac_instance;
/*Pointer on the Acinerella instance record.*/
typedef ac_instance* lp_ac_instance;
/**
* Comment stored in the file.
*/
char comment[512];
/*Contains information about an Acinerella video stream.*/
/**
* Album the media file is from.
*/
char album[512];
/**
* Year in which the media file was created.
*/
int year;
/**
* Track number.
*/
int track;
/**
* Genre of the media file.
*/
char genre[32];
/**
* Length of the file in milliseconds.
*/
int64_t duration;
/**
* Bitrate of the file.
*/
int bitrate;
} ac_file_info;
typedef ac_file_info *lp_ac_file_info;
/**
* ac_instance represents an Acinerella instance. Each instance can open and
* decode one file at once.
*/
typedef struct _ac_instance {
/**
* If true, the instance currently opened a media file.
*/
bool opened;
/**
* Contains the count of streams the media file has. This value is available
* after calling the ac_open function.
*/
int stream_count;
/**
* Set this value to change the image output format
*/
ac_output_format output_format;
/**
* Contains information about the opened stream/file
*/
ac_file_info info;
} ac_instance;
/**
* Pointer on the Acinerella instance record.
*/
typedef ac_instance *lp_ac_instance;
/**
* Contains information about an Acinerella video stream.
*/
struct _ac_video_stream_info {
/*The width of one frame.*/
int frame_width;
/*The height of one frame.*/
int frame_height;
/*The width of one pixel. 1.07 for 4:3 format, 1,42 for the 16:9 format*/
float pixel_aspect;
/*Frames per second that should be played.*/
double frames_per_second;
};
typedef struct _ac_video_stream_info ac_video_stream_info;
/*Contains information about an Acinerella audio stream.*/
struct _ac_audio_stream_info {
/*Samples per second. Default values are 44100 or 48000.*/
int samples_per_second;
/*Bits per sample. Can be 8 or 16 Bit.*/
int bit_depth;
/*Count of channels in the audio stream.*/
int channel_count;
};
typedef struct _ac_audio_stream_info ac_audio_stream_info;
/**
* The width of one frame.
*/
int frame_width;
/**
* The height of one frame.
*/
int frame_height;
/**
* The width of one pixel. 1.07 for 4:3 format, 1,42 for the 16:9 format
*/
float pixel_aspect;
/**
* Frames per second that should be played.
*/
double frames_per_second;
};
/**
* Contains information about an Acinerella audio stream.
*/
struct _ac_audio_stream_info {
/**
* Samples per second. Default values are 44100 or 48000.
*/
int samples_per_second;
/**
* Bits per sample. Can be 8, 16 or 32 Bit. In the latter case the data is
* in floating point format.
*/
int bit_depth;
/**
* Count of channels in the audio stream.
*/
int channel_count;
};
/**
* Additional info about the stream - use "video_info" when the stream
* is an video stream, "audio_info" when the stream is an audio stream.
*/
union _ac_additional_stream_info {
struct _ac_audio_stream_info audio_info;
struct _ac_video_stream_info video_info;
};
/*Contains information about an Acinerella stream.*/
struct _ac_stream_info {
/*Contains the type of the stream.*/
ac_stream_type stream_type;
ac_audio_stream_info audio_info;
ac_video_stream_info video_info;
};
typedef struct _ac_stream_info {
/**
* Contains the type of the stream.
*/
ac_stream_type stream_type;
typedef struct _ac_stream_info ac_stream_info;
/*Pointer on TAc_stream_info*/
typedef ac_stream_info* lp_ac_stream_info;
/**
* Additional data depending on the stream type. Either access the
* "audio_info" or the "video_info" field, depending on the value stored in
* the "stream_type" member.
*/
union _ac_additional_stream_info additional_info;
} ac_stream_info;
/*Contains information about an Acinerella video/audio decoder.*/
struct _ac_decoder {
/*Pointer on the Acinerella instance*/
lp_ac_instance pacInstance;
/*Contains the type of the decoder.*/
ac_decoder_type type;
/*The timecode of the currently decoded picture in seconds */
double timecode;
double video_clock;
/*Contains information about the stream the decoder is attached to.*/
ac_stream_info stream_info;
/*The index of the stream the decoder is attached to.*/
int stream_index;
/*Pointer to the buffer which contains the data.*/
char *pBuffer;
/*Size of the data in the buffer.*/
int buffer_size;
};
/**
* Pointer on ac_stream_info
*/
typedef ac_stream_info *lp_ac_stream_info;
typedef struct _ac_decoder ac_decoder;
/*Pointer on TAc_decoder.*/
typedef ac_decoder* lp_ac_decoder;
/**
* Contains information about an Acinerella video/audio decoder.
*/
typedef struct _ac_decoder {
/**
* Pointer on the Acinerella instance.
*/
lp_ac_instance pacInstance;
/*Contains information about an Acinerella package.*/
struct _ac_package {
/*The stream the package belongs to.*/
int stream_index;
};
/**
* Contains the type of the decoder.
*/
ac_decoder_type type;
typedef struct _ac_package ac_package;
/*Pointer on TAc_package*/
typedef ac_package* lp_ac_package;
/**
* The timecode of the currently decoded picture in seconds.
*/
double timecode;
/*Initializes an Acinerella instance.*/
extern lp_ac_instance CALL_CONVT ac_init(void);
extern void CALL_CONVT ac_free(lp_ac_instance pacInstance);
/**
* Contains information about the stream the decoder is attached to.
*/
ac_stream_info stream_info;
/*Opens a media file.*/
extern int CALL_CONVT ac_open2(
lp_ac_instance pacInstance,
const char* filename
);
/*Closes an opened media file.*/
extern void CALL_CONVT ac_close(lp_ac_instance pacInstance);
/*Stores information in "pInfo" about stream number "nb".*/
extern void CALL_CONVT ac_get_stream_info(lp_ac_instance pacInstance, int nb, lp_ac_stream_info info);
/**
* The index of the stream the decoder is attached to.
*/
int stream_index;
/*Reads a package from an opened media file.*/
extern lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance);
/*Frees a package that has been read.*/
extern void CALL_CONVT ac_free_package(lp_ac_package pPackage);
/**
* Pointer to the buffer which contains the data.
*/
uint8_t *pBuffer;
extern lp_ac_decoder CALL_CONVT ac_create_audio_decoder(lp_ac_instance pacInstance);
extern lp_ac_decoder CALL_CONVT ac_create_video_decoder(lp_ac_instance pacInstance);
/*Frees an created decoder.*/
extern void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder);
/*Decodes a package using the specified decoder. The decodec data is stored in the
"buffer" property of the decoder.*/
extern int CALL_CONVT ac_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder);
extern int CALL_CONVT ac_drop_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder);
/**
* Size of the data in the buffer.
*/
int buffer_size;
} ac_decoder;
typedef ac_decoder *lp_ac_decoder;
/**
* Contains information about an Acinerella package.
*/
typedef struct _ac_package {
/*The stream the package belongs to.*/
int stream_index;
} ac_package;
typedef ac_package *lp_ac_package;
typedef void *lp_ac_proberesult;
/**
* Callback function used to ask the application to read data. Should return
* the number of bytes read or an value smaller than zero if an error occured.
*/
typedef int (CALL_CONVT *ac_read_callback)(void *sender, uint8_t *buf,
int size);
/**
* Callback function used to ask the application to seek.
*
* @param sender is the pointer specified in ac_open.
* @param pos is the position to which the stream should be seeked.
* @param whence specifies whether the seeking should be relative to the
* beginning of the file (0, SEEK_SET), relative to the current location (1,
* SEEK_CUR), or relative to the end of the file (2, SEEK_END)
* @return 0 if the function succeeds, -1 on failure.
*/
typedef int64_t (CALL_CONVT *ac_seek_callback)(void *sender, int64_t pos,
int whence);
/**
* Callback function that is used to notify the application when the data stream
* is opened or closed. For example the file pointer should be resetted to zero
* when the "open" function is called.
*/
typedef int (CALL_CONVT *ac_openclose_callback)(void *sender);
/**
* Initializes an Acinerella instance.
*
* @return a pointer at an acinerella instance. The instance must be freed using
* ac_free.
*/
EXTERN lp_ac_instance CALL_CONVT ac_init(void);
/**
* Initializes an Acinerella instance with a specific output format.
*
* @return a pointer at an acinerella instance. The instance must be freed using
* ac_free.
*/
EXTERN lp_ac_instance CALL_CONVT ac_init_of(ac_output_format outputFormat);
/**
* Frees a previously created Acinerella instance.
*
* @param pacInstance is the Acinerella instance that should be freed.
*/
EXTERN void CALL_CONVT ac_free(lp_ac_instance pacInstance);
/**
* Opens a media stream.
*
* @param inst specifies the Acinerella Instance the stream should be opened
* for.
* @param sender specifies a pointer that is sent to all callback functions to
* allow you to do object orientated programming. May be NULL.
* @param open_proc specifies the callback function that is called, when the
* media file is opened. May be NULL.
* @param seek_proc specifies the callback function that is called, when the
* ffmpeg decoder wants to seek in the file. May be NULL.
* @param close_proc specifies the callback function that is called when the
* media file is closed. May be NULL.
* @param proberesult is a pointer at a structure previously returned by
* ac_probe_input_buffer. May be NULL.
*/
EXTERN int CALL_CONVT
ac_open(lp_ac_instance pacInstance, void *sender,
ac_openclose_callback open_proc, ac_read_callback read_proc,
ac_seek_callback seek_proc, ac_openclose_callback close_proc,
lp_ac_proberesult proberesult);
/**
* Opens a media file.
*
* @param inst specifies the Acinerella Instance the stream should be opened
* for.
* @param file is the name of the file that should be opened.
*/
EXTERN int CALL_CONVT
ac_open_file(lp_ac_instance pacInstance, const char *filename);
/**
* Closes an opened media file.
*/
EXTERN void CALL_CONVT ac_close(lp_ac_instance pacInstance);
/**
* Stores information in "pInfo" about stream number "nb".
*/
EXTERN void CALL_CONVT ac_get_stream_info(lp_ac_instance pacInstance, int nb,
lp_ac_stream_info info);
/**
* Reads a package from an opened media file.
*
* @param pacInstance is the Acinerella instance from which the data should be
* read.
* @return a pointer at a ac_package structure or NULL on failure. The returned
* pointer must be freed with ac_free_package after use.
*/
EXTERN lp_ac_package CALL_CONVT ac_read_package(lp_ac_instance pacInstance);
/**
* Frees a package that has been read.
*
* @param pPackage is a pointer at the ac_package that should be freed. May be
* NULL in which case no operation is performed.
*/
EXTERN void CALL_CONVT ac_free_package(lp_ac_package pPackage);
/**
* Creates an decoder for the specified stream number. Returns NULL if no
* decoder could be found.
*/
EXTERN lp_ac_decoder CALL_CONVT
ac_create_decoder(lp_ac_instance pacInstance, int nb);
/**
* Frees an created decoder.
*/
EXTERN void CALL_CONVT ac_free_decoder(lp_ac_decoder pDecoder);
/**
* Decodes a package using the specified decoder. The decoded data is stored in
* the "buffer" property of the decoder.
*
* @param pPackage is the package that should be decoded, previously read by the
* ac_read_package method.
* @param pDecoder is the decoder instance that should be used to decode the
* package -- use the stream index stored in the package to determine the
* correct decoder.
*/
EXTERN int CALL_CONVT
ac_decode_package(lp_ac_package pPackage, lp_ac_decoder pDecoder);
/**
* Decodes a package using the specified decoder and skips it. Returns true if a frame was skiped.
*
* @param pPackage is the package that should be decoded, previously read by the
* ac_read_package method.
* @param pDecoder is the decoder instance that should be used to decode the
* package -- use the stream index stored in the package to determine the
* correct decoder.
*/
EXTERN int CALL_CONVT
ac_skip_package(lp_ac_package pPackage, lp_ac_decoder pDecoder);
/**
* Decodes a packages using the specified decoder and skips num frames. Returns true if num frames where skiped.
*
* @param pacInstance is the Acinerella instance from which the data should be
* read.
* @param pDecoder is the decoder instance that should be used to decode the
* package -- use the stream index stored in the package to determine the
* correct decoder.
* @num number of frames to skip.
*/
EXTERN int CALL_CONVT
ac_skip_frames(lp_ac_instance pacInstance, lp_ac_decoder pDecoder, int num);
/**
* Decodes a video frame using the specified decoder and strores the result in the decoder. Returns true if a frame cloud be decoded.
*
* @param pacInstance is the Acinerella instance from which the data should be
* read.
* @param pDecoder is the decoder instance that should be used to decode the
* package -- use the stream index stored in the package to determine the
* correct decoder.
*/
EXTERN int CALL_CONVT
ac_get_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder);
/**
* Decodes a audio frame using the specified decoder and strores the result in the decoder. Returns true if a frame cloud be decoded.
*
* @param pacInstance is the Acinerella instance from which the data should be
* read.
* @param pDecoder is the decoder instance that should be used to decode the
* package -- use the stream index stored in the package to determine the
* correct decoder.
*/
EXTERN int CALL_CONVT
ac_get_audio_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder);
/**
* Seeks to the given target position in the file. The seek funtion is not able
* to seek a single audio/video stream but seeks the whole file forward. The
* stream number paremter (nb) is only used for the timecode reference.
* The parameter "dir" specifies the seek direction: 0 for forward, -1 for
* backward. The target_pos paremeter is in milliseconds. Returns 1 if the
* functions succeded.
*/
EXTERN int CALL_CONVT
ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos);
/**
* Checks whether the given input buffer contains data that can potentially be
* decoded by Acinerella. If yes, returns a pointer that may be passed to
* ac_open in order to speed up the open process. Otherwise returns NULL.
*
* @param buf is a pointer to the buffer in which the data is stored.
* @param bufsize is the size of the buffer.
* @param filename is the name of the file the buffer originated from. May be
* empty or NULL.
* @param score_max is set to the maximum of the previous value of score_max
* and an internal score value.
* @return either a pointer at an internal "probe result" or NULL if the buffer
* contains no decodeable data.
*/
EXTERN lp_ac_proberesult CALL_CONVT
ac_probe_input_buffer(uint8_t *buf, int bufsize, char *filename,
int *score_max);
#endif /* _ACINERELLA_H_ */
extern int CALL_CONVT ac_get_audio_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder);
extern int CALL_CONVT ac_get_frame(lp_ac_instance pacInstance, lp_ac_decoder pDecoder);
extern int CALL_CONVT ac_skip_frames(lp_ac_instance pacInstance, lp_ac_decoder pDecoder, int num);
/*Seeks to the given target position in the file. The seek funtion is not able to seek a single audio/video stream
but seeks the whole file forward. The stream number paremter (nb) is only used for the timecode reference.
The parameter "dir" specifies the seek direction: 0 for forward, -1 for backward.
The target_pos paremeter is in milliseconds. Returns 1 if the functions succeded.*/
extern int CALL_CONVT ac_seek(lp_ac_decoder pDecoder, int dir, int64_t target_pos);
#endif /*VIDEOPLAY_H*/
+6 -6
View File
@@ -536,10 +536,10 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Rebuild for automatic package restore. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.4\build\vocaluxe.dependencies.acinerella.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.acinerella.1.0.4\build\vocaluxe.dependencies.acinerella.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.4\build\vocaluxe.dependencies.ffmpeg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.ffmpeg.1.0.4\build\vocaluxe.dependencies.ffmpeg.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" />
@@ -548,12 +548,12 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets'))" />
</Target>
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.4\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.4\build\vocaluxe.dependencies.acinerella.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.ffmpeg.1.0.4\build\vocaluxe.dependencies.ffmpeg.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.4\build\vocaluxe.dependencies.ffmpeg.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" />
@@ -562,5 +562,5 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb
<Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" />
</Project>
+3 -3
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="vocaluxe.dependencies" version="1.0.10" targetFramework="net40" />
<package id="vocaluxe.dependencies.acinerella" version="1.0.3" targetFramework="net40" />
<package id="vocaluxe.dependencies" version="1.0.11" targetFramework="net40" />
<package id="vocaluxe.dependencies.acinerella" version="1.0.4" targetFramework="net40" />
<package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.3" targetFramework="net40" />
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.4" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamer" version="1.0.2" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" />