<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dcpomatic/test/j2k_encoder_test.cc, branch xmlsec-debug</title>
<subtitle>DCP-o-matic DCP tools</subtitle>
<id>https://git.carlh.net/cgit/dcpomatic/atom?h=xmlsec-debug</id>
<link rel='self' href='https://git.carlh.net/cgit/dcpomatic/atom?h=xmlsec-debug'/>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/'/>
<updated>2024-09-13T21:43:12Z</updated>
<entry>
<title>Merge remote-tracking branch 'origin/main' into v2.17.x</title>
<updated>2024-09-13T21:43:12Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-09-13T21:43:12Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=c1d3f6f4f645e76302ca4262de3517497fa1e14b'/>
<id>urn:sha1:c1d3f6f4f645e76302ca4262de3517497fa1e14b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Hopefully fix occasional hang in j2k_encoder_deadlock_test.</title>
<updated>2024-09-12T23:14:21Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-09-12T22:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=f02501491e262c52b65c3fea6e180814e132dad8'/>
<id>urn:sha1:f02501491e262c52b65c3fea6e180814e132dad8</id>
<content type='text'>
Previously too many frames were queued for encoding, which AFAICS meant
that (if the CPU was busy) we would get to the point where too many frames
were in the encoder queue, so that we blocked waiting for it to clear,
and then simultaneously too many frames were in the writer queue, which
(in this test) would never clear.

At this point we would be backed up waiting for Writer::write() to happen
in J2KEncoder::encoder_thread() so that the encoder queue could be cleared,
but nobody is calling Writer::write().
</content>
</entry>
<entry>
<title>Rename new_test_film2 -&gt; new_test_film.</title>
<updated>2024-05-22T08:33:45Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-05-20T14:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=c95ba3eb99c5e4d6dca90cee7e5bb9077b6ed02c'/>
<id>urn:sha1:c95ba3eb99c5e4d6dca90cee7e5bb9077b6ed02c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stop using video directory and hard-linking (#2756).</title>
<updated>2024-05-11T19:00:37Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-03-14T23:41:20Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=d2c665cba983c625933817e0bf05e298f80f0119'/>
<id>urn:sha1:d2c665cba983c625933817e0bf05e298f80f0119</id>
<content type='text'>
Instead store details of a previously-created asset in the film's
metadata and then look there for potential video files to re-use.
</content>
</entry>
<entry>
<title>Test build fix.</title>
<updated>2024-05-08T06:52:02Z</updated>
<author>
<name>Carl Hetherington</name>
<email>cth@carlh.net</email>
</author>
<published>2024-05-08T06:52:02Z</published>
<link rel='alternate' type='text/html' href='https://git.carlh.net/cgit/dcpomatic/commit/?id=b83321a4e3065ca90bed7e329c77ef8f35c3036d'/>
<id>urn:sha1:b83321a4e3065ca90bed7e329c77ef8f35c3036d</id>
<content type='text'>
</content>
</entry>
<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>
</feed>
