<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dcpomatic/src/lib/j2k_encoder.cc, branch certs</title>
<subtitle>DCP-o-matic DCP tools</subtitle>
<id>https://git.carlh.net/cgit/dcpomatic/atom?h=certs</id>
<link rel='self' href='https://git.carlh.net/cgit/dcpomatic/atom?h=certs'/>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/'/>
<updated>2024-05-07T23:33:41Z</updated>
<entry>
<title>Work around deadlock when destroying J2KEncoder with a full writer queue (#2784).</title>
<updated>2024-05-07T23:33:41Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-05-05T19:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=32d04ddb5c583938f470ed74bda8a50cc2ec9960'/>
<id>urn:sha1:32d04ddb5c583938f470ed74bda8a50cc2ec9960</id>
<content type='text'>
This feels like a hack, but I can't think of a nicer way to do it.

The interruption disable makes sense because when we destroy encoder threads
during a DCP encode (because a remote server goes away, for example) we don't
want any frames to be lost due to the encode thread being interrupted between
taking the frame off the queue and sending it to the writer.

When we're destroying the encoder we don't care about this, but I can't see
how you'd differentiate.

Maybe the encoder queue could have two lists: to-do and in-progress;
the encoder thread atomically moves a frame from to-do to in-progress,
but then how do you know when the in-progress ones are orphaned and need
to be re-added to the main queue.

You could make the writer return saying "no" if the queue is full (rather
than blocking and waiting for the queue to empty) but that seems wasteful
as then the frame would be re-encoded.
</content>
</entry>
<entry>
<title>Update servers list after connecting to the signal.</title>
<updated>2023-11-23T00:23:37Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2023-11-23T00:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=aae57d2caeffdda10bef8621705bacb74aac0167'/>
<id>urn:sha1:aae57d2caeffdda10bef8621705bacb74aac0167</id>
<content type='text'>
Otherwise it can happen that a signal is emitted before we connect
to it, and then after that no more signals come because nothing
changes.
</content>
</entry>
<entry>
<title>Remove some unnecessary use of shared_ptr.</title>
<updated>2022-10-16T22:10:59Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2022-10-14T19:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=bfd6bd32b5e20c479170452a66cb44eff59feacd'/>
<id>urn:sha1:bfd6bd32b5e20c479170452a66cb44eff59feacd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use EnumIndexedVector in J2KEncoder.</title>
<updated>2022-09-27T11:46:16Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2022-09-26T22:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=607b1b4d8061237e3c90368c73c58a172a69c950'/>
<id>urn:sha1:607b1b4d8061237e3c90368c73c58a172a69c950</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Trim some includes.</title>
<updated>2022-09-10T19:00:06Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2022-09-10T13:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=82c6dfe9f286e07bdaf3434593ce1c9bd0ee2677'/>
<id>urn:sha1:82c6dfe9f286e07bdaf3434593ce1c9bd0ee2677</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix failure to destroy the J2KEncoder when an encode fails/is cancelled.</title>
<updated>2022-07-14T22:03:33Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2022-07-14T22:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=85b9d9e308c21eccf0ca27dd6d324888f203abfb'/>
<id>urn:sha1:85b9d9e308c21eccf0ca27dd6d324888f203abfb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>It doesn't seem necessary to use shared_ptr for the DCPVideo queue in J2KEncoder.</title>
<updated>2022-05-01T22:31:28Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2021-11-09T21:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=925d97b8e51421bf509c5ffbe4abe8f77a6ca95e'/>
<id>urn:sha1:925d97b8e51421bf509c5ffbe4abe8f77a6ca95e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>C++11 and whitespace cleanups.</title>
<updated>2022-04-03T21:25:19Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2022-04-02T22:04:31Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=d311043bf3c1e3e7f41b314f7ab7c91ed7e5aa7f'/>
<id>urn:sha1:d311043bf3c1e3e7f41b314f7ab7c91ed7e5aa7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add some possibly-useful markers for debugging threads from coredumps.</title>
<updated>2021-04-20T22:52:07Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2021-04-20T10:27:40Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=c370c651eba466f5073384de8b304a2625c64b89'/>
<id>urn:sha1:c370c651eba466f5073384de8b304a2625c64b89</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Assorted C++11/formatting cleanups.</title>
<updated>2021-04-08T19:32:44Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2021-04-08T19:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=3339d3bce70afe9ae2ca10e9fcfc4b54b748fbf4'/>
<id>urn:sha1:3339d3bce70afe9ae2ca10e9fcfc4b54b748fbf4</id>
<content type='text'>
</content>
</entry>
</feed>
