`Page 1/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`1
`+++++¬
`…
`¬2
`$Id: rgbvideo.c,v 1.9 2001/10/02 21:12:54 guyc Exp $¬
`3
`¬4
`Copyright (c) 2001 BeComm Corporation¬
`5
`¬6
`Filename:¬
`7
`¬8
` rgbvideo.c¬
`9
`¬10
`Abstract:¬
`11
`¬12
` Displays rgb video to the default rgbdisplay device.¬
`13
`¬14
`Owner:¬
`15
`¬16
` Guy Carpenter (guyc)¬
`17
`¬18
`--------------------------------------------------------------------------
`19
`---*/¬
`…
`¬20
`#define SOS_DEBUG_ZONE "/beads/rgbvideo"¬
`21
`¬22
`#include <sosstrings.h>¬
`23
`#include <sosmultimedia.h>¬
`24
`¬25
`SOS_SOURCE_VERSION("$Id: rgbvideo.c,v 1.9 2001/10/02 21:12:54 guyc Exp
`26
`$");¬
`…
`¬27
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`28
`+++++¬
`…
`Named Constants¬
`29
`--------------------------------------------------------------------------
`30
`---*/¬
`…
`¬31
`/*¬
`32
`* Name of bead¬
`33
`*/¬
`34
`static const char BEAD_NAME[] = "rgbvideo";¬
`35
`¬36
`// REVISIT - device name should not be hard coded.¬
`37
`/*¬
`38
`* Name of the device we use for output.¬
`39
`*/¬
`40
`
`Page 1 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 2/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`#define DEVICE_CLASS "rgbdisplay"¬
`41
`#define DEVICE_NAME "default"¬
`42
`¬43
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`44
`+++++¬
`…
`Structs¬
`45
`--------------------------------------------------------------------------
`46
`---*/¬
`…
`¬47
`typedef struct {¬
`48
` char * DeviceName;¬
`49
` void * FrameBuffer;¬
`50
` size_t FrameBufferSize;¬
`51
` SOS_VIDEO_FORMAT VideoFormat;¬
`52
` SOS_IRGBDISPLAY * IRgbDisplay;¬
`53
` SOS_ISAMPLECLOCK * IRenderClock;¬
`54
` SOS_ISAMPLECLOCK * IMasterClock;¬
`55
` SOS_IVIDEOCONTEXT * IVideoContext;¬
`56
` SOS_VIDEO_TIMESTAMP FrameNumber;¬
`57
` SOS_BOOLEAN DisplayReady;¬
`58
` SOS_BOOLEAN ClocksReady;¬
`59
`} RGBVIDEO_CONTEXT;¬
`60
`¬61
`¬62
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`63
`+++++¬
`…
`Context Stuff¬
`64
`--------------------------------------------------------------------------
`65
`---*/¬
`…
`¬66
`static¬
`67
`void¬
`68
`RgbVideo_ContextDestroy(¬
`69
` RGBVIDEO_CONTEXT * Context¬
`70
`)¬
`71
`{¬
`72
` if (Context) {¬
`73
` ¬
`74
` if (Context->FrameBuffer) {¬
`75
` SOS_Mem_Free(Context->FrameBuffer);¬
`76
` }¬
`77
`¬78
` if (Context->IRgbDisplay) {¬
`79
` SOS_RegObject_InterfaceRelease(Context->IRgbDisplay);¬
`80
` }¬
`81
`
`Page 2 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 3/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`¬82
` if (Context->DeviceName) {¬
`83
` SOS_Mem_Free(Context->DeviceName);¬
`84
` }¬
`85
`¬86
` if (Context->IMasterClock) {¬
`87
` SOS_Interface_Release(Context->IMasterClock);¬
`88
` }¬
`89
`¬90
` if (Context->IRenderClock) {¬
`91
` SOS_Interface_Release(Context->IRenderClock);¬
`92
` }¬
`93
`¬94
` if (Context->IVideoContext) {¬
`95
` SOS_Interface_Release(Context->IVideoContext);¬
`96
` }¬
`97
`¬98
` SOS_Mem_Free(Context);¬
`99
` }¬
`100
`}¬
`101
`¬
`102
`/*¬
`103
` * Find the device and get the necessary interface¬
`104
` */¬
`105
`static¬
`106
`SOS_STATUS¬
`107
`RgbVideo_DeviceInit(¬
`108
` RGBVIDEO_CONTEXT * Context¬
`109
`)¬
`110
`{¬
`111
` SOS_STATUS status;¬
`112
`¬
`113
` SOS_REGOBJECT *device;¬
`114
`¬
`115
`/*¬
`116
` * NOTE : if InterfaceGet fails it will set IRgbDisplay¬
`117
` * to NULL for us.¬
`118
` */¬
`119
` status = SOS_Registry_DeviceGet(¬
`120
` DEVICE_CLASS,¬
`121
` Context->DeviceName,¬
`122
` &device);¬
`123
`¬
`124
` if (SOS_SUCCEEDED(status)) {¬
`125
` status = SOS_RegObject_InterfaceGet(¬
`126
`
`Page 3 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 4/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` device,¬
` SOS_IRGBDISPLAY_ID,¬
` (void**)&Context->IRgbDisplay¬
` );¬
`¬
` }¬
` SOS_RegObject_Release(device);¬
`¬
` return status;¬
`}¬
`¬
`static¬
`RGBVIDEO_CONTEXT *¬
`RgbVideo_ContextCreate(¬
` void¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
` RGBVIDEO_CONTEXT *context;¬
`¬
` context = SOS_Mem_Alloc(sizeof(*context));¬
` if (context) {¬
` SOS_memset(context, 0, sizeof(*context));¬
`¬
` /*¬
` * Revisit - this should not be hard coded¬
` */¬
` context->DeviceName = SOS_strdup(DEVICE_NAME);¬
`¬
` status = RgbVideo_DeviceInit(context);¬
`¬
` } else {¬
` /* failed mallocing context */¬
` status = SOS_ErrorResourceAllocation;¬
` }¬
`¬
` /*¬
` * If anything went wrong we should cleanup ¬
` */¬
` if (SOS_FAILED(status)) {¬
` RgbVideo_ContextDestroy(context);¬
` context = NULL;¬
` }¬
`¬
` return context;¬
`
`Page 4 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 5/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
`}¬
`¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`static¬
`SOS_STATUS¬
`DisplayPrepare(¬
` RGBVIDEO_CONTEXT * Context,¬
` SOS_MESSAGE * Message¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
`¬
` status = Context->IVideoContext->FormatGet(¬
` Context->IVideoContext,¬
` Message,¬
` &Context->VideoFormat,¬
` NULL /* don't care about timestamp */¬
` );¬
`¬
` if (SOS_SUCCEEDED(status)) {¬
` status = Context->IRgbDisplay->Open(¬
` Context->IRgbDisplay,¬
` Context->VideoFormat.Width,¬
` Context->VideoFormat.Height,¬
` SOS_VIDEO_RGB24¬
` );¬
` }¬
`¬
` return status;¬
`}¬
`¬
`SOS_STATUS¬
`ContextClockGet(¬
` SOS_PATH * Path,¬
` const char * Name,¬
` SOS_ISAMPLECLOCK ** ISampleClock¬
`)¬
`{¬
` SOS_STATUS status;¬
` SOS_REGOBJECT *object;¬
`
`Page 5 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 6/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` SOS_ISAMPLECLOCK *iSampleClock = NULL;¬
` ¬
` status = SOS_Path_AttributeGet(¬
` Path,¬
` Name,¬
` &object¬
` );¬
`¬
` if (SOS_SUCCEEDED(status)) {¬
` status = SOS_RegObject_InterfaceGet(¬
` object,¬
` SOS_ISAMPLECLOCK_ID,¬
` (void**)&iSampleClock¬
` );¬
` SOS_RegObject_Release(object);¬
` }¬
`¬
` if (ISampleClock) {¬
` *ISampleClock = iSampleClock;¬
` } else {¬
` SOS_Interface_Release(iSampleClock);¬
` status = SOS_ErrorParameter;¬
` }¬
`¬
` return status;¬
`}¬
`¬
`static¬
`SOS_STATUS¬
`ClocksPrepare(¬
` RGBVIDEO_CONTEXT * Context,¬
` SOS_PATH * Path¬
`)¬
`{¬
` SOS_STATUS status;¬
`¬
`¬
` if (!Context->IRenderClock) {¬
` status = ContextClockGet(¬
` Path,¬
` SOS_RENDERCLOCK_NAME,¬
` &Context->IRenderClock¬
` );¬
`¬
` /*¬
`
`Page 6 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 7/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` * NOTE:¬
` * This assumes that the video format is¬
` * already known.¬
` */¬
`¬
` Context->IRenderClock->FrequencySet(¬
` Context->IRenderClock,¬
` Context->VideoFormat.FrameRate,¬
` Context->VideoFormat.FrameRateDivisor¬
` );¬
` }¬
` if (!Context->IMasterClock) {¬
` status = ContextClockGet(¬
` Path,¬
` SOS_MASTERCLOCK_NAME,¬
` &Context->IMasterClock¬
` );¬
` }¬
`¬
` ¬
` return (Context->IRenderClock && Context->IMasterClock) ?¬
` SOS_Success : SOS_Error;¬
`}¬
`¬
`static¬
`SOS_UINT32¬
`ComputeDelay(¬
` RGBVIDEO_CONTEXT * Context¬
`)¬
`{¬
` SOS_CLOCK_TICK renderEpoch, masterEpoch;¬
` SOS_CLOCK_TICK now = SOS_Clock_TickGet();¬
` SOS_INT32 delay = 0;¬
`¬
` if (Context->IRenderClock && Context->IMasterClock) {¬
` ¬
` Context->IRenderClock->Update(¬
` Context->IRenderClock,¬
` now,¬
` Context->FrameNumber¬
` );¬
`¬
` if (SOS_SUCCEEDED(¬
` Context->IRenderClock->EpochGet(¬
` Context->IRenderClock,¬
`
`Page 7 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 8/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` &renderEpoch)) ¬
` &&¬
` SOS_SUCCEEDED(¬
` Context->IMasterClock->EpochGet(¬
` Context->IMasterClock,¬
` &masterEpoch))) {¬
` ¬
` delay = (SOS_INT32)(masterEpoch - renderEpoch);¬
`¬
` SOS_DEBUGOUT_DETAIL(¬
` "frame %lu master %lu render %lu delay %ld\n",¬
` Context->FrameNumber,¬
` masterEpoch,¬
` renderEpoch,¬
` delay¬
` );¬
` }¬
` } else {¬
` SOS_DEBUGOUT_MAJOR_EVENT(¬
` "rgbvideo could not find master or render clock in path
`context"¬
` );¬
` }¬
`¬
` /*¬
` * If anything is not available or fails, delay will be¬
` * 0 which means we will play out immediately¬
` */¬
`¬
` SOS_DEBUGEXEC4(¬
` SOS_Debug_StringPrint(¬
` "Frame %d due at %lu (in %ld)\n",¬
` Context->FrameNumber,¬
` now+delay,¬
` delay¬
` );¬
` );¬
`¬
` return (delay<0) ? 0 : (SOS_UINT32)delay;¬
`}¬
`¬
`¬
`¬
`static¬
`SOS_STATUS¬
`
`Page 8 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/bea…/…/main/rgbvideo.c
`Page 9/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
`DisplayFrame(¬
` RGBVIDEO_CONTEXT * Context,¬
` SOS_MESSAGE * Message¬
`¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
` SOS_UINT32 frameSize;¬
` void *frame;¬
`¬
` // REVISIT - could reuse the same buffer each time!¬
`¬
` frameSize = SOS_Message_LengthGet(Message);¬
` frame = SOS_Mem_Alloc(frameSize);¬
`¬
` if (frame) {¬
` SOS_CLOCK_TICK delay = 0; ¬
` SOS_Message_HeadDataPop(¬
` Message,¬
` frameSize,¬
` frame,¬
` NULL¬
` );¬
`¬
` delay = ComputeDelay(Context);¬
`¬
` SOS_DEBUGOUT_DATA_TRACE("Video delay %d\n",delay);¬
` ¬
` status = Context->IRgbDisplay->Write(¬
` Context->IRgbDisplay,¬
` delay,¬
` frame,¬
` frameSize¬
` );¬
`¬
`// SOS_Sleep(1);¬
` ¬
` // REVISIT - we could reuse this buffer¬
` ¬
` SOS_Mem_Free(frame);¬
` ¬
` } else {¬
` status = SOS_ErrorResourceAllocation;¬
` }¬
` ¬
`
`Page 9 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 10/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` return status;¬
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
` ¬
`static¬
`SOS_STATUS¬
`RgbVideo_VideoContextGet(¬
` RGBVIDEO_CONTEXT * Context,¬
` SOS_PATH * Path¬
`)¬
`{¬
` SOS_STATUS status;¬
` SOS_REGOBJECT *contextObject;¬
` SOS_IVIDEOCONTEXT *iVideoContext;¬
`¬
` status = SOS_Path_AttributeGet(¬
` Path,¬
` SOS_VIDEOCONTEXT_NAME,¬
` &contextObject¬
` );¬
`¬
` SOS_ASSERT_SOFT_ERROR(¬
` SOS_SUCCEEDED(status),¬
` "Path context does not contain a video context"¬
` );¬
`¬
` if (SOS_SUCCEEDED(status)) {¬
` status = SOS_RegObject_InterfaceGet(¬
` contextObject,¬
` SOS_IVIDEOCONTEXT_ID,¬
` (void**)&iVideoContext¬
` );¬
`¬
` SOS_ASSERT_SOFT_ERROR(¬
` SOS_SUCCEEDED(status),¬
` "Video context does not support required interface"¬
` );¬
`¬
` if (SOS_SUCCEEDED(status)) {¬
` Context->IVideoContext = iVideoContext;¬
`
`Page 10 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 11/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` }¬
` SOS_RegObject_Release(contextObject);¬
` }¬
` return status;¬
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`Bead Definition¬
`--------------------------------------------------------------------------
`---*/¬
`static¬
`SOS_STATUS¬
`RgbVideo_KeyCreate(¬
` SOS_PATH *Path,¬
` SOS_MESSAGE *Message¬
`)¬
`{¬
` static SOS_UINT32 s_UniqueId = 0;¬
` SOS_REGOBJECT* uniqueSessionKey;¬
` ¬
` uniqueSessionKey = SOS_UInt32_Create(s_UniqueId++);¬
` SOS_Path_SessionKeySet(Path, uniqueSessionKey);¬
` SOS_RegObject_Release(uniqueSessionKey);¬
`¬
` return SOS_PathBuild_Stop;¬
`}¬
`¬
`¬
`static¬
`SOS_STATUS¬
`RgbVideo_MessageHandler(¬
` SOS_PATH *Path,¬
` SOS_MESSAGE *Message¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
` RGBVIDEO_CONTEXT *context;¬
`¬
` SOS_DEBUGOUT_FUNC_TRACE("RgbVideo_MessageHandler\n");¬
`¬
` SOS_Path_SessionContextPeek(Path, (void**)&context);¬
`¬
` /*¬
` * Extract the clocks, video context from the path/message¬
`
`Page 11 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 12/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
` */¬
` if (!context->IVideoContext) {¬
` status = RgbVideo_VideoContextGet(¬
` context,¬
` Path¬
` );¬
` }¬
`¬
` if (!context->DisplayReady && SOS_SUCCEEDED(status)) {¬
` status = DisplayPrepare(context, Message);¬
` if (SOS_SUCCEEDED(status)) {¬
` context->DisplayReady = SOS_True;¬
` }¬
` }¬
`¬
` if (!context->ClocksReady) {¬
` if (SOS_SUCCEEDED(status)) {¬
` status = ClocksPrepare(context, Path);¬
` if (SOS_SUCCEEDED(status)) {¬
` context->ClocksReady = SOS_True;¬
` }¬
` }¬
` }¬
`¬
` /*¬
` * If all of those steps are complete then¬
` * we can unpack and display the next frame¬
` */¬
` if (SOS_SUCCEEDED(status)) {¬
`¬
` context->IVideoContext->Unpack(¬
` context->IVideoContext,¬
` Message,¬
` NULL, /* don't want format */¬
` &context->FrameNumber¬
` );¬
`¬
` ¬
` DisplayFrame(context, Message);¬
` }¬
`¬
` SOS_Message_Destroy(Message);¬
`¬
` return status;¬
`}¬
`
`Page 12 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 13/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`Session Setup¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`¬
`static¬
`SOS_STATUS¬
`RgbVideo_SessionInit(¬
` SOS_PATH *Path¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
` RGBVIDEO_CONTEXT *context = RgbVideo_ContextCreate();¬
`¬
` if (context) {¬
` SOS_Path_SessionContextPut(Path, context);¬
` } else {¬
` status = SOS_Error;¬
` }¬
` ¬
` return status;¬
`}¬
`¬
`static¬
`SOS_STATUS¬
`RgbVideo_SessionUninit(¬
` SOS_PATH *Path¬
`)¬
`{¬
` SOS_STATUS status = SOS_Success;¬
` RGBVIDEO_CONTEXT *context;¬
`¬
` SOS_Path_SessionContextPeek(Path, (void**)&context);¬
`¬
` if (context) {¬
` if (context->IRgbDisplay) {¬
` context->IRgbDisplay->Close(¬
` context->IRgbDisplay¬
` );¬
` }¬
` RgbVideo_ContextDestroy(context);¬
` }¬
`¬
`
`Page 13 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 14/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`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
`601
`602
`603
`604
`605
`606
`607
`608
`609
`610
`
` return status;¬
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`Bead Setup¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`¬
`static¬
`SOS_STATUS¬
`RgbVideo_BeadInit(¬
` SOS_BEAD *Bead,¬
` SOS_REGOBJECT *InitContext¬
`)¬
`{¬
` SOS_STATUS status;¬
` ¬
` /* register Encode Edge */¬
` status = SOS_Edge_Register(¬
` Bead,¬
` "encode",¬
` NULL,¬
` NULL,¬
` NULL,¬
` RgbVideo_KeyCreate,¬
` RgbVideo_MessageHandler,¬
` NULL,¬
` NULL,¬
` NULL,¬
` NULL);¬
`¬
` if (SOS_FAILED(status)) {¬
` SOS_DEBUGOUT_MAJOR_EVENT( "Could not register encode edge");¬
` }¬
` return status;¬
`}¬
`¬
`static¬
`SOS_STATUS¬
`RgbVideo_BeadUninit(¬
` void *BeadContext¬
`)¬
`{¬
` return SOS_Success;¬
`
`Page 14 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`
`
`/Users/implicit/Desktop/Source Code/2001.11.01/be…/…/main/rgbvideo.c
`Page 15/15
`Saved: 10/2/01, 4:12:54 PM
`Printed for: Implicit
`
`}¬
`¬
`/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++++¬
`Module Setup¬
`++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`+++*/¬
`¬
`SOS_STATUS¬
`SOS_ModuleInit (¬
` SOS_OBJECTFILE *ObjectFile,¬
` SOS_REGOBJECT *InitContext¬
`)¬
`{¬
` SOS_STATUS status;¬
` ¬
` /* register the Bead */¬
` status = SOS_Bead_Register(¬
` ObjectFile,¬
` BEAD_NAME,¬
` NULL, /* Bead context */¬
` RgbVideo_BeadInit,¬
` RgbVideo_BeadUninit,¬
` RgbVideo_SessionInit,¬
` RgbVideo_SessionUninit¬
` );¬
`¬
` return status;¬
`}¬
`¬
`¬
`void¬
`SOS_ModuleUninit (¬
` SOS_OBJECTFILE *ObjectFile¬
`)¬
`{¬
`¬
`}¬
`
`611
`612
`613
`…
`614
`615
`…
`616
`617
`618
`619
`620
`621
`622
`623
`624
`625
`626
`627
`628
`629
`630
`631
`632
`633
`634
`635
`636
`637
`638
`639
`640
`641
`642
`643
`644
`645
`646
`647
`
`Page 15 of 15
`
`Implicit Exhibit 2050
`Sonos v. Implicit, IPR2018-0766, -0767
`
`