mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 01:33:47 +00:00
tttocea{6,7}08: Disallow pango markup from input caps
Otherwise the elements treat pango markup as plain text, making the text appear corrupted. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2367>
This commit is contained in:
parent
f01565cd69
commit
20eb83367d
5 changed files with 19 additions and 15 deletions
|
@ -9809,7 +9809,7 @@
|
||||||
"long-name": "TT to CEA-608",
|
"long-name": "TT to CEA-608",
|
||||||
"pad-templates": {
|
"pad-templates": {
|
||||||
"sink": {
|
"sink": {
|
||||||
"caps": "text/x-raw:\napplication/x-json:\n format: cea608\n",
|
"caps": "text/x-raw:\n format: utf8\napplication/x-json:\n format: cea608\n",
|
||||||
"direction": "sink",
|
"direction": "sink",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
|
@ -9890,7 +9890,7 @@
|
||||||
"klass": "Generic",
|
"klass": "Generic",
|
||||||
"pad-templates": {
|
"pad-templates": {
|
||||||
"sink": {
|
"sink": {
|
||||||
"caps": "text/x-raw:\n",
|
"caps": "text/x-raw:\n format: utf8\n",
|
||||||
"direction": "sink",
|
"direction": "sink",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
|
|
|
@ -576,7 +576,9 @@ impl ElementImpl for TtToCea608 {
|
||||||
{
|
{
|
||||||
let caps = caps.get_mut().unwrap();
|
let caps = caps.get_mut().unwrap();
|
||||||
|
|
||||||
let s = gst::Structure::builder("text/x-raw").build();
|
let s = gst::Structure::builder("text/x-raw")
|
||||||
|
.field("format", "utf8")
|
||||||
|
.build();
|
||||||
caps.append_structure(s);
|
caps.append_structure(s);
|
||||||
|
|
||||||
let s = gst::Structure::builder("application/x-json")
|
let s = gst::Structure::builder("application/x-json")
|
||||||
|
|
|
@ -597,7 +597,9 @@ impl ElementImpl for TtToCea708 {
|
||||||
{
|
{
|
||||||
let caps = caps.get_mut().unwrap();
|
let caps = caps.get_mut().unwrap();
|
||||||
|
|
||||||
let s = gst::Structure::builder("text/x-raw").build();
|
let s = gst::Structure::builder("text/x-raw")
|
||||||
|
.field("format", "utf8")
|
||||||
|
.build();
|
||||||
caps.append_structure(s);
|
caps.append_structure(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ fn test_non_timed_buffer() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
let inbuf = gst::Buffer::from_slice("Hello");
|
let inbuf = gst::Buffer::from_slice("Hello");
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ fn test_one_timed_buffer_and_eos() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
@ -149,7 +149,7 @@ fn test_erase_display_memory_non_spliced() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
@ -191,7 +191,7 @@ fn test_erase_display_memory_spliced() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
@ -237,7 +237,7 @@ fn test_output_gaps() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=pop-on");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
@ -311,7 +311,7 @@ fn test_one_timed_buffer_and_eos_roll_up2() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=roll-up2");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=roll-up2");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
@ -427,7 +427,7 @@ fn test_word_wrap_roll_up() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea608 mode=roll-up2 origin-column=24");
|
let mut h = gst_check::Harness::new_parse("tttocea608 mode=roll-up2 origin-column=24");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
let _event = h.pull_event().unwrap();
|
let _event = h.pull_event().unwrap();
|
||||||
|
|
|
@ -37,7 +37,7 @@ fn test_ttcea708_non_timed_buffer() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
||||||
|
|
||||||
let inbuf = gst::Buffer::from_slice("Hello");
|
let inbuf = gst::Buffer::from_slice("Hello");
|
||||||
|
@ -66,7 +66,7 @@ fn test_tttocea708_one_timed_buffer_and_eos() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
|
@ -162,7 +162,7 @@ fn test_tttocea708_output_gaps() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
let mut h = gst_check::Harness::new_parse("tttocea708 mode=pop-on cea608-channel=1");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=30/1");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
|
@ -250,7 +250,7 @@ fn test_tttocea708_large_input() {
|
||||||
init();
|
init();
|
||||||
|
|
||||||
let mut h = gst_check::Harness::new_parse("tttocea708 mode=roll-up");
|
let mut h = gst_check::Harness::new_parse("tttocea708 mode=roll-up");
|
||||||
h.set_src_caps_str("text/x-raw");
|
h.set_src_caps_str("text/x-raw,format=utf8");
|
||||||
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=60/1");
|
h.set_sink_caps_str("closedcaption/x-cea-708,format=cc_data,framerate=60/1");
|
||||||
|
|
||||||
while h.events_in_queue() != 0 {
|
while h.events_in_queue() != 0 {
|
||||||
|
|
Loading…
Reference in a new issue