mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
Merge branch '4.0release' into develop
This commit is contained in:
commit
576be75f00
4 changed files with 43 additions and 13 deletions
|
@ -208,6 +208,7 @@ For previous versions, please read:
|
|||
|
||||
## V3 changes
|
||||
|
||||
* v3.0, 2020-12-17, Fix [#1548][bug #1548], Add edts in MP4 for Windows10. 3.0.154
|
||||
* <strong>v3.0, 2020-10-31, [3.0 release2(3.0.153)][r3.0r2] released. 122663 lines.</strong>
|
||||
* v3.0, 2020-10-31, Fix [#509][bug #509], Always malloc stack on heap. 3.0.153
|
||||
* v3.0, 2020-10-31, Remove some global elements for debugging. 3.0.152
|
||||
|
@ -1782,6 +1783,7 @@ Winlin
|
|||
[bug #1629]: https://github.com/ossrs/srs/issues/1629
|
||||
[bug #1780]: https://github.com/ossrs/srs/issues/1780
|
||||
[bug #1987]: https://github.com/ossrs/srs/issues/1987
|
||||
[bug #1548]: https://github.com/ossrs/srs/issues/1548
|
||||
[bug #yyyyyyyyyyyyy]: https://github.com/ossrs/srs/issues/yyyyyyyyyyyyy
|
||||
|
||||
[bug #1631]: https://github.com/ossrs/srs/issues/1631
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#ifndef SRS_CORE_VERSION3_HPP
|
||||
#define SRS_CORE_VERSION3_HPP
|
||||
|
||||
#define SRS_VERSION3_REVISION 153
|
||||
#define SRS_VERSION3_REVISION 154
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1758,6 +1758,12 @@ void SrsMp4TrackBox::set_tkhd(SrsMp4TrackHeaderBox* v)
|
|||
boxes.insert(boxes.begin(), v);
|
||||
}
|
||||
|
||||
void SrsMp4TrackBox::set_edts(SrsMp4EditBox* v)
|
||||
{
|
||||
remove(SrsMp4BoxTypeEDTS);
|
||||
boxes.insert(boxes.begin(), v);
|
||||
}
|
||||
|
||||
SrsMp4ChunkOffsetBox* SrsMp4TrackBox::stco()
|
||||
{
|
||||
SrsMp4SampleTableBox* box = stbl();
|
||||
|
@ -2022,6 +2028,12 @@ SrsMp4EditBox::~SrsMp4EditBox()
|
|||
{
|
||||
}
|
||||
|
||||
void SrsMp4EditBox::set_elst(SrsMp4EditListBox* v)
|
||||
{
|
||||
remove(SrsMp4BoxTypeELST);
|
||||
boxes.insert(boxes.begin(), v);
|
||||
}
|
||||
|
||||
SrsMp4ElstEntry::SrsMp4ElstEntry() : segment_duration(0), media_time(0), media_rate_integer(0)
|
||||
{
|
||||
media_rate_fraction = 0;
|
||||
|
@ -2744,12 +2756,10 @@ SrsMp4DataEntryBox* SrsMp4DataReferenceBox::entry_at(int index)
|
|||
return entries.at(index);
|
||||
}
|
||||
|
||||
void SrsMp4DataReferenceBox::append(SrsMp4Box* v)
|
||||
// Note that box must be SrsMp4DataEntryBox*
|
||||
void SrsMp4DataReferenceBox::append(SrsMp4Box* box)
|
||||
{
|
||||
SrsMp4DataEntryBox* pv = dynamic_cast<SrsMp4DataEntryBox*>(v);
|
||||
if (pv) {
|
||||
entries.push_back(pv);
|
||||
}
|
||||
entries.push_back((SrsMp4DataEntryBox*)box);
|
||||
}
|
||||
|
||||
int SrsMp4DataReferenceBox::nb_header()
|
||||
|
@ -3767,12 +3777,10 @@ SrsMp4SampleEntry* SrsMp4SampleDescriptionBox::entrie_at(int index)
|
|||
return entries.at(index);
|
||||
}
|
||||
|
||||
void SrsMp4SampleDescriptionBox::append(SrsMp4Box* v)
|
||||
// Note that box must be SrsMp4SampleEntry*
|
||||
void SrsMp4SampleDescriptionBox::append(SrsMp4Box* box)
|
||||
{
|
||||
SrsMp4SampleEntry* pv = dynamic_cast<SrsMp4SampleEntry*>(v);
|
||||
if (pv) {
|
||||
entries.push_back(pv);
|
||||
}
|
||||
entries.push_back((SrsMp4SampleEntry*)box);
|
||||
}
|
||||
|
||||
int SrsMp4SampleDescriptionBox::nb_header()
|
||||
|
@ -5779,6 +5787,18 @@ srs_error_t SrsMp4Encoder::flush()
|
|||
if (nb_videos || !pavcc.empty()) {
|
||||
SrsMp4TrackBox* trak = new SrsMp4TrackBox();
|
||||
moov->add_trak(trak);
|
||||
|
||||
SrsMp4EditBox* edts = new SrsMp4EditBox();
|
||||
trak->set_edts(edts);
|
||||
|
||||
SrsMp4EditListBox* elst = new SrsMp4EditListBox();
|
||||
edts->set_elst(elst);
|
||||
elst->version = 0;
|
||||
|
||||
SrsMp4ElstEntry entry;
|
||||
entry.segment_duration = mvhd->duration_in_tbn;
|
||||
entry.media_rate_integer = 1;
|
||||
elst->entries.push_back(entry);
|
||||
|
||||
SrsMp4TrackHeaderBox* tkhd = new SrsMp4TrackHeaderBox();
|
||||
trak->set_tkhd(tkhd);
|
||||
|
|
|
@ -71,6 +71,8 @@ class SrsMp4TrackFragmentBox;
|
|||
class SrsMp4TrackFragmentHeaderBox;
|
||||
class SrsMp4TrackFragmentDecodeTimeBox;
|
||||
class SrsMp4TrackFragmentRunBox;
|
||||
class SrsMp4EditBox;
|
||||
class SrsMp4EditListBox;
|
||||
|
||||
// 4.2 Object Structure
|
||||
// ISO_IEC_14496-12-base-format-2012.pdf, page 16
|
||||
|
@ -766,6 +768,8 @@ public:
|
|||
// Get the track header box.
|
||||
virtual SrsMp4TrackHeaderBox* tkhd();
|
||||
virtual void set_tkhd(SrsMp4TrackHeaderBox* v);
|
||||
// Set the EDTS box.
|
||||
virtual void set_edts(SrsMp4EditBox* v);
|
||||
public:
|
||||
// Get the chunk offset box.
|
||||
virtual SrsMp4ChunkOffsetBox* stco();
|
||||
|
@ -874,6 +878,8 @@ class SrsMp4EditBox : public SrsMp4Box
|
|||
public:
|
||||
SrsMp4EditBox();
|
||||
virtual ~SrsMp4EditBox();
|
||||
public:
|
||||
virtual void set_elst(SrsMp4EditListBox* v);
|
||||
};
|
||||
|
||||
// 8.6.6 Edit List Box
|
||||
|
@ -1173,7 +1179,8 @@ public:
|
|||
public:
|
||||
virtual uint32_t entry_count();
|
||||
virtual SrsMp4DataEntryBox* entry_at(int index);
|
||||
virtual void append(SrsMp4Box* v);
|
||||
// Note that box must be SrsMp4DataEntryBox*
|
||||
virtual void append(SrsMp4Box* box);
|
||||
protected:
|
||||
virtual int nb_header();
|
||||
virtual srs_error_t encode_header(SrsBuffer* buf);
|
||||
|
@ -1520,7 +1527,8 @@ public:
|
|||
public:
|
||||
virtual uint32_t entry_count();
|
||||
virtual SrsMp4SampleEntry* entrie_at(int index);
|
||||
virtual void append(SrsMp4Box* v);
|
||||
// Note that box must be SrsMp4SampleEntry*
|
||||
virtual void append(SrsMp4Box* box);
|
||||
protected:
|
||||
virtual int nb_header();
|
||||
virtual srs_error_t encode_header(SrsBuffer* buf);
|
||||
|
|
Loading…
Reference in a new issue