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
002dbc5a
Commit
002dbc5a
authored
May 23, 2017
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/encode_video: add log
This helps to visualize how the send/receive API works.
parent
47c43ce3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
encode_video.c
doc/examples/encode_video.c
+4
-1
No files found.
doc/examples/encode_video.c
View file @
002dbc5a
...
...
@@ -42,6 +42,9 @@ static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt,
int
ret
;
/* send the frame to the encoder */
if
(
frame
)
printf
(
"Send frame %3"
PRId64
"
\n
"
,
frame
->
pts
);
ret
=
avcodec_send_frame
(
enc_ctx
,
frame
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"Error sending a frame for encoding
\n
"
);
...
...
@@ -57,7 +60,7 @@ static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt,
exit
(
1
);
}
printf
(
"Write
frame
%3"
PRId64
" (size=%5d)
\n
"
,
pkt
->
pts
,
pkt
->
size
);
printf
(
"Write
packet
%3"
PRId64
" (size=%5d)
\n
"
,
pkt
->
pts
,
pkt
->
size
);
fwrite
(
pkt
->
data
,
1
,
pkt
->
size
,
outfile
);
av_packet_unref
(
pkt
);
}
...
...
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