mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug, when disable all, some code of HLS must be exported.
This commit is contained in:
parent
e53655ee83
commit
ccd99381e6
2 changed files with 38 additions and 26 deletions
|
@ -23,6 +23,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
#include <srs_app_hls.hpp>
|
#include <srs_app_hls.hpp>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the public data, event HLS disable, others can use it.
|
||||||
|
*/
|
||||||
|
// 0 = 5.5 kHz = 5512 Hz
|
||||||
|
// 1 = 11 kHz = 11025 Hz
|
||||||
|
// 2 = 22 kHz = 22050 Hz
|
||||||
|
// 3 = 44 kHz = 44100 Hz
|
||||||
|
int flv_sample_rates[] = {5512, 11025, 22050, 44100};
|
||||||
|
|
||||||
|
// the sample rates in the codec,
|
||||||
|
// in the sequence header.
|
||||||
|
int aac_sample_rates[] =
|
||||||
|
{
|
||||||
|
96000, 88200, 64000, 48000,
|
||||||
|
44100, 32000, 24000, 22050,
|
||||||
|
16000, 12000, 11025, 8000,
|
||||||
|
7350, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the HLS section, only available when HLS enabled.
|
||||||
|
*/
|
||||||
#ifdef SRS_AUTO_HLS
|
#ifdef SRS_AUTO_HLS
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -76,22 +98,6 @@ using namespace std;
|
||||||
// in ms, for HLS aac flush the audio
|
// in ms, for HLS aac flush the audio
|
||||||
#define SRS_CONF_DEFAULT_AAC_DELAY 100
|
#define SRS_CONF_DEFAULT_AAC_DELAY 100
|
||||||
|
|
||||||
// 0 = 5.5 kHz = 5512 Hz
|
|
||||||
// 1 = 11 kHz = 11025 Hz
|
|
||||||
// 2 = 22 kHz = 22050 Hz
|
|
||||||
// 3 = 44 kHz = 44100 Hz
|
|
||||||
int flv_sample_rates[] = {5512, 11025, 22050, 44100};
|
|
||||||
|
|
||||||
// the sample rates in the codec,
|
|
||||||
// in the sequence header.
|
|
||||||
int aac_sample_rates[] =
|
|
||||||
{
|
|
||||||
96000, 88200, 64000, 48000,
|
|
||||||
44100, 32000, 24000, 22050,
|
|
||||||
16000, 12000, 11025, 8000,
|
|
||||||
7350, 0, 0, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
// @see: ngx_rtmp_mpegts_header
|
// @see: ngx_rtmp_mpegts_header
|
||||||
u_int8_t mpegts_header[] = {
|
u_int8_t mpegts_header[] = {
|
||||||
/* TS */
|
/* TS */
|
||||||
|
|
|
@ -29,6 +29,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include <srs_core.hpp>
|
#include <srs_core.hpp>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the public data, event HLS disable, others can use it.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* the flv sample rate map
|
||||||
|
*/
|
||||||
|
extern int flv_sample_rates[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the aac sample rate map
|
||||||
|
*/
|
||||||
|
extern int aac_sample_rates[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the HLS section, only available when HLS enabled.
|
||||||
|
*/
|
||||||
#ifdef SRS_AUTO_HLS
|
#ifdef SRS_AUTO_HLS
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -47,16 +63,6 @@ class SrsPithyPrint;
|
||||||
class SrsSource;
|
class SrsSource;
|
||||||
class SrsFileWriter;
|
class SrsFileWriter;
|
||||||
|
|
||||||
/**
|
|
||||||
* the flv sample rate map
|
|
||||||
*/
|
|
||||||
extern int flv_sample_rates[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* the aac sample rate map
|
|
||||||
*/
|
|
||||||
extern int aac_sample_rates[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* jitter correct for audio,
|
* jitter correct for audio,
|
||||||
* the sample rate 44100/32000 will lost precise,
|
* the sample rate 44100/32000 will lost precise,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue