I think this example can be useful for showing all the above tasks in an
ordered,
easy and strictly sequential way, with a kind of input close to the user's
needings.
Signed-off-by: Paolo Prete
---
configure | 2 +
doc/examples/Makefile
in git format-patch (Makefile and snippet
files). If it will be accepted, I can provide the next example, which covers
h264 encoding, muxing and streaming.
From 9e5f3d83bf42b987386a0566a8b4554315e336e8 Mon Sep 17 00:00:00 2001
From: Paolo Prete
Date: Mon, 27 Mar 2017 23:09:07 +0200
Subje
/examples/encode_raw_audio_file_to_aac.c
new file mode 100644
index 000..19114e8
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,275 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person
Il Mercoledì 29 Marzo 2017 11:58, wm4 ha scritto:
> There are vague plans of disallowing stack allocation of AVPackets by>
> removing sizeof(AVPacket) from the ABI (like AVFrame etc.), so it might> be
> better to allocate the packet with the appropriate functions.
Done. (see next patch)
/examples/encode_raw_audio_file_to_aac.c
new file mode 100644
index 000..546e713
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,300 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person
Sorry, the previous patch contains few typo errors. See the next one.
Il Giovedì 30 Marzo 2017 1:00, Paolo Prete
ha scritto:
---
doc/examples/Makefile | 1 +
doc/examples/encode_raw_audio_file_to_aac.c | 300
2 files changed, 301
/examples/encode_raw_audio_file_to_aac.c
new file mode 100644
index 000..269522e
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,300 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person
Il Giovedì 30 Marzo 2017 1:43, Paolo Prete
ha scritto:
The next patch I'm going to post adds a check with av_frame_make_writable(), as
suggested by wm4. However, I see that the same function is used only by
muxing.c in the examples folder, and it's not clear which kind of error
/examples/encode_raw_audio_file_to_aac.c
new file mode 100644
index 000..140aff6
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person
e6df5c
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files
dio_file_to_aac.c
new file mode 100644
index 000..5e6df5c
--- /dev/null
+++ b/doc/examples/encode_raw_audio_file_to_aac.c
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2017 Paolo Prete (p4olo_pr...@yahoo.it)
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of t
etions(-)
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 3acb778322..04739995d8 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003 Fabrice Bellard
+ * Copyright (c) 2022 Paolo Prete (paolopr976 at gmail.com) after Fabrice Bellard
Il sabato 18 giugno 2022, 17:18:18 CEST, Leo Izen ha
scritto:
>>On 6/18/22 08:06, Paolo Prete wrote:>> +{>> + if (num)>> +
>>av_log(NULL, AV_LOG_ERROR, "%s (error '%s')\n", s, av_err2str(*num));>> +
>>else>&g
Il sabato 18 giugno 2022, 19:07:11 CEST, Andreas Rheinhardt
ha scritto:
>>Paolo Prete:
>> Please review this. It's a code rewrite of doc/examples/muxing.c which
>> improves readability and fixes issues.
>> More specifically:
>> *) Original functio
Sorry: I had problems with my email client in formatting the previous message.
I just try to resend it.
>> Il sabato 18 giugno 2022, 17:18:18 CEST, Leo Izen ha
>> scritto:
>>On 6/18/22 08:06, Paolo Prete wrote:
>> +{
>> + if (num)
>> + av_log(NU
/muxing.c b/doc/examples/muxing.c
index 3acb778322..a91134ac7c 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Fabrice Bellard
+ * (Code rewrite by Paolo Prete, 2022)
*
* Permission is hereby granted, free of charge, to any person obtainin
demuxing_decoding \
diff --git a/doc/examples/convert_encode_mux_audio.c b/doc/examples/convert_encode_mux_audio.c
new file mode 100644
index 00..abde611bf6
--- /dev/null
+++ b/doc/examples/convert_encode_mux_audio.c
@@ -0,0 +1,351 @@
+/*
+ * Copyright (c) 2019 Paolo
ctions in many cases do not improve readability and IMHO is
better to have a longer code instead of forcing grouping different tasks in the
same function with an ambiguous name.
Il martedì 7 giugno 2022, 11:42:23 CEST, Anton Khirnov
ha scritto:
Quoting Paolo Prete (2022-06-06 19:40:42)
Il martedì 7 giugno 2022, 13:56:37 CEST, Anton Khirnov
ha scritto:
>Quoting Paolo Prete (2022-06-07 12:59:05)
>> What you say is true, IMHO, as long as the functions (in which the
>> code is split) do really group logically related tasks and they have
>> name
19 matches
Mail list logo