mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Daniel W. S. Almeida" <dwlsalmeida@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 5/9] media: vidtv: cleanup SDT string identifiers
Date: Mon, 21 Sep 2020 13:43:42 +0200	[thread overview]
Message-ID: <1eaa1a66b0aa56d76c4a5b248cca7baf8a9053d3.1600688419.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1600688419.git.mchehab+huawei@kernel.org>

In order to better test userspace applications, add an encoding
for the strings. The original channel string is also too big.
As we're just playing the first compasses of the 5th Beethoven
Symphony, change the service name to just "Beethoven". Also,
add a provider's name. For such purpose, let's point it to
the Linux media community website.

With such changes, the SDT table now looks more like one got
from a real digital TV channel:

SDT
| table_id         0x42
| section_length      44
| one                 2
| zero                1
| syntax              1
| transport_stream_id 1860
| current_next        1
| version             0
| one2                3
| section_number      0
| last_section_number 0
| network_id          65281
| reserved            255
|\
|- service 0x0880
|   EIT schedule          0
|   EIT present following 0
|   free CA mode          0
|   running status        4
|   descriptor length     27
|        0x48: service_descriptor
|           service type  1
|           provider      'LinuxTV.org'
|           name          'Beethoven'
|_  1 services

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/test-drivers/vidtv/vidtv_channel.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/test-drivers/vidtv/vidtv_channel.c b/drivers/media/test-drivers/vidtv/vidtv_channel.c
index 0a62b97e6a27..f2b97cf08e87 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_channel.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_channel.c
@@ -43,6 +43,8 @@ static void vidtv_channel_encoder_destroy(struct vidtv_encoder *e)
 	}
 }
 
+#define ENCODING_ISO8859_15 "\x0b"
+
 struct vidtv_channel
 *vidtv_channel_s302m_init(struct vidtv_channel *head, u16 transport_stream_id)
 {
@@ -55,7 +57,8 @@ struct vidtv_channel
 	const u16 s302m_es_pid              = 0x111; /* packet id for the ES */
 	const __be32 s302m_fid              = cpu_to_be32(VIDTV_S302M_FORMAT_IDENTIFIER);
 
-	char *name = "S302m: Sine Wave PCM Audio";
+	char *name = ENCODING_ISO8859_15 "Beethoven";
+	char *provider = ENCODING_ISO8859_15 "LinuxTV.org";
 
 	struct vidtv_channel *s302m = kzalloc(sizeof(*s302m), GFP_KERNEL);
 	struct vidtv_s302m_encoder_init_args encoder_args = {};
@@ -68,7 +71,7 @@ struct vidtv_channel
 				     vidtv_psi_service_desc_init(NULL,
 								 DIGITAL_TELEVISION_SERVICE,
 								 name,
-								 NULL);
+								 provider);
 
 	s302m->transport_stream_id = transport_stream_id;
 
-- 
2.26.2


  parent reply	other threads:[~2020-09-21 11:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 11:43 [PATCH 0/9] vidtv: fix several things on it Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 1/9] media: vidtv: simplify PCR logic to get jiffies Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 2/9] media: vidtv: remove more ENDIAN_BITFIELD nonsense Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 3/9] media: vidtv: fix initialization of the network_id field at SDT Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 4/9] media: vidtv: cleanup PSI version numbers Mauro Carvalho Chehab
2020-09-21 11:43 ` Mauro Carvalho Chehab [this message]
2020-09-21 11:43 ` [PATCH 6/9] media: vidtv: fix a typo Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 7/9] media: vidtv: simplify parameters for vidtv_pes_write_stuffing() Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 8/9] media: vidtv: rewrite the adaption field logic Mauro Carvalho Chehab
2020-09-21 11:43 ` [PATCH 9/9] media: vidtv: fix decoding with gstreamer and Vlc Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1eaa1a66b0aa56d76c4a5b248cca7baf8a9053d3.1600688419.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=dwlsalmeida@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®