mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 07:41:09 -06:00
ENH: refine the timestamp when using P1P
the timestamp of mjpeg is not accurate we simulate one Change-Id: I9198f1ba930994cc4f86e8d3a3c778539d04ccb3
This commit is contained in:
parent
3d378563b5
commit
6b15afc7b6
4 changed files with 81 additions and 53 deletions
|
@ -23,11 +23,6 @@ extern "C" {
|
|||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
|
||||
/* We need these workarounds since we're compiling C source, not C++. */
|
||||
typedef enum Bambu_StreamType Bambu_StreamType;
|
||||
typedef struct Bambu_StreamInfo Bambu_StreamInfo;
|
||||
typedef struct Bambu_Sample Bambu_Sample;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -40,31 +35,33 @@ typedef void* Bambu_Tunnel;
|
|||
|
||||
typedef void (*Logger)(void * context, int level, tchar const* msg);
|
||||
|
||||
enum Bambu_StreamType
|
||||
typedef enum __Bambu_StreamType
|
||||
{
|
||||
VIDE,
|
||||
AUDI
|
||||
};
|
||||
} Bambu_StreamType;
|
||||
|
||||
enum Bambu_VideoSubType
|
||||
typedef enum __Bambu_VideoSubType
|
||||
{
|
||||
AVC1,
|
||||
};
|
||||
MJPG,
|
||||
} Bambu_VideoSubType;
|
||||
|
||||
enum Bambu_AudioSubType
|
||||
typedef enum __Bambu_AudioSubType
|
||||
{
|
||||
MP4A
|
||||
};
|
||||
} Bambu_AudioSubType;
|
||||
|
||||
enum Bambu_FormatType
|
||||
typedef enum __Bambu_FormatType
|
||||
{
|
||||
video_avc_packet,
|
||||
video_avc_byte_stream,
|
||||
video_jpeg,
|
||||
audio_raw,
|
||||
audio_adts
|
||||
};
|
||||
} Bambu_FormatType;
|
||||
|
||||
struct Bambu_StreamInfo
|
||||
typedef struct __Bambu_StreamInfo
|
||||
{
|
||||
Bambu_StreamType type;
|
||||
int sub_type;
|
||||
|
@ -84,33 +81,34 @@ struct Bambu_StreamInfo
|
|||
} format;
|
||||
int format_type;
|
||||
int format_size;
|
||||
int max_frame_size;
|
||||
unsigned char const * format_buffer;
|
||||
};
|
||||
} Bambu_StreamInfo;
|
||||
|
||||
enum Bambu_SampleFlag
|
||||
typedef enum __Bambu_SampleFlag
|
||||
{
|
||||
f_sync = 1
|
||||
};
|
||||
} Bambu_SampleFlag;
|
||||
|
||||
struct Bambu_Sample
|
||||
typedef struct __Bambu_Sample
|
||||
{
|
||||
int itrack;
|
||||
int size;
|
||||
int flags;
|
||||
unsigned char const * buffer;
|
||||
unsigned long long decode_time;
|
||||
};
|
||||
} Bambu_Sample;
|
||||
|
||||
enum Bambu_Error
|
||||
typedef enum __Bambu_Error
|
||||
{
|
||||
Bambu_success,
|
||||
Bambu_stream_end,
|
||||
Bambu_would_block,
|
||||
Bambu_would_block,
|
||||
Bambu_buffer_limit
|
||||
};
|
||||
} Bambu_Error;
|
||||
|
||||
#ifdef BAMBU_DYNAMIC
|
||||
struct BambuLib {
|
||||
typedef struct __BambuLib {
|
||||
#endif
|
||||
|
||||
BAMBU_EXPORT int BAMBU_FUNC(Bambu_Create)(Bambu_Tunnel* tunnel, char const* path);
|
||||
|
@ -148,7 +146,7 @@ BAMBU_EXPORT char const* BAMBU_FUNC(Bambu_GetLastErrorMsg)();
|
|||
BAMBU_EXPORT void BAMBU_FUNC(Bambu_FreeLogMsg)(tchar const* msg);
|
||||
|
||||
#ifdef BAMBU_DYNAMIC
|
||||
};
|
||||
} BambuLib;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue