Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
351b22ca
Commit
351b22ca
authored
Jul 24, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mux: support re-interleaving packets in ff_write_chained()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
383a04a1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
10 deletions
+12
-10
hdsenc.c
libavformat/hdsenc.c
+1
-1
hlsenc.c
libavformat/hlsenc.c
+1
-1
internal.h
libavformat/internal.h
+2
-1
movenchint.c
libavformat/movenchint.c
+1
-1
mux.c
libavformat/mux.c
+3
-2
rtspenc.c
libavformat/rtspenc.c
+1
-1
sapenc.c
libavformat/sapenc.c
+1
-1
segment.c
libavformat/segment.c
+1
-1
smoothstreamingenc.c
libavformat/smoothstreamingenc.c
+1
-1
No files found.
libavformat/hdsenc.c
View file @
351b22ca
...
@@ -549,7 +549,7 @@ static int hds_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -549,7 +549,7 @@ static int hds_write_packet(AVFormatContext *s, AVPacket *pkt)
os
->
last_ts
=
pkt
->
dts
;
os
->
last_ts
=
pkt
->
dts
;
os
->
packets_written
++
;
os
->
packets_written
++
;
return
ff_write_chained
(
os
->
ctx
,
pkt
->
stream_index
-
os
->
first_stream
,
pkt
,
s
);
return
ff_write_chained
(
os
->
ctx
,
pkt
->
stream_index
-
os
->
first_stream
,
pkt
,
s
,
0
);
}
}
static
int
hds_write_trailer
(
AVFormatContext
*
s
)
static
int
hds_write_trailer
(
AVFormatContext
*
s
)
...
...
libavformat/hlsenc.c
View file @
351b22ca
...
@@ -302,7 +302,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -302,7 +302,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
return
ret
;
return
ret
;
}
}
ret
=
ff_write_chained
(
oc
,
pkt
->
stream_index
,
pkt
,
s
);
ret
=
ff_write_chained
(
oc
,
pkt
->
stream_index
,
pkt
,
s
,
0
);
return
ret
;
return
ret
;
}
}
...
...
libavformat/internal.h
View file @
351b22ca
...
@@ -134,10 +134,11 @@ void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
...
@@ -134,10 +134,11 @@ void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
* @param dst_stream the stream index within dst to write the packet to
* @param dst_stream the stream index within dst to write the packet to
* @param pkt the packet to be written
* @param pkt the packet to be written
* @param src the muxer the packet originally was intended for
* @param src the muxer the packet originally was intended for
* @param interleave 0->use av_write_frame, 1->av_write_interleaved_frame
* @return the value av_write_frame returned
* @return the value av_write_frame returned
*/
*/
int
ff_write_chained
(
AVFormatContext
*
dst
,
int
dst_stream
,
AVPacket
*
pkt
,
int
ff_write_chained
(
AVFormatContext
*
dst
,
int
dst_stream
,
AVPacket
*
pkt
,
AVFormatContext
*
src
);
AVFormatContext
*
src
,
int
interleave
);
/**
/**
* Get the length in bytes which is needed to store val as v.
* Get the length in bytes which is needed to store val as v.
...
...
libavformat/movenchint.c
View file @
351b22ca
...
@@ -422,7 +422,7 @@ int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt,
...
@@ -422,7 +422,7 @@ int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt,
sample_queue_push
(
&
trk
->
sample_queue
,
pkt
->
data
,
pkt
->
size
,
sample
);
sample_queue_push
(
&
trk
->
sample_queue
,
pkt
->
data
,
pkt
->
size
,
sample
);
/* Feed the packet to the RTP muxer */
/* Feed the packet to the RTP muxer */
ff_write_chained
(
rtp_ctx
,
0
,
pkt
,
s
);
ff_write_chained
(
rtp_ctx
,
0
,
pkt
,
s
,
0
);
/* Fetch the output from the RTP muxer, open a new output buffer
/* Fetch the output from the RTP muxer, open a new output buffer
* for next time. */
* for next time. */
...
...
libavformat/mux.c
View file @
351b22ca
...
@@ -960,7 +960,7 @@ int av_get_output_timestamp(struct AVFormatContext *s, int stream,
...
@@ -960,7 +960,7 @@ int av_get_output_timestamp(struct AVFormatContext *s, int stream,
}
}
int
ff_write_chained
(
AVFormatContext
*
dst
,
int
dst_stream
,
AVPacket
*
pkt
,
int
ff_write_chained
(
AVFormatContext
*
dst
,
int
dst_stream
,
AVPacket
*
pkt
,
AVFormatContext
*
src
)
AVFormatContext
*
src
,
int
interleave
)
{
{
AVPacket
local_pkt
;
AVPacket
local_pkt
;
int
ret
;
int
ret
;
...
@@ -980,7 +980,8 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
...
@@ -980,7 +980,8 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
src
->
streams
[
pkt
->
stream_index
]
->
time_base
,
src
->
streams
[
pkt
->
stream_index
]
->
time_base
,
dst
->
streams
[
dst_stream
]
->
time_base
);
dst
->
streams
[
dst_stream
]
->
time_base
);
ret
=
av_write_frame
(
dst
,
&
local_pkt
);
if
(
interleave
)
ret
=
av_interleaved_write_frame
(
dst
,
&
local_pkt
);
else
ret
=
av_write_frame
(
dst
,
&
local_pkt
);
pkt
->
buf
=
local_pkt
.
buf
;
pkt
->
buf
=
local_pkt
.
buf
;
pkt
->
destruct
=
local_pkt
.
destruct
;
pkt
->
destruct
=
local_pkt
.
destruct
;
return
ret
;
return
ret
;
...
...
libavformat/rtspenc.c
View file @
351b22ca
...
@@ -212,7 +212,7 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -212,7 +212,7 @@ static int rtsp_write_packet(AVFormatContext *s, AVPacket *pkt)
rtsp_st
=
rt
->
rtsp_streams
[
pkt
->
stream_index
];
rtsp_st
=
rt
->
rtsp_streams
[
pkt
->
stream_index
];
rtpctx
=
rtsp_st
->
transport_priv
;
rtpctx
=
rtsp_st
->
transport_priv
;
ret
=
ff_write_chained
(
rtpctx
,
0
,
pkt
,
s
);
ret
=
ff_write_chained
(
rtpctx
,
0
,
pkt
,
s
,
0
);
/* ff_write_chained does all the RTP packetization. If using TCP as
/* ff_write_chained does all the RTP packetization. If using TCP as
* transport, rtpctx->pb is only a dyn_packet_buf that queues up the
* transport, rtpctx->pb is only a dyn_packet_buf that queues up the
* packets, so we need to send them out on the TCP connection separately.
* packets, so we need to send them out on the TCP connection separately.
...
...
libavformat/sapenc.c
View file @
351b22ca
...
@@ -256,7 +256,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -256,7 +256,7 @@ static int sap_write_packet(AVFormatContext *s, AVPacket *pkt)
sap
->
last_time
=
now
;
sap
->
last_time
=
now
;
}
}
rtpctx
=
s
->
streams
[
pkt
->
stream_index
]
->
priv_data
;
rtpctx
=
s
->
streams
[
pkt
->
stream_index
]
->
priv_data
;
return
ff_write_chained
(
rtpctx
,
0
,
pkt
,
s
);
return
ff_write_chained
(
rtpctx
,
0
,
pkt
,
s
,
0
);
}
}
AVOutputFormat
ff_sap_muxer
=
{
AVOutputFormat
ff_sap_muxer
=
{
...
...
libavformat/segment.c
View file @
351b22ca
...
@@ -766,7 +766,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -766,7 +766,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
av_ts2str
(
pkt
->
pts
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
),
av_ts2str
(
pkt
->
pts
),
av_ts2timestr
(
pkt
->
pts
,
&
st
->
time_base
),
av_ts2str
(
pkt
->
dts
),
av_ts2timestr
(
pkt
->
dts
,
&
st
->
time_base
));
av_ts2str
(
pkt
->
dts
),
av_ts2timestr
(
pkt
->
dts
,
&
st
->
time_base
));
ret
=
ff_write_chained
(
seg
->
avf
,
pkt
->
stream_index
,
pkt
,
s
);
ret
=
ff_write_chained
(
seg
->
avf
,
pkt
->
stream_index
,
pkt
,
s
,
0
);
fail:
fail:
if
(
pkt
->
stream_index
==
seg
->
reference_stream_index
)
{
if
(
pkt
->
stream_index
==
seg
->
reference_stream_index
)
{
...
...
libavformat/smoothstreamingenc.c
View file @
351b22ca
...
@@ -593,7 +593,7 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -593,7 +593,7 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
os
->
packets_written
++
;
os
->
packets_written
++
;
return
ff_write_chained
(
os
->
ctx
,
0
,
pkt
,
s
);
return
ff_write_chained
(
os
->
ctx
,
0
,
pkt
,
s
,
0
);
}
}
static
int
ism_write_trailer
(
AVFormatContext
*
s
)
static
int
ism_write_trailer
(
AVFormatContext
*
s
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment