mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #738, add srs ingest mp4 tool
This commit is contained in:
parent
33ba6cdee2
commit
34a8eb6113
20 changed files with 366 additions and 274 deletions
|
@ -25,6 +25,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include <srs_kernel_error.hpp>
|
||||
|
||||
SrsMp4Box::SrsMp4Box()
|
||||
{
|
||||
size = 0;
|
||||
|
@ -422,3 +424,19 @@ SrsMp4SampleSizeBox::~SrsMp4SampleSizeBox()
|
|||
srs_freepa(entry_sizes);
|
||||
}
|
||||
|
||||
SrsMp4Decoder::SrsMp4Decoder()
|
||||
{
|
||||
}
|
||||
|
||||
SrsMp4Decoder::~SrsMp4Decoder()
|
||||
{
|
||||
}
|
||||
|
||||
int SrsMp4Decoder::initialize(ISrsReader* r)
|
||||
{
|
||||
srs_assert(r);
|
||||
reader = r;
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <string>
|
||||
|
||||
class ISrsReader;
|
||||
|
||||
/**
|
||||
* 4.2 Object Structure
|
||||
* ISO_IEC_14496-12-base-format-2012.pdf, page 16
|
||||
|
@ -760,5 +762,24 @@ public:
|
|||
virtual ~SrsMp4SampleSizeBox();
|
||||
};
|
||||
|
||||
/**
|
||||
* The MP4 demuxer.
|
||||
*/
|
||||
class SrsMp4Decoder
|
||||
{
|
||||
private:
|
||||
ISrsReader* reader;
|
||||
public:
|
||||
SrsMp4Decoder();
|
||||
virtual ~SrsMp4Decoder();
|
||||
public:
|
||||
/**
|
||||
* Initialize the decoder with a reader r.
|
||||
* @param r The underlayer io reader, user must manage it for decoder never open/free it,
|
||||
* the decoder just read data from the reader.
|
||||
*/
|
||||
virtual int initialize(ISrsReader* r);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue