1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

support hls ingest, fix the bugs.

This commit is contained in:
winlin 2015-04-20 18:31:45 +08:00
parent 2239e9f1fd
commit ba6736839b
3 changed files with 234 additions and 80 deletions

View file

@ -169,6 +169,23 @@ int SrsTsMessage::stream_number()
return -1;
}
SrsTsMessage* SrsTsMessage::detach()
{
// @remark the packet cannot be used, but channel is ok.
SrsTsMessage* cp = new SrsTsMessage(channel, NULL);
cp->start_pts = start_pts;
cp->write_pcr = write_pcr;
cp->is_discontinuity = is_discontinuity;
cp->dts = dts;
cp->pts = pts;
cp->sid = sid;
cp->PES_packet_length = PES_packet_length;
cp->continuity_counter = continuity_counter;
cp->payload = payload;
payload = NULL;
return cp;
}
ISrsTsHandler::ISrsTsHandler()
{
}

View file

@ -309,6 +309,13 @@ public:
* @return the stream number for audio/video; otherwise, -1.
*/
virtual int stream_number();
public:
/**
* detach the ts message,
* for user maybe need to parse the message by queue.
* @remark we always use the payload of original message.
*/
virtual SrsTsMessage* detach();
};
/**