-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
512 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "maix_util.hpp" | ||
#include "maix_app.hpp" | ||
#include "signal.h" | ||
|
||
namespace maix::sys | ||
{ | ||
static void signal_handle(int signal) | ||
{ | ||
const char *signal_msg = NULL; | ||
switch (signal) { | ||
case SIGINT: | ||
maix::app::set_exit_flag(true); | ||
raise(SIGINT); | ||
break; | ||
default: signal_msg = "UNKNOWN"; break; | ||
} | ||
} | ||
|
||
void register_default_signal_handle() { | ||
signal(SIGILL, signal_handle); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "maix_sys.hpp" | ||
#include "maix_app.hpp" | ||
#include "signal.h" | ||
|
||
namespace maix::sys | ||
{ | ||
static void signal_handle(int signal) | ||
{ | ||
const char *signal_msg = NULL; | ||
switch (signal) { | ||
case SIGINT: | ||
maix::app::set_exit_flag(true); | ||
raise(SIGINT); | ||
break; | ||
default: signal_msg = "UNKNOWN"; break; | ||
} | ||
} | ||
|
||
void register_default_signal_handle() { | ||
signal(SIGILL, signal_handle); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef __MAIX_AVC2FLV | ||
#define __MAIX_AVC2FLV | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
#include "stdint.h" | ||
|
||
int maix_avc2flv_init(int max_buff_size); | ||
int maix_avc2flv_deinit(); | ||
int maix_avc2flv_prepare(uint8_t *data, int data_size); | ||
int maix_avc2flv_iterate(void **nalu, int *size); | ||
int maix_avc2flv(void *nalu, int nalu_size, uint32_t pts, uint32_t dts, uint8_t **flv, int *flv_size); | ||
|
||
// need free data after used | ||
int maix_flv_get_tail(uint8_t **data, int *size); | ||
// need free data after used | ||
int maix_flv_get_header(int audio, int video, uint8_t **data, int *size); | ||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // __MAIX_AVC2FLV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.