Repository navigation
Expand file tree
/
Copy pathMediaDisplay.h
More file actions
600 lines (519 loc) · 22.8 KB
/
Copy pathMediaDisplay.h
File metadata and controls
600 lines (519 loc) · 22.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
// Super Timecode Converter
// Copyright (c) 2026 Fiverecords -- MIT License
// https://github.com/fiverecords/SuperTimecodeConverter
//
// MediaDisplay -- Visual display components for waveform and artwork data.
//
// WaveformDisplay: Renders a waveform preview in three formats, each column a
// bar mirrored about the centre line, scaled to the track's highest column:
// - CDJ-3000 3-band (PWV6): 1200 entries x 3 bytes = {mid, high, low} heights.
// The bar is the top of beat-link's stacked bands (WaveformPreview:
// low x0.49 + mid x0.32 + high x0.25), in blue turning whiter with the
// share of highs.
// - NXS2 Color (PWV4): 1200 entries x 6 bytes = {d0, d1, d2, d3, d4, d5};
// d3/d4/d5 are the low/mid/high energies (dysentery's analysis) and
// colour the bar red/green/blue. As beat-link's WaveformPreview draws
// it: a back bar max(d3, d4, d5) high at 3/4 brightness, and a front bar
// d5 high at full brightness. d0-d2 are not used.
// - Engine DJ overview (StageLinQ, setEngineOverviewData): N entries x 3
// bytes, low/mid/high, which StageLinQDbClient reorders to {mid, high,
// low}. The bar is the mid band, scaled to the track's highest band
// value, in the PWV6 blue -- as every 3-byte preview was drawn before
// AUDIT META-12; beat-link's PWV6 weights are rekordbox's, and nothing
// says Engine DJ's bands are scaled the same way.
//
// ArtworkDisplay: Renders a decoded JPEG album art image.
#pragma once
#include <JuceHeader.h>
#include "DbServerClient.h"
#include <algorithm>
#include <cmath>
#include <vector>
//==============================================================================
// WaveformDisplay -- Paints CDJ waveform preview bars
//
// Supports CDJ-3000 3-band (PWV6) and NXS2 color (PWV4) formats, from
// TrackMetadata::waveformData (DbServerClient) or the waveform cache, and the
// Engine DJ overview from StageLinQDbClient::getWaveformForTrack.
//==============================================================================
class WaveformDisplay : public juce::Component
{
public:
WaveformDisplay()
{
setOpaque(false);
}
/// Set color preview waveform data (from CDJ dbserver ANLZ response).
/// bytesPerEntry: 3 = CDJ-3000 3-band (mid,high,low), 6 = NXS2 color (d0-d5)
/// An Engine DJ overview goes to setEngineOverviewData: it is 3 bytes too,
/// but not drawn as rekordbox's PWV6.
void setColorWaveformData(const std::vector<uint8_t>& data, int entryCount, int bytesPerEntry)
{
setWaveformData(data, entryCount, bytesPerEntry, false);
}
/// Set an Engine DJ overview waveform (StageLinQDbClient's
/// DenonWaveformData: 3 bytes per entry, reordered to mid, high, low).
void setEngineOverviewData(const std::vector<uint8_t>& data, int entryCount)
{
setWaveformData(data, entryCount, 3, true);
}
/// Clear all waveform data (e.g. on track change before new data arrives)
void clearWaveform()
{
colorWaveformData.clear();
hasColorData = false;
colorEntryCount = 0;
colorBytesPerEntry = 0;
engineOverview = false;
playPosition = 0.0f;
durationMs = 0;
previewCues.clear();
previewBeatGrid.clear();
invalidateCache();
repaint();
}
bool hasWaveformData() const { return hasColorData; }
/// Set track duration for minute markers.
void setDurationMs(uint32_t ms) { durationMs = ms; }
/// Set beat grid for beat ruler lines on the preview.
void setBeatGrid(const std::vector<TrackMetadata::BeatEntry>& grid)
{
previewBeatGrid = grid;
invalidateCache();
repaint();
}
/// Set rekordbox cue list for colored cue markers on the preview.
void setRekordboxCues(const std::vector<TrackMetadata::RekordboxCue>& cues)
{
previewCues = cues;
invalidateCache(); // cue markers are part of the static image
repaint();
}
/// Set the play cursor position (0.0 = start, 1.0 = end).
/// Two modes based on whether this component is a real child or an orphan:
///
/// Real child (engine mini-player): Sub-pixel moves accumulate until
/// the delta crosses 0.5px, then position updates and a partial repaint
/// fires. This avoids scheduling repaints for invisible movement.
///
/// Orphan (PDL View -- painted manually by parent): Position is stored
/// immediately every call; the parent controls when to repaint.
void setPlayPosition(float ratio)
{
float clamped = juce::jlimit(0.0f, 1.0f, ratio);
if (clamped == playPosition) return;
// Orphan component (PDL View paints us manually) -- always store.
// The parent's dirty check drives repaints, not ours.
if (getParentComponent() == nullptr)
{
playPosition = clamped;
return;
}
float w = (float)getWidth();
if (w <= 0.0f) return; // not yet laid out
float pxDelta = std::abs(clamped - playPosition) * w;
if (pxDelta < 0.5f && !(clamped == 0.0f && playPosition != 0.0f))
return;
float inset = 2.0f;
float drawW = w - inset * 2.0f;
float oldX = inset + playPosition * drawW;
float newX = inset + clamped * drawW;
playPosition = clamped;
// Repaint the union of old and new cursor strips plus margin for
// anti-aliased float-positioned edges (2px extra each side).
float dirtyX = std::min(oldX, newX) - 5.0f;
float dirtyW = std::abs(newX - oldX) + 11.0f;
repaint((int)dirtyX, 0, (int)std::ceil(dirtyW), getHeight());
}
void paint(juce::Graphics& g) override
{
auto bounds = getLocalBounds().toFloat();
if (hasColorData && !colorWaveformData.empty() && colorEntryCount > 0)
{
ensureCachedImage();
if (cachedWaveformImg.isValid())
{
// Draw the cached high-res image scaled to logical bounds.
// On HiDPI/Retina, the image is at physical resolution so
// JUCE composites it 1:1 with the framebuffer -- no upscaling blur.
g.drawImage(cachedWaveformImg, bounds);
paintOverlay(g, bounds, colorEntryCount);
return;
}
}
// No waveform -- plain background + placeholder text
g.setColour(juce::Colour(0xFF0D1117));
g.fillRoundedRectangle(bounds, 3.0f);
g.setColour(juce::Colour(0xFF4A5568));
g.setFont(10.0f);
g.drawText("No Waveform", bounds, juce::Justification::centred);
}
private:
void setWaveformData(const std::vector<uint8_t>& data, int entryCount, int bytesPerEntry,
bool engineDjOverview)
{
colorWaveformData = data;
colorEntryCount = entryCount;
colorBytesPerEntry = bytesPerEntry;
engineOverview = engineDjOverview;
// The sizes come from the wire: multiply in size_t (an int product of
// 0x2AAAAAAB x 6 wrapped and passed the check).
hasColorData = (entryCount > 0 && (bytesPerEntry == 3 || bytesPerEntry == 6)
&& data.size() >= (size_t)entryCount * (size_t)bytesPerEntry);
invalidateCache();
repaint();
}
//----------------------------------------------------------------------
// Cached waveform image -- rendered at physical pixel resolution to
// avoid HiDPI upscaling blur. Regenerated only when data, size, or
// display scale changes.
//----------------------------------------------------------------------
juce::Image cachedWaveformImg;
int cachedW = 0, cachedH = 0;
float cachedScale = 0.0f;
bool cacheValid = false;
void invalidateCache() { cacheValid = false; }
/// Detect the display scale factor for this component (or its parent).
float getDisplayScale() const
{
// Try the component's own top-level peer first
if (auto* tlc = getTopLevelComponent())
if (auto* peer = tlc->getPeer())
return (float)peer->getPlatformScaleFactor();
// Fallback: main display scale (covers orphan components in PDL View)
auto& displays = juce::Desktop::getInstance().getDisplays();
if (auto* primary = displays.getPrimaryDisplay())
return (float)primary->scale;
return 1.0f;
}
void ensureCachedImage()
{
int w = getWidth();
int h = getHeight();
if (w <= 0 || h <= 0) return;
float scale = getDisplayScale();
if (scale < 1.0f) scale = 1.0f;
// Regenerate if size, scale, or data changed
if (cacheValid && cachedW == w && cachedH == h && cachedScale == scale)
return;
// Create image at physical pixel resolution
int imgW = (int)std::ceil(w * scale);
int imgH = (int)std::ceil(h * scale);
cachedWaveformImg = juce::Image(juce::Image::ARGB, imgW, imgH, true);
juce::Graphics ig(cachedWaveformImg);
// Scale the Graphics context so all drawing uses logical coordinates
// but renders at physical pixel density
ig.addTransform(juce::AffineTransform::scale(scale));
// Background
auto bounds = juce::Rectangle<float>(0.0f, 0.0f, (float)w, (float)h);
ig.setColour(juce::Colour(0xFF0D1117));
ig.fillRoundedRectangle(bounds, 3.0f);
if (colorBytesPerEntry == 3)
renderThreeBandBars(ig, bounds);
else
renderColorBars(ig, bounds);
// Center line (static, part of cached image)
float inset = 2.0f;
float drawW = bounds.getWidth() - inset * 2;
float drawH = bounds.getHeight() - inset * 2;
float midY = inset + drawH * 0.5f;
ig.setColour(juce::Colour(0x40FFFFFF));
ig.drawHorizontalLine((int)midY, inset, bounds.getWidth() - inset);
// Minute markers (white ticks below waveform)
if (durationMs > 0)
{
uint32_t minuteMs = 60000;
float botY = inset + drawH;
for (uint32_t ms = minuteMs; ms < durationMs; ms += minuteMs)
{
float ratio = (float)ms / (float)durationMs;
float xp = inset + ratio * drawW;
ig.setColour(juce::Colour(0x80FFFFFF));
ig.fillRect(xp, botY - 4.0f, 1.0f, 4.0f);
}
}
// Beat grid (downbeats only -- every 4 beats as subtle full-height lines)
if (!previewBeatGrid.empty() && durationMs > 0)
{
for (auto& beat : previewBeatGrid)
{
if (beat.beatNumber == 0) continue;
bool isDownbeat = ((beat.beatNumber - 1) % 4) == 0;
if (!isDownbeat) continue; // only downbeats on preview
float ratio = (float)beat.timeMs / (float)durationMs;
float xp = inset + ratio * drawW;
ig.setColour(juce::Colour(0x12FFFFFF));
ig.fillRect(xp, inset, 1.0f, drawH);
}
}
// Rekordbox cue markers (colored triangles above waveform)
if (!previewCues.empty() && durationMs > 0)
{
for (auto& cue : previewCues)
{
if (cue.positionMs == 0 && cue.type == TrackMetadata::RekordboxCue::MemoryPoint)
continue; // skip memory point at position 0 (track start)
float ratio = (float)cue.positionMs / (float)durationMs;
float xp = inset + ratio * drawW;
juce::Colour col = cue.hasColor ? cue.getColour()
: (cue.type == TrackMetadata::RekordboxCue::HotCue
? juce::Colour(0xFF1ECC3C)
: cue.type == TrackMetadata::RekordboxCue::MemoryPoint
? juce::Colour(0xFFCC2020)
: juce::Colour(0xFFFF8800));
juce::Path tri;
tri.addTriangle(xp - 3.0f, inset, xp + 3.0f, inset, xp, inset + 4.0f);
ig.setColour(col);
ig.fillPath(tri);
// Loop end marker
if (cue.loopEndMs > 0 && cue.loopEndMs < durationMs)
{
float endRatio = (float)cue.loopEndMs / (float)durationMs;
float xEnd = inset + endRatio * drawW;
ig.setColour(col.withAlpha(0.15f));
ig.fillRect(xp, inset, xEnd - xp, drawH);
}
}
}
cachedW = w;
cachedH = h;
cachedScale = scale;
cacheValid = true;
}
/// Render CDJ-3000 3-band waveform bars into a Graphics context (cached),
/// or an Engine DJ overview (engineOverview: the mid band's height).
void renderThreeBandBars(juce::Graphics& g, juce::Rectangle<float> bounds)
{
float w = bounds.getWidth();
float inset = 2.0f;
float drawW = w - inset * 2;
float drawH = bounds.getHeight() - inset * 2;
float midY = inset + drawH * 0.5f;
float halfH = drawH * 0.5f;
float entriesPerPx = (float)colorEntryCount / drawW;
float barW = std::max(1.0f, drawW / (float)colorEntryCount);
const uint8_t* data = colorWaveformData.data();
int totalBytes = (int)colorWaveformData.size();
// Find global peak amplitude for height normalization (an Engine DJ
// overview: the highest band value, as before AUDIT META-12)
float globalPeak = 1.0f;
for (int i = 0; i < colorEntryCount; ++i)
{
int off = i * 3;
if (off + 2 >= totalBytes) break;
globalPeak = std::max(globalPeak, engineOverview
? (float)std::max({ data[off], data[off + 1], data[off + 2] })
: threeBandPreviewHeight(data[off], data[off + 1], data[off + 2]));
}
float hScale = halfH / globalPeak;
for (int px = 0; px < (int)drawW; ++px)
{
int eStart = juce::jlimit(0, colorEntryCount - 1, (int)(px * entriesPerPx));
int eEnd = juce::jlimit(0, colorEntryCount - 1, (int)((px + 1) * entriesPerPx));
if (eEnd < eStart) eEnd = eStart;
float sumMid = 0, sumHigh = 0, sumLow = 0;
int count = 0;
for (int e = eStart; e <= eEnd; ++e)
{
int off = e * 3;
if (off + 2 >= totalBytes) break;
sumMid += data[off];
sumHigh += data[off + 1];
sumLow += data[off + 2];
count++;
}
if (count == 0) continue;
float avgMid = sumMid / (float)count;
float avgHigh = sumHigh / (float)count;
float avgLow = sumLow / (float)count;
float amplitude = engineOverview ? avgMid
: threeBandPreviewHeight(avgMid, avgHigh, avgLow);
if (amplitude < 1.0f) continue;
float barH = amplitude * hScale;
float x = inset + (float)px;
float total = avgLow + avgMid + avgHigh + 0.001f;
float highRatio = avgHigh / total;
float blueR = 0.0f + highRatio * 1.0f;
float blueG = 0.45f + highRatio * 0.55f;
float blueB = 1.0f;
g.setColour(juce::Colour::fromFloatRGBA(blueR, blueG, blueB, 1.0f));
g.fillRect(x, midY - barH, barW, barH);
g.fillRect(x, midY, barW, barH);
}
}
/// Render CDJ NXS2+ color waveform bars into a Graphics context (cached).
void renderColorBars(juce::Graphics& g, juce::Rectangle<float> bounds)
{
float w = bounds.getWidth();
float inset = 2.0f;
float drawW = w - inset * 2;
float drawH = bounds.getHeight() - inset * 2;
float midY = inset + drawH * 0.5f;
float halfH = drawH * 0.5f;
float entriesPerPx = (float)colorEntryCount / drawW;
float barW = std::max(1.0f, drawW / (float)colorEntryCount);
const uint8_t* data = colorWaveformData.data();
int totalBytes = (int)colorWaveformData.size();
uint8_t globalPeak = 1; // highest back bar, max(d3, d4, d5)
for (int i = 0; i < colorEntryCount; ++i)
{
int off = i * 6;
if (off + 5 >= totalBytes) break;
globalPeak = std::max({ globalPeak, data[off + 3], data[off + 4], data[off + 5] });
}
float hScale = halfH / (float)globalPeak;
for (int px = 0; px < (int)drawW; ++px)
{
int eStart = juce::jlimit(0, colorEntryCount - 1, (int)(px * entriesPerPx));
int eEnd = juce::jlimit(0, colorEntryCount - 1, (int)((px + 1) * entriesPerPx));
if (eEnd < eStart) eEnd = eStart;
float sumD3 = 0, sumD4 = 0, sumD5 = 0;
int count = 0;
for (int e = eStart; e <= eEnd; ++e)
{
int off = e * 6;
if (off + 5 >= totalBytes) break;
sumD3 += data[off + 3];
sumD4 += data[off + 4];
sumD5 += data[off + 5];
count++;
}
if (count == 0) continue;
float avgD3 = sumD3 / (float)count;
float avgD4 = sumD4 / (float)count;
float avgD5 = sumD5 / (float)count;
const auto column = colorPreviewColumn(avgD3, avgD4, avgD5);
if (column.backHeight < 1.0f) continue;
float x = inset + (float)px;
// Back bar, then the brighter front bar over it
float barH = column.backHeight * hScale;
g.setColour(column.back);
g.fillRect(x, midY - barH, barW, barH);
g.fillRect(x, midY, barW, barH);
barH = column.frontHeight * hScale;
g.setColour(column.front);
g.fillRect(x, midY - barH, barW, barH);
g.fillRect(x, midY, barW, barH);
}
}
/// Bar height of a PWV6 (3-band preview) entry {mid, high, low}: the top
/// of the three bands beat-link's WaveformPreview stacks (low x0.49, then
/// mid x0.32, then high x0.25).
static float threeBandPreviewHeight(float mid, float high, float low) noexcept
{
return low * 0.49f + mid * 0.32f + high * 0.25f;
}
/// A PWV4 (NXS2 colour preview) column from its d3/d4/d5 bytes, as
/// beat-link's WaveformPreview draws it: the back bar is max(d3, d4, d5)
/// high, the front bar d5 high; both take the colour (d3, d4, d5) scaled
/// so the largest component is 191 (back) or 255 (front).
struct ColorPreviewColumn
{
float backHeight = 0.0f, frontHeight = 0.0f;
juce::Colour back, front;
};
static ColorPreviewColumn colorPreviewColumn(float d3, float d4, float d5)
{
ColorPreviewColumn c;
c.backHeight = std::max({ d3, d4, d5 });
c.frontHeight = d5;
if (c.backHeight <= 0.0f) return c;
auto level = [&c](float v, float maxLevel)
{
return (uint8_t)juce::jlimit(0.0f, 255.0f, v * maxLevel / c.backHeight);
};
c.back = juce::Colour(level(d3, 191.0f), level(d4, 191.0f), level(d5, 191.0f));
c.front = juce::Colour(level(d3, 255.0f), level(d4, 255.0f), level(d5, 255.0f));
return c;
}
/// Paint cursor and labels (lightweight -- called every frame over cached image)
void paintOverlay(juce::Graphics& g, juce::Rectangle<float> bounds, int barCount)
{
float w = bounds.getWidth();
float inset = 2.0f;
float drawW = w - inset * 2;
float drawH = bounds.getHeight() - inset * 2;
// Play cursor -- draw directly (2 fillRect calls, cheap)
if (playPosition >= 0.0f && playPosition <= 1.0f && hasWaveformData())
{
float cursorX = inset + playPosition * drawW;
g.setColour(juce::Colour(0x4000D4FF));
g.fillRect(cursorX - 3.0f, inset, 7.0f, drawH);
g.setColour(juce::Colour(0xFFFFFFFF));
g.fillRect(cursorX - 0.5f, inset, 2.0f, drawH);
}
// Resolution label -- drawn directly (one drawText call, negligible cost)
juce::String label = juce::String(barCount)
+ (colorBytesPerEntry == 3 ? " (3-band)" : " (color)");
g.setColour(juce::Colour(0x60FFFFFF));
g.setFont(9.0f);
g.drawText(label, bounds.reduced(4.0f, 1.0f), juce::Justification::topRight);
}
std::vector<uint8_t> colorWaveformData;
int colorEntryCount = 0;
int colorBytesPerEntry = 0; // 3=ThreeBand(CDJ-3000), 6=ColorNxs2
bool engineOverview = false; // 3 bytes from Engine DJ, not rekordbox's PWV6
bool hasColorData = false;
float playPosition = 0.0f; // 0.0 = start, 1.0 = end
uint32_t durationMs = 0; // track duration for minute markers
std::vector<TrackMetadata::RekordboxCue> previewCues; // colored cue markers
std::vector<TrackMetadata::BeatEntry> previewBeatGrid; // beat grid for downbeat lines
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(WaveformDisplay)
};
//==============================================================================
// ArtworkDisplay -- Paints a decoded JPEG album art image
//==============================================================================
class ArtworkDisplay : public juce::Component
{
public:
ArtworkDisplay()
{
setOpaque(false);
}
/// Set the artwork image (call from message thread).
void setImage(const juce::Image& img)
{
artwork = img;
repaint();
}
/// Clear artwork (e.g. on track change)
void clearImage()
{
artwork = {};
repaint();
}
bool hasImage() const { return artwork.isValid(); }
void paint(juce::Graphics& g) override
{
auto bounds = getLocalBounds().toFloat();
// Background
g.setColour(juce::Colour(0xFF0D1117));
g.fillRoundedRectangle(bounds, 3.0f);
if (!artwork.isValid())
{
// Placeholder icon
g.setColour(juce::Colour(0xFF4A5568));
g.setFont(10.0f);
g.drawText("ART",
bounds, juce::Justification::centred);
return;
}
// Draw image scaled to fit, centered, with small inset
float inset = 2.0f;
auto drawBounds = bounds.reduced(inset);
// Maintain aspect ratio
float imgW = (float)artwork.getWidth();
float imgH = (float)artwork.getHeight();
float scale = juce::jmin(drawBounds.getWidth() / imgW,
drawBounds.getHeight() / imgH);
float dw = imgW * scale;
float dh = imgH * scale;
float dx = drawBounds.getX() + (drawBounds.getWidth() - dw) * 0.5f;
float dy = drawBounds.getY() + (drawBounds.getHeight() - dh) * 0.5f;
g.drawImage(artwork, (int)dx, (int)dy, (int)dw, (int)dh,
0, 0, artwork.getWidth(), artwork.getHeight());
}
private:
juce::Image artwork;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ArtworkDisplay)
};