[QEDIT] Sync with Wine 3.0. CORE-14225
[reactos.git] / dll / directx / wine / qedit / timeline.c
1 /* DirectShow Timeline object (QEDIT.DLL)
2 *
3 * Copyright 2016 Alex Henrie
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 #include "qedit_private.h"
21
22 typedef struct {
23 IUnknown IUnknown_inner;
24 IAMTimeline IAMTimeline_iface;
25 IUnknown *outer_unk;
26 LONG ref;
27 } TimelineImpl;
28
29 static inline TimelineImpl *impl_from_IUnknown(IUnknown *iface)
30 {
31 return CONTAINING_RECORD(iface, TimelineImpl, IUnknown_inner);
32 }
33
34 static inline TimelineImpl *impl_from_IAMTimeline(IAMTimeline *iface)
35 {
36 return CONTAINING_RECORD(iface, TimelineImpl, IAMTimeline_iface);
37 }
38
39 typedef struct {
40 IAMTimelineObj IAMTimelineObj_iface;
41 IAMTimelineGroup IAMTimelineGroup_iface;
42 LONG ref;
43 TIMELINE_MAJOR_TYPE timeline_type;
44 } TimelineObjImpl;
45
46 static inline TimelineObjImpl *impl_from_IAMTimelineObj(IAMTimelineObj *iface)
47 {
48 return CONTAINING_RECORD(iface, TimelineObjImpl, IAMTimelineObj_iface);
49 }
50
51 static inline TimelineObjImpl *impl_from_IAMTimelineGroup(IAMTimelineGroup *iface)
52 {
53 return CONTAINING_RECORD(iface, TimelineObjImpl, IAMTimelineGroup_iface);
54 }
55
56 static const IAMTimelineObjVtbl IAMTimelineObj_VTable;
57 static const IAMTimelineGroupVtbl IAMTimelineGroup_VTable;
58
59 /* Timeline inner IUnknown */
60
61 static HRESULT WINAPI Timeline_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
62 {
63 TimelineImpl *This = impl_from_IUnknown(iface);
64
65 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
66
67 if (!ppv)
68 return E_POINTER;
69
70 *ppv = NULL;
71 if (IsEqualIID(riid, &IID_IUnknown))
72 *ppv = &This->IUnknown_inner;
73 else if (IsEqualIID(riid, &IID_IAMTimeline))
74 *ppv = &This->IAMTimeline_iface;
75 else
76 WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv);
77
78 if (!*ppv)
79 return E_NOINTERFACE;
80
81 IUnknown_AddRef((IUnknown*)*ppv);
82 return S_OK;
83 }
84
85 static ULONG WINAPI Timeline_AddRef(IUnknown *iface)
86 {
87 TimelineImpl *This = impl_from_IUnknown(iface);
88 ULONG ref = InterlockedIncrement(&This->ref);
89
90 TRACE("(%p) new ref = %u\n", This, ref);
91
92 return ref;
93 }
94
95 static ULONG WINAPI Timeline_Release(IUnknown *iface)
96 {
97 TimelineImpl *This = impl_from_IUnknown(iface);
98 ULONG ref = InterlockedDecrement(&This->ref);
99
100 TRACE("(%p) new ref = %u\n", This, ref);
101
102 if (ref == 0)
103 CoTaskMemFree(This);
104
105 return ref;
106 }
107
108 static const IUnknownVtbl timeline_vtbl =
109 {
110 Timeline_QueryInterface,
111 Timeline_AddRef,
112 Timeline_Release,
113 };
114
115 /* IAMTimeline implementation */
116
117 static HRESULT WINAPI Timeline_IAMTimeline_QueryInterface(IAMTimeline *iface, REFIID riid, void **ppv)
118 {
119 TimelineImpl *This = impl_from_IAMTimeline(iface);
120 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
121 }
122
123 static ULONG WINAPI Timeline_IAMTimeline_AddRef(IAMTimeline *iface)
124 {
125 TimelineImpl *This = impl_from_IAMTimeline(iface);
126 return IUnknown_AddRef(This->outer_unk);
127 }
128
129 static ULONG WINAPI Timeline_IAMTimeline_Release(IAMTimeline *iface)
130 {
131 TimelineImpl *This = impl_from_IAMTimeline(iface);
132 return IUnknown_Release(This->outer_unk);
133 }
134
135 static HRESULT WINAPI Timeline_IAMTimeline_CreateEmptyNode(IAMTimeline *iface, IAMTimelineObj **obj,
136 TIMELINE_MAJOR_TYPE type)
137 {
138 TimelineImpl *This = impl_from_IAMTimeline(iface);
139 TimelineObjImpl* obj_impl;
140
141 TRACE("(%p)->(%p,%d)\n", This, obj, type);
142
143 if (!obj)
144 return E_POINTER;
145
146 switch (type)
147 {
148 case TIMELINE_MAJOR_TYPE_COMPOSITE:
149 case TIMELINE_MAJOR_TYPE_TRACK:
150 case TIMELINE_MAJOR_TYPE_SOURCE:
151 case TIMELINE_MAJOR_TYPE_TRANSITION:
152 case TIMELINE_MAJOR_TYPE_EFFECT:
153 case TIMELINE_MAJOR_TYPE_GROUP:
154 break;
155 default:
156 return E_INVALIDARG;
157 }
158
159 obj_impl = CoTaskMemAlloc(sizeof(TimelineObjImpl));
160 if (!obj_impl) {
161 *obj = NULL;
162 return E_OUTOFMEMORY;
163 }
164
165 obj_impl->ref = 1;
166 obj_impl->IAMTimelineObj_iface.lpVtbl = &IAMTimelineObj_VTable;
167 obj_impl->IAMTimelineGroup_iface.lpVtbl = &IAMTimelineGroup_VTable;
168 obj_impl->timeline_type = type;
169
170 *obj = &obj_impl->IAMTimelineObj_iface;
171 return S_OK;
172 }
173
174 static HRESULT WINAPI Timeline_IAMTimeline_AddGroup(IAMTimeline *iface, IAMTimelineObj *group)
175 {
176 TimelineImpl *This = impl_from_IAMTimeline(iface);
177 FIXME("(%p)->(%p): not implemented!\n", This, group);
178 return E_NOTIMPL;
179 }
180
181 static HRESULT WINAPI Timeline_IAMTimeline_RemGroupFromList(IAMTimeline *iface, IAMTimelineObj *group)
182 {
183 TimelineImpl *This = impl_from_IAMTimeline(iface);
184 FIXME("(%p)->(%p): not implemented!\n", This, group);
185 return E_NOTIMPL;
186 }
187
188 static HRESULT WINAPI Timeline_IAMTimeline_GetGroup(IAMTimeline *iface, IAMTimelineObj **group, LONG index)
189 {
190 TimelineImpl *This = impl_from_IAMTimeline(iface);
191 FIXME("(%p)->(%p,%d): not implemented!\n", This, group, index);
192 return E_NOTIMPL;
193 }
194
195 static HRESULT WINAPI Timeline_IAMTimeline_GetGroupCount(IAMTimeline *iface, LONG *count)
196 {
197 TimelineImpl *This = impl_from_IAMTimeline(iface);
198 FIXME("(%p)->(%p): not implemented!\n", This, count);
199 return E_NOTIMPL;
200 }
201
202 static HRESULT WINAPI Timeline_IAMTimeline_ClearAllGroups(IAMTimeline *iface)
203 {
204 TimelineImpl *This = impl_from_IAMTimeline(iface);
205 FIXME("(%p): not implemented!\n", This);
206 return E_NOTIMPL;
207 }
208
209 static HRESULT WINAPI Timeline_IAMTimeline_GetInsertMode(IAMTimeline *iface, LONG *mode)
210 {
211 TimelineImpl *This = impl_from_IAMTimeline(iface);
212 FIXME("(%p)->(%p): not implemented!\n", This, mode);
213 return E_NOTIMPL;
214 }
215
216 static HRESULT WINAPI Timeline_IAMTimeline_SetInsertMode(IAMTimeline *iface, LONG mode)
217 {
218 TimelineImpl *This = impl_from_IAMTimeline(iface);
219 FIXME("(%p)->(%d): not implemented!\n", This, mode);
220 return E_NOTIMPL;
221 }
222
223 static HRESULT WINAPI Timeline_IAMTimeline_EnableTransitions(IAMTimeline *iface, BOOL enabled)
224 {
225 TimelineImpl *This = impl_from_IAMTimeline(iface);
226 FIXME("(%p)->(%d): not implemented!\n", This, enabled);
227 return E_NOTIMPL;
228 }
229
230 static HRESULT WINAPI Timeline_IAMTimeline_TransitionsEnabled(IAMTimeline *iface, BOOL *enabled)
231 {
232 TimelineImpl *This = impl_from_IAMTimeline(iface);
233 FIXME("(%p)->(%p): not implemented!\n", This, enabled);
234 return E_NOTIMPL;
235 }
236
237 static HRESULT WINAPI Timeline_IAMTimeline_EnableEffects(IAMTimeline *iface, BOOL enabled)
238 {
239 TimelineImpl *This = impl_from_IAMTimeline(iface);
240 FIXME("(%p)->(%d): not implemented!\n", This, enabled);
241 return E_NOTIMPL;
242 }
243
244 static HRESULT WINAPI Timeline_IAMTimeline_EffectsEnabled(IAMTimeline *iface, BOOL *enabled)
245 {
246 TimelineImpl *This = impl_from_IAMTimeline(iface);
247 FIXME("(%p)->(%p): not implemented!\n", This, enabled);
248 return E_NOTIMPL;
249 }
250
251 static HRESULT WINAPI Timeline_IAMTimeline_SetInterestRange(IAMTimeline *iface, REFERENCE_TIME start,
252 REFERENCE_TIME stop)
253 {
254 TimelineImpl *This = impl_from_IAMTimeline(iface);
255 FIXME("(%p)->(%s,%s): not implemented!\n", This, wine_dbgstr_longlong(start),
256 wine_dbgstr_longlong(stop));
257 return E_NOTIMPL;
258 }
259
260 static HRESULT WINAPI Timeline_IAMTimeline_GetDuration(IAMTimeline *iface, REFERENCE_TIME *duration)
261 {
262 TimelineImpl *This = impl_from_IAMTimeline(iface);
263 FIXME("(%p)->(%p): not implemented!\n", This, duration);
264 return E_NOTIMPL;
265 }
266
267 static HRESULT WINAPI Timeline_IAMTimeline_GetDuration2(IAMTimeline *iface, double *duration)
268 {
269 TimelineImpl *This = impl_from_IAMTimeline(iface);
270 FIXME("(%p)->(%p): not implemented!\n", This, duration);
271 return E_NOTIMPL;
272 }
273
274 static HRESULT WINAPI Timeline_IAMTimeline_SetDefaultFPS(IAMTimeline *iface, double fps)
275 {
276 TimelineImpl *This = impl_from_IAMTimeline(iface);
277 FIXME("(%p)->(%f): not implemented!\n", This, fps);
278 return E_NOTIMPL;
279 }
280
281 static HRESULT WINAPI Timeline_IAMTimeline_GetDefaultFPS(IAMTimeline *iface, double *fps)
282 {
283 TimelineImpl *This = impl_from_IAMTimeline(iface);
284 FIXME("(%p)->(%p): not implemented!\n", This, fps);
285 return E_NOTIMPL;
286 }
287
288 static HRESULT WINAPI Timeline_IAMTimeline_IsDirty(IAMTimeline *iface, BOOL *dirty)
289 {
290 TimelineImpl *This = impl_from_IAMTimeline(iface);
291 FIXME("(%p)->(%p): not implemented!\n", This, dirty);
292 return E_NOTIMPL;
293 }
294
295 static HRESULT WINAPI Timeline_IAMTimeline_GetDirtyRange(IAMTimeline *iface, REFERENCE_TIME *start,
296 REFERENCE_TIME *stop)
297 {
298 TimelineImpl *This = impl_from_IAMTimeline(iface);
299 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
300 return E_NOTIMPL;
301 }
302
303 static HRESULT WINAPI Timeline_IAMTimeline_GetCountOfType(IAMTimeline *iface, LONG group, LONG *value,
304 LONG *value_with_comps, TIMELINE_MAJOR_TYPE type)
305 {
306 TimelineImpl *This = impl_from_IAMTimeline(iface);
307 FIXME("(%p)->(%d,%p,%p,%04x): not implemented!\n", This, group, value, value_with_comps, type);
308 return E_NOTIMPL;
309 }
310
311 static HRESULT WINAPI Timeline_IAMTimeline_ValidateSourceNames(IAMTimeline *iface, LONG flags, IMediaLocator *override,
312 LONG_PTR notify_event)
313 {
314 TimelineImpl *This = impl_from_IAMTimeline(iface);
315 FIXME("(%p)->(%d,%p,%lx): not implemented!\n", This, flags, override, notify_event);
316 return E_NOTIMPL;
317 }
318
319 static HRESULT WINAPI Timeline_IAMTimeline_SetDefaultTransition(IAMTimeline *iface, GUID *guid)
320 {
321 TimelineImpl *This = impl_from_IAMTimeline(iface);
322 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_guid(guid));
323 return E_NOTIMPL;
324 }
325
326 static HRESULT WINAPI Timeline_IAMTimeline_GetDefaultTransition(IAMTimeline *iface, GUID *guid)
327 {
328 TimelineImpl *This = impl_from_IAMTimeline(iface);
329 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_guid(guid));
330 return E_NOTIMPL;
331 }
332
333 static HRESULT WINAPI Timeline_IAMTimeline_SetDefaultEffect(IAMTimeline *iface, GUID *guid)
334 {
335 TimelineImpl *This = impl_from_IAMTimeline(iface);
336 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_guid(guid));
337 return E_NOTIMPL;
338 }
339
340 static HRESULT WINAPI Timeline_IAMTimeline_GetDefaultEffect(IAMTimeline *iface, GUID *guid)
341 {
342 TimelineImpl *This = impl_from_IAMTimeline(iface);
343 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_guid(guid));
344 return E_NOTIMPL;
345 }
346
347 static HRESULT WINAPI Timeline_IAMTimeline_SetDefaultTransitionB(IAMTimeline *iface, BSTR guidb)
348 {
349 TimelineImpl *This = impl_from_IAMTimeline(iface);
350 FIXME("(%p)->(%p): not implemented!\n", This, guidb);
351 return E_NOTIMPL;
352 }
353
354 static HRESULT WINAPI Timeline_IAMTimeline_GetDefaultTransitionB(IAMTimeline *iface, BSTR *guidb)
355 {
356 TimelineImpl *This = impl_from_IAMTimeline(iface);
357 FIXME("(%p)->(%p): not implemented!\n", This, guidb);
358 return E_NOTIMPL;
359 }
360
361 static HRESULT WINAPI Timeline_IAMTimeline_SetDefaultEffectB(IAMTimeline *iface, BSTR guidb)
362 {
363 TimelineImpl *This = impl_from_IAMTimeline(iface);
364 FIXME("(%p)->(%p): not implemented!\n", This, guidb);
365 return E_NOTIMPL;
366 }
367
368 static HRESULT WINAPI Timeline_IAMTimeline_GetDefaultEffectB(IAMTimeline *iface, BSTR *guidb)
369 {
370 TimelineImpl *This = impl_from_IAMTimeline(iface);
371 FIXME("(%p)->(%p): not implemented!\n", This, guidb);
372 return E_NOTIMPL;
373 }
374
375 static const IAMTimelineVtbl IAMTimeline_VTable =
376 {
377 Timeline_IAMTimeline_QueryInterface,
378 Timeline_IAMTimeline_AddRef,
379 Timeline_IAMTimeline_Release,
380 Timeline_IAMTimeline_CreateEmptyNode,
381 Timeline_IAMTimeline_AddGroup,
382 Timeline_IAMTimeline_RemGroupFromList,
383 Timeline_IAMTimeline_GetGroup,
384 Timeline_IAMTimeline_GetGroupCount,
385 Timeline_IAMTimeline_ClearAllGroups,
386 Timeline_IAMTimeline_GetInsertMode,
387 Timeline_IAMTimeline_SetInsertMode,
388 Timeline_IAMTimeline_EnableTransitions,
389 Timeline_IAMTimeline_TransitionsEnabled,
390 Timeline_IAMTimeline_EnableEffects,
391 Timeline_IAMTimeline_EffectsEnabled,
392 Timeline_IAMTimeline_SetInterestRange,
393 Timeline_IAMTimeline_GetDuration,
394 Timeline_IAMTimeline_GetDuration2,
395 Timeline_IAMTimeline_SetDefaultFPS,
396 Timeline_IAMTimeline_GetDefaultFPS,
397 Timeline_IAMTimeline_IsDirty,
398 Timeline_IAMTimeline_GetDirtyRange,
399 Timeline_IAMTimeline_GetCountOfType,
400 Timeline_IAMTimeline_ValidateSourceNames,
401 Timeline_IAMTimeline_SetDefaultTransition,
402 Timeline_IAMTimeline_GetDefaultTransition,
403 Timeline_IAMTimeline_SetDefaultEffect,
404 Timeline_IAMTimeline_GetDefaultEffect,
405 Timeline_IAMTimeline_SetDefaultTransitionB,
406 Timeline_IAMTimeline_GetDefaultTransitionB,
407 Timeline_IAMTimeline_SetDefaultEffectB,
408 Timeline_IAMTimeline_GetDefaultEffectB,
409 };
410
411 HRESULT AMTimeline_create(IUnknown *pUnkOuter, LPVOID *ppv)
412 {
413 TimelineImpl* obj = NULL;
414
415 TRACE("(%p,%p)\n", pUnkOuter, ppv);
416
417 obj = CoTaskMemAlloc(sizeof(TimelineImpl));
418 if (NULL == obj) {
419 *ppv = NULL;
420 return E_OUTOFMEMORY;
421 }
422 ZeroMemory(obj, sizeof(TimelineImpl));
423
424 obj->ref = 1;
425 obj->IUnknown_inner.lpVtbl = &timeline_vtbl;
426 obj->IAMTimeline_iface.lpVtbl = &IAMTimeline_VTable;
427
428 if (pUnkOuter)
429 obj->outer_unk = pUnkOuter;
430 else
431 obj->outer_unk = &obj->IUnknown_inner;
432
433 *ppv = &obj->IUnknown_inner;
434 return S_OK;
435 }
436
437 /* IAMTimelineObj implementation */
438
439 static HRESULT WINAPI TimelineObj_QueryInterface(IAMTimelineObj *iface, REFIID riid, void **ppv)
440 {
441 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
442
443 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
444
445 if (!ppv)
446 return E_POINTER;
447
448 *ppv = NULL;
449 if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IAMTimelineObj))
450 *ppv = &This->IAMTimelineObj_iface;
451 else if (IsEqualIID(riid, &IID_IAMTimelineGroup))
452 *ppv = &This->IAMTimelineGroup_iface;
453 else
454 WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv);
455
456 if (!*ppv)
457 return E_NOINTERFACE;
458
459 IUnknown_AddRef((IUnknown*)*ppv);
460 return S_OK;
461 }
462
463 static ULONG WINAPI TimelineObj_AddRef(IAMTimelineObj *iface)
464 {
465 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
466 ULONG ref = InterlockedIncrement(&This->ref);
467
468 TRACE("(%p) new ref = %u\n", This, ref);
469
470 return ref;
471 }
472
473 static ULONG WINAPI TimelineObj_Release(IAMTimelineObj *iface)
474 {
475 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
476 ULONG ref = InterlockedDecrement(&This->ref);
477
478 TRACE("(%p) new ref = %u\n", This, ref);
479
480 if (!ref)
481 CoTaskMemFree(This);
482
483 return ref;
484 }
485
486 static HRESULT WINAPI TimelineObj_GetStartStop(IAMTimelineObj *iface, REFERENCE_TIME *start, REFERENCE_TIME *stop)
487 {
488 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
489 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
490 return E_NOTIMPL;
491 }
492
493 static HRESULT WINAPI TimelineObj_GetStartStop2(IAMTimelineObj *iface, REFTIME *start, REFTIME *stop)
494 {
495 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
496 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
497 return E_NOTIMPL;
498 }
499
500 static HRESULT WINAPI TimelineObj_FixTimes(IAMTimelineObj *iface, REFERENCE_TIME *start, REFERENCE_TIME *stop)
501 {
502 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
503 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
504 return E_NOTIMPL;
505 }
506
507 static HRESULT WINAPI TimelineObj_FixTimes2(IAMTimelineObj *iface, REFTIME *start, REFTIME *stop)
508 {
509 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
510 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
511 return E_NOTIMPL;
512 }
513
514 static HRESULT WINAPI TimelineObj_SetStartStop(IAMTimelineObj *iface, REFERENCE_TIME start, REFERENCE_TIME stop)
515 {
516 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
517 FIXME("(%p)->(%s,%s): not implemented!\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(stop));
518 return E_NOTIMPL;
519 }
520
521 static HRESULT WINAPI TimelineObj_SetStartStop2(IAMTimelineObj *iface, REFTIME start, REFTIME stop)
522 {
523 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
524 FIXME("(%p)->(%f,%f): not implemented!\n", This, start, stop);
525 return E_NOTIMPL;
526 }
527
528 static HRESULT WINAPI TimelineObj_GetPropertySetter(IAMTimelineObj *iface, IPropertySetter **setter)
529 {
530 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
531 FIXME("(%p)->(%p): not implemented!\n", This, setter);
532 return E_NOTIMPL;
533 }
534
535 static HRESULT WINAPI TimelineObj_SetPropertySetter(IAMTimelineObj *iface, IPropertySetter *setter)
536 {
537 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
538 FIXME("(%p)->(%p): not implemented!\n", This, setter);
539 return E_NOTIMPL;
540 }
541
542 static HRESULT WINAPI TimelineObj_GetSubObject(IAMTimelineObj *iface, IUnknown **obj)
543 {
544 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
545 FIXME("(%p)->(%p): not implemented!\n", This, obj);
546 return E_NOTIMPL;
547 }
548
549 static HRESULT WINAPI TimelineObj_SetSubObject(IAMTimelineObj *iface, IUnknown *obj)
550 {
551 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
552 FIXME("(%p)->(%p): not implemented!\n", This, obj);
553 return E_NOTIMPL;
554 }
555
556 static HRESULT WINAPI TimelineObj_SetSubObjectGUID(IAMTimelineObj *iface, GUID guid)
557 {
558 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
559 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_guid(&guid));
560 return E_NOTIMPL;
561 }
562
563 static HRESULT WINAPI TimelineObj_SetSubObjectGUIDB(IAMTimelineObj *iface, BSTR guidb)
564 {
565 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
566 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_w(guidb));
567 return E_NOTIMPL;
568 }
569
570 static HRESULT WINAPI TimelineObj_GetSubObjectGUID(IAMTimelineObj *iface, GUID *guid)
571 {
572 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
573 FIXME("(%p)->(%p): not implemented!\n", This, guid);
574 return E_NOTIMPL;
575 }
576
577 static HRESULT WINAPI TimelineObj_GetSubObjectGUIDB(IAMTimelineObj *iface, BSTR *guidb)
578 {
579 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
580 FIXME("(%p)->(%p): not implemented!\n", This, guidb);
581 return E_NOTIMPL;
582 }
583
584 static HRESULT WINAPI TimelineObj_GetSubObjectLoaded(IAMTimelineObj *iface, BOOL *loaded)
585 {
586 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
587 FIXME("(%p)->(%p): not implemented!\n", This, loaded);
588 return E_NOTIMPL;
589 }
590
591 static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE *type)
592 {
593 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
594 TRACE("(%p)->(%p)\n", This, type);
595 if (!type) return E_POINTER;
596 *type = This->timeline_type;
597 return S_OK;
598 }
599
600 static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)
601 {
602 /* MSDN says that this function is "not supported" */
603 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
604 TRACE("(%p)->(%d)\n", This, type);
605 if (type != This->timeline_type) return E_INVALIDARG;
606 return S_OK;
607 }
608
609 static HRESULT WINAPI TimelineObj_GetUserID(IAMTimelineObj *iface, LONG *id)
610 {
611 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
612 FIXME("(%p)->(%p): not implemented!\n", This, id);
613 return E_NOTIMPL;
614 }
615
616 static HRESULT WINAPI TimelineObj_SetUserID(IAMTimelineObj *iface, LONG id)
617 {
618 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
619 FIXME("(%p)->(%d): not implemented!\n", This, id);
620 return E_NOTIMPL;
621 }
622
623 static HRESULT WINAPI TimelineObj_GetGenID(IAMTimelineObj *iface, LONG *id)
624 {
625 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
626 FIXME("(%p)->(%p): not implemented!\n", This, id);
627 return E_NOTIMPL;
628 }
629
630 static HRESULT WINAPI TimelineObj_GetUserName(IAMTimelineObj *iface, BSTR *name)
631 {
632 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
633 FIXME("(%p)->(%p): not implemented!\n", This, name);
634 return E_NOTIMPL;
635 }
636
637 static HRESULT WINAPI TimelineObj_SetUserName(IAMTimelineObj *iface, BSTR name)
638 {
639 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
640 FIXME("(%p)->(%s): not implemented!\n", This, wine_dbgstr_w(name));
641 return E_NOTIMPL;
642 }
643
644 static HRESULT WINAPI TimelineObj_GetUserData(IAMTimelineObj *iface, BYTE *data, LONG *size)
645 {
646 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
647 FIXME("(%p)->(%p,%p): not implemented!\n", This, data, size);
648 return E_NOTIMPL;
649 }
650
651 static HRESULT WINAPI TimelineObj_SetUserData(IAMTimelineObj *iface, BYTE *data, LONG size)
652 {
653 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
654 FIXME("(%p)->(%p,%d): not implemented!\n", This, data, size);
655 return E_NOTIMPL;
656 }
657
658 static HRESULT WINAPI TimelineObj_GetMuted(IAMTimelineObj *iface, BOOL *muted)
659 {
660 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
661 FIXME("(%p)->(%p): not implemented!\n", This, muted);
662 return E_NOTIMPL;
663 }
664
665 static HRESULT WINAPI TimelineObj_SetMuted(IAMTimelineObj *iface, BOOL muted)
666 {
667 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
668 FIXME("(%p)->(%d): not implemented!\n", This, muted);
669 return E_NOTIMPL;
670 }
671
672 static HRESULT WINAPI TimelineObj_GetLocked(IAMTimelineObj *iface, BOOL *locked)
673 {
674 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
675 FIXME("(%p)->(%p): not implemented!\n", This, locked);
676 return E_NOTIMPL;
677 }
678
679 static HRESULT WINAPI TimelineObj_SetLocked(IAMTimelineObj *iface, BOOL locked)
680 {
681 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
682 FIXME("(%p)->(%d): not implemented!\n", This, locked);
683 return E_NOTIMPL;
684 }
685
686 static HRESULT WINAPI TimelineObj_GetDirtyRange(IAMTimelineObj *iface, REFERENCE_TIME *start, REFERENCE_TIME *stop)
687 {
688 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
689 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
690 return E_NOTIMPL;
691 }
692
693 static HRESULT WINAPI TimelineObj_GetDirtyRange2(IAMTimelineObj *iface, REFTIME *start, REFTIME *stop)
694 {
695 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
696 FIXME("(%p)->(%p,%p): not implemented!\n", This, start, stop);
697 return E_NOTIMPL;
698 }
699
700 static HRESULT WINAPI TimelineObj_SetDirtyRange(IAMTimelineObj *iface, REFERENCE_TIME start, REFERENCE_TIME stop)
701 {
702 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
703 FIXME("(%p)->(%s,%s): not implemented!\n", This, wine_dbgstr_longlong(start), wine_dbgstr_longlong(stop));
704 return E_NOTIMPL;
705 }
706
707 static HRESULT WINAPI TimelineObj_SetDirtyRange2(IAMTimelineObj *iface, REFTIME start, REFTIME stop)
708 {
709 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
710 FIXME("(%p)->(%f,%f): not implemented!\n", This, start, stop);
711 return E_NOTIMPL;
712 }
713
714 static HRESULT WINAPI TimelineObj_ClearDirty(IAMTimelineObj *iface)
715 {
716 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
717 FIXME("(%p): not implemented!\n", This);
718 return E_NOTIMPL;
719 }
720
721 static HRESULT WINAPI TimelineObj_Remove(IAMTimelineObj *iface)
722 {
723 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
724 FIXME("(%p): not implemented!\n", This);
725 return E_NOTIMPL;
726 }
727
728 static HRESULT WINAPI TimelineObj_RemoveAll(IAMTimelineObj *iface)
729 {
730 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
731 FIXME("(%p): not implemented!\n", This);
732 return E_NOTIMPL;
733 }
734
735 static HRESULT WINAPI TimelineObj_GetTimelineNoRef(IAMTimelineObj *iface, IAMTimeline **timeline)
736 {
737 /* MSDN says that this function is "not supported" */
738 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
739 TRACE("(%p)->(%p)\n", This, timeline);
740 if (!timeline) return E_POINTER;
741 *timeline = NULL;
742 return E_NOINTERFACE;
743 }
744
745 static HRESULT WINAPI TimelineObj_GetGroupIBelongTo(IAMTimelineObj *iface, IAMTimelineGroup **group)
746 {
747 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
748 FIXME("(%p)->(%p): not implemented!\n", This, group);
749 return E_NOTIMPL;
750 }
751
752 static HRESULT WINAPI TimelineObj_GetEmbedDepth(IAMTimelineObj *iface, LONG *depth)
753 {
754 TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
755 FIXME("(%p)->(%p): not implemented!\n", This, depth);
756 return E_NOTIMPL;
757 }
758
759 static const IAMTimelineObjVtbl IAMTimelineObj_VTable =
760 {
761 TimelineObj_QueryInterface,
762 TimelineObj_AddRef,
763 TimelineObj_Release,
764 TimelineObj_GetStartStop,
765 TimelineObj_GetStartStop2,
766 TimelineObj_FixTimes,
767 TimelineObj_FixTimes2,
768 TimelineObj_SetStartStop,
769 TimelineObj_SetStartStop2,
770 TimelineObj_GetPropertySetter,
771 TimelineObj_SetPropertySetter,
772 TimelineObj_GetSubObject,
773 TimelineObj_SetSubObject,
774 TimelineObj_SetSubObjectGUID,
775 TimelineObj_SetSubObjectGUIDB,
776 TimelineObj_GetSubObjectGUID,
777 TimelineObj_GetSubObjectGUIDB,
778 TimelineObj_GetSubObjectLoaded,
779 TimelineObj_GetTimelineType,
780 TimelineObj_SetTimelineType,
781 TimelineObj_GetUserID,
782 TimelineObj_SetUserID,
783 TimelineObj_GetGenID,
784 TimelineObj_GetUserName,
785 TimelineObj_SetUserName,
786 TimelineObj_GetUserData,
787 TimelineObj_SetUserData,
788 TimelineObj_GetMuted,
789 TimelineObj_SetMuted,
790 TimelineObj_GetLocked,
791 TimelineObj_SetLocked,
792 TimelineObj_GetDirtyRange,
793 TimelineObj_GetDirtyRange2,
794 TimelineObj_SetDirtyRange,
795 TimelineObj_SetDirtyRange2,
796 TimelineObj_ClearDirty,
797 TimelineObj_Remove,
798 TimelineObj_RemoveAll,
799 TimelineObj_GetTimelineNoRef,
800 TimelineObj_GetGroupIBelongTo,
801 TimelineObj_GetEmbedDepth,
802 };
803
804 static HRESULT WINAPI timelinegrp_QueryInterface(IAMTimelineGroup *iface, REFIID riid, void **object)
805 {
806 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
807 return IAMTimelineObj_QueryInterface(&This->IAMTimelineObj_iface, riid, object);
808 }
809
810 static ULONG WINAPI timelinegrp_AddRef(IAMTimelineGroup *iface)
811 {
812 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
813 return IAMTimelineObj_AddRef(&This->IAMTimelineObj_iface);
814 }
815
816 static ULONG WINAPI timelinegrp_Release(IAMTimelineGroup *iface)
817 {
818 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
819 return IAMTimelineObj_Release(&This->IAMTimelineObj_iface);
820 }
821
822 static HRESULT WINAPI timelinegrp_SetTimeline(IAMTimelineGroup *iface, IAMTimeline *timeline)
823 {
824 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
825 FIXME("(%p)->(%p)\n", This, timeline);
826 return E_NOTIMPL;
827 }
828
829 static HRESULT WINAPI timelinegrp_GetTimeline(IAMTimelineGroup *iface, IAMTimeline **timeline)
830 {
831 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
832 FIXME("(%p)->(%p)\n", This, timeline);
833 return E_NOTIMPL;
834 }
835
836 static HRESULT WINAPI timelinegrp_GetPriority(IAMTimelineGroup *iface, LONG *priority)
837 {
838 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
839 FIXME("(%p)->(%p)\n", This, priority);
840 return E_NOTIMPL;
841 }
842
843 static HRESULT WINAPI timelinegrp_GetMediaType(IAMTimelineGroup *iface, AM_MEDIA_TYPE *mediatype)
844 {
845 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
846 FIXME("(%p)->(%p)\n", This, mediatype);
847 return E_NOTIMPL;
848 }
849
850 static HRESULT WINAPI timelinegrp_SetMediaType(IAMTimelineGroup *iface, AM_MEDIA_TYPE *mediatype)
851 {
852 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
853 FIXME("(%p)->(%p)\n", This, mediatype);
854 return E_NOTIMPL;
855 }
856
857 static HRESULT WINAPI timelinegrp_SetOutputFPS(IAMTimelineGroup *iface, double fps)
858 {
859 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
860 FIXME("(%p)->(%f)\n", This, fps);
861 return E_NOTIMPL;
862 }
863
864 static HRESULT WINAPI timelinegrp_GetOutputFPS(IAMTimelineGroup *iface, double *fps)
865 {
866 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
867 FIXME("(%p)->(%p)\n", This, fps);
868 return E_NOTIMPL;
869 }
870
871 static HRESULT WINAPI timelinegrp_SetGroupName(IAMTimelineGroup *iface, BSTR name)
872 {
873 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
874 FIXME("(%p)->(%s)\n", This, debugstr_w(name));
875 return E_NOTIMPL;
876 }
877
878 static HRESULT WINAPI timelinegrp_GetGroupName(IAMTimelineGroup *iface, BSTR *name)
879 {
880 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
881 FIXME("(%p)->(%p)\n", This, name);
882 return E_NOTIMPL;
883 }
884
885 static HRESULT WINAPI timelinegrp_SetPreviewMode(IAMTimelineGroup *iface, BOOL preview)
886 {
887 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
888 FIXME("(%p)->(%d)\n", This, preview);
889 return E_NOTIMPL;
890 }
891
892 static HRESULT WINAPI timelinegrp_GetPreviewMode(IAMTimelineGroup *iface, BOOL *preview)
893 {
894 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
895 FIXME("(%p)->(%p)\n", This, preview);
896 return E_NOTIMPL;
897 }
898
899 static HRESULT WINAPI timelinegrp_SetMediaTypeForVB(IAMTimelineGroup *iface, LONG type)
900 {
901 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
902 FIXME("(%p)->(%d)\n", This, type);
903 return E_NOTIMPL;
904 }
905
906 static HRESULT WINAPI timelinegrp_GetOutputBuffering(IAMTimelineGroup *iface, int *buffer)
907 {
908 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
909 FIXME("(%p)->(%p)\n", This, buffer);
910 return E_NOTIMPL;
911 }
912
913 static HRESULT WINAPI timelinegrp_SetOutputBuffering(IAMTimelineGroup *iface, int buffer)
914 {
915 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
916 FIXME("(%p)->(%d)\n", This, buffer);
917 return E_NOTIMPL;
918 }
919
920 static HRESULT WINAPI timelinegrp_SetSmartRecompressFormat(IAMTimelineGroup *iface, LONG *format)
921 {
922 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
923 FIXME("(%p)->(%p)\n", This, format);
924 return E_NOTIMPL;
925 }
926
927 static HRESULT WINAPI timelinegrp_GetSmartRecompressFormat(IAMTimelineGroup *iface, LONG **format)
928 {
929 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
930 FIXME("(%p)->(%p)\n", This, format);
931 return E_NOTIMPL;
932 }
933
934 static HRESULT WINAPI timelinegrp_IsSmartRecompressFormatSet(IAMTimelineGroup *iface, BOOL *set)
935 {
936 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
937 FIXME("(%p)->(%p)\n", This, set);
938 return E_NOTIMPL;
939 }
940
941 static HRESULT WINAPI timelinegrp_IsRecompressFormatDirty(IAMTimelineGroup *iface, BOOL *dirty)
942 {
943 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
944 FIXME("(%p)->(%p)\n", This, dirty);
945 return E_NOTIMPL;
946 }
947
948 static HRESULT WINAPI timelinegrp_ClearRecompressFormatDirty(IAMTimelineGroup *iface)
949 {
950 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
951 FIXME("(%p)->()\n", This);
952 return E_NOTIMPL;
953 }
954
955 static HRESULT WINAPI timelinegrp_SetRecompFormatFromSource(IAMTimelineGroup *iface, IAMTimelineSrc *source)
956 {
957 TimelineObjImpl *This = impl_from_IAMTimelineGroup(iface);
958 FIXME("(%p)->(%p)\n", This, source);
959 return E_NOTIMPL;
960 }
961
962 static const IAMTimelineGroupVtbl IAMTimelineGroup_VTable =
963 {
964 timelinegrp_QueryInterface,
965 timelinegrp_AddRef,
966 timelinegrp_Release,
967 timelinegrp_SetTimeline,
968 timelinegrp_GetTimeline,
969 timelinegrp_GetPriority,
970 timelinegrp_GetMediaType,
971 timelinegrp_SetMediaType,
972 timelinegrp_SetOutputFPS,
973 timelinegrp_GetOutputFPS,
974 timelinegrp_SetGroupName,
975 timelinegrp_GetGroupName,
976 timelinegrp_SetPreviewMode,
977 timelinegrp_GetPreviewMode,
978 timelinegrp_SetMediaTypeForVB,
979 timelinegrp_GetOutputBuffering,
980 timelinegrp_SetOutputBuffering,
981 timelinegrp_SetSmartRecompressFormat,
982 timelinegrp_GetSmartRecompressFormat,
983 timelinegrp_IsSmartRecompressFormatSet,
984 timelinegrp_IsRecompressFormatDirty,
985 timelinegrp_ClearRecompressFormatDirty,
986 timelinegrp_SetRecompFormatFromSource
987 };