Skip to content

Commit

Permalink
MP3: Upgrade mpegts.js to support HTTP-TS with mp3. v5.0.126 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jan 1, 2023
1 parent 3727d05 commit 02a18b3
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The changelog for SRS.

## SRS 5.0 Changelog

* v5.0, 2023-01-01, For [#296](https://github.com/ossrs/srs/issues/296): MP3: Upgrade mpegts.js to support HTTP-TS with mp3. v5.0.126
* v5.0, 2023-01-01, For [#3349](https://github.com/ossrs/srs/issues/3349): API: Fix duplicated on_stop callback event bug. v5.0.125
* v5.0, 2022-12-31, GB28181: Enable regression test for gb28181. v5.0.122
* v5.0, 2022-12-31, Refine configure to guess OS automatically. v5.0.121
Expand Down
9 changes: 0 additions & 9 deletions trunk/research/players/js/mpegts-1.6.10.min.js

This file was deleted.

1 change: 0 additions & 1 deletion trunk/research/players/js/mpegts-1.6.10.min.js.map

This file was deleted.

9 changes: 9 additions & 0 deletions trunk/research/players/js/mpegts-1.7.2.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions trunk/research/players/js/mpegts.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion trunk/research/players/srs_player.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</body>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/mpegts-1.6.10.min.js"></script>
<script type="text/javascript" src="js/mpegts-1.7.2.min.js"></script>
<script type="text/javascript" src="js/hls-0.14.17.min.js"></script>
<script type="text/javascript" src="js/dash-v4.5.1.all.min.js"></script>
<script type="text/javascript" src="js/json2.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 125
#define VERSION_REVISION 126

#endif
16 changes: 8 additions & 8 deletions trunk/src/kernel/srs_kernel_ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,12 +2653,12 @@ SrsTsContextWriter::~SrsTsContextWriter()
srs_error_t SrsTsContextWriter::write_audio(SrsTsMessage* audio)
{
srs_error_t err = srs_success;
srs_info("hls: write audio pts=%" PRId64 ", dts=%" PRId64 ", size=%d",
audio->pts, audio->dts, audio->PES_packet_length);

srs_info("hls: write audio codec=%d/%d, pts=%" PRId64 ", dts=%" PRId64 ", size=%d",
acodec_, vcodec_, audio->pts, audio->dts, audio->PES_packet_length);

if ((err = context->encode(writer, audio, vcodec, acodec_)) != srs_success) {
return srs_error_wrap(err, "ts: write audio");
return srs_error_wrap(err, "ts: write audio acodec=%d, vcodec=%d", acodec_, vcodec);
}
srs_info("hls encode audio ok");

Expand All @@ -2669,11 +2669,11 @@ srs_error_t SrsTsContextWriter::write_video(SrsTsMessage* video)
{
srs_error_t err = srs_success;

srs_info("hls: write video pts=%" PRId64 ", dts=%" PRId64 ", size=%d",
video->pts, video->dts, video->PES_packet_length);
srs_info("hls: write video codec=%d/%d, pts=%" PRId64 ", dts=%" PRId64 ", size=%d",
acodec_, vcodec_, video->pts, video->dts, video->PES_packet_length);

if ((err = context->encode(writer, video, vcodec, acodec_)) != srs_success) {
return srs_error_wrap(err, "ts: write video");
return srs_error_wrap(err, "ts: write video acodec=%d, vcodec=%d", acodec_, vcodec);
}
srs_info("hls encode video ok");

Expand Down Expand Up @@ -3105,7 +3105,7 @@ srs_error_t SrsTsTransmuxer::initialize(ISrsStreamWriter* fw)

srs_freep(tscw);
// TODO: FIXME: Support config the codec.
tscw = new SrsTsContextWriter(fw, context, SrsAudioCodecIdAAC, SrsVideoCodecIdAVC);
tscw = new SrsTsContextWriter(fw, context, SrsAudioCodecIdForbidden, SrsVideoCodecIdAVC);

return err;
}
Expand Down

1 comment on commit 02a18b3

@winlinvip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.