Skip to content

Commit 7343ccc

Browse files
add references to used functions
1 parent 59a9f02 commit 7343ccc

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,11 @@ The previous section showed a simple transmuxer program, now we're going to add
783783

784784
After we prepared the decoder but before we arrange the output media file we're going to set up the encoder.
785785

786-
* Create the video `AVStream` in the encoder,
787-
* Use the `AVCodec` called `libx265`,
788-
* Create the `AVCodecContext` based in the created codec,
786+
* Create the video `AVStream` in the encoder, [`avformat_new_stream`](https://www.ffmpeg.org/doxygen/trunk/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827)
787+
* Use the `AVCodec` called `libx265`, [`avcodec_find_encoder_by_name`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__encoding.html#gaa614ffc38511c104bdff4a3afa086d37)
788+
* Create the `AVCodecContext` based in the created codec, [`avcodec_alloc_context3`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#gae80afec6f26df6607eaacf39b561c315)
789789
* Set up basic attributes for the transcoding session, and
790-
* Open the codec and copy parameters from the context to the stream.
790+
* Open the codec and copy parameters from the context to the stream. [`avcodec_open2`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#ga11f785a188d7d9df71621001465b0f1d) and [`avcodec_parameters_from_context`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__core.html#ga0c7058f764778615e7978a1821ab3cfe)
791791

792792
```c
793793
AVRational input_framerate = av_guess_frame_rate(decoder_avfc, decoder_video_avs, NULL);
@@ -822,13 +822,13 @@ avcodec_parameters_from_context(sc->video_avs->codecpar, sc->video_avcc);
822822
823823
We need to expand our decoding loop for the video stream transcoding:
824824
825-
* Send the empty `AVPacket` to the decoder,
826-
* Receive the uncompressed `AVFrame`,
825+
* Send the empty `AVPacket` to the decoder, [`avcodec_send_packet`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga58bc4bf1e0ac59e27362597e467efff3)
826+
* Receive the uncompressed `AVFrame`, [`avcodec_receive_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga11e6542c4e66d3028668788a1a74217c)
827827
* Start to transcode this raw frame,
828-
* Send the raw frame,
829-
* Receive the compressed, based on our codec, `AVPacket`,
830-
* Set up the timestamp, and
831-
* Write it to the output file.
828+
* Send the raw frame, [`avcodec_send_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga9395cb802a5febf1f00df31497779169)
829+
* Receive the compressed, based on our codec, `AVPacket`, [`avcodec_receive_packet`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__decoding.html#ga5b8eff59cf259747cf0b31563e38ded6)
830+
* Set up the timestamp, and [`av_packet_rescale_ts`](https://www.ffmpeg.org/doxygen/trunk/group__lavc__packet.html#gae5c86e4d93f6e7aa62ef2c60763ea67e)
831+
* Write it to the output file. [`av_interleaved_write_frame`](https://www.ffmpeg.org/doxygen/trunk/group__lavf__encoding.html#ga37352ed2c63493c38219d935e71db6c1)
832832
833833
```c
834834
AVFrame *input_frame = av_frame_alloc();

0 commit comments

Comments
 (0)