mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
move codec to kernel.
This commit is contained in:
parent
608083d42f
commit
4970664e37
13 changed files with 116 additions and 19 deletions
|
@ -38,7 +38,7 @@ using namespace std;
|
|||
#include <srs_kernel_stream.hpp>
|
||||
#include <srs_kernel_utility.hpp>
|
||||
#include <srs_app_http_hooks.hpp>
|
||||
#include <srs_app_codec.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
#include <srs_kernel_flv.hpp>
|
||||
|
||||
SrsFlvSegment::SrsFlvSegment()
|
||||
|
|
|
@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
using namespace std;
|
||||
|
||||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_app_codec.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_protocol_rtmp_stack.hpp>
|
||||
#include <srs_app_config.hpp>
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace std;
|
|||
#include <srs_protocol_rtmp_stack.hpp>
|
||||
#include <srs_core_autofree.hpp>
|
||||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_app_codec.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
#include <srs_app_hls.hpp>
|
||||
#include <srs_app_forward.hpp>
|
||||
#include <srs_app_config.hpp>
|
||||
|
|
|
@ -21,7 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <srs_app_codec.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
|
@ -21,11 +21,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef SRS_APP_CODEC_HPP
|
||||
#define SRS_APP_CODEC_HPP
|
||||
#ifndef SRS_KERNEL_CODEC_HPP
|
||||
#define SRS_KERNEL_CODEC_HPP
|
||||
|
||||
/*
|
||||
#include <srs_app_codec.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
*/
|
||||
|
||||
#include <srs_core.hpp>
|
|
@ -21,8 +21,8 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef SRS_APP_FLV_HPP
|
||||
#define SRS_APP_FLV_HPP
|
||||
#ifndef SRS_KERNEL_FLV_HPP
|
||||
#define SRS_KERNEL_FLV_HPP
|
||||
|
||||
/*
|
||||
#include <srs_kernel_flv.hpp>
|
||||
|
|
|
@ -40,6 +40,7 @@ using namespace std;
|
|||
#include <srs_kernel_stream.hpp>
|
||||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_kernel_flv.hpp>
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
||||
// if user want to define log, define the folowing macro.
|
||||
#ifndef SRS_RTMP_USER_DEFINED_LOG
|
||||
|
@ -496,6 +497,12 @@ int64_t srs_flv_tellg(srs_flv_t flv)
|
|||
return context->fs.tellg();
|
||||
}
|
||||
|
||||
void srs_flv_lseek(srs_flv_t flv, int64_t offset)
|
||||
{
|
||||
FlvContext* context = (FlvContext*)flv;
|
||||
context->fs.lseek(offset);
|
||||
}
|
||||
|
||||
flv_bool srs_flv_is_eof(int error_code)
|
||||
{
|
||||
return error_code == ERROR_SYSTEM_FILE_EOF;
|
||||
|
|
|
@ -167,6 +167,8 @@ int srs_flv_read_tag_header(srs_flv_t flv, char* ptype, int32_t* pdata_size, u_i
|
|||
int srs_flv_read_tag_data(srs_flv_t flv, char* data, int32_t size);
|
||||
/* file stream tellg to get offset */
|
||||
int64_t srs_flv_tellg(srs_flv_t flv);
|
||||
/* seek file stream, offset is form the start of file */
|
||||
void srs_flv_lseek(srs_flv_t flv, int64_t offset);
|
||||
/* whether the error code indicates EOF */
|
||||
flv_bool srs_flv_is_eof(int error_code);
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ file
|
|||
kernel readonly separator,
|
||||
..\kernel\srs_kernel_buffer.hpp,
|
||||
..\kernel\srs_kernel_buffer.cpp,
|
||||
..\kernel\srs_kernel_codec.hpp,
|
||||
..\kernel\srs_kernel_codec.cpp,
|
||||
..\kernel\srs_kernel_error.hpp,
|
||||
..\kernel\srs_kernel_error.cpp,
|
||||
..\kernel\srs_kernel_flv.hpp,
|
||||
|
@ -43,8 +45,6 @@ file
|
|||
app readonly separator,
|
||||
..\app\srs_app_bandwidth.hpp,
|
||||
..\app\srs_app_bandwidth.cpp,
|
||||
..\app\srs_app_codec.hpp,
|
||||
..\app\srs_app_codec.cpp,
|
||||
..\app\srs_app_conn.hpp,
|
||||
..\app\srs_app_conn.cpp,
|
||||
..\app\srs_app_config.hpp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue