<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">2013/10/25 Harald Sitter <span dir="ltr"><<a href="mailto:sitter@kde.org" target="_blank">sitter@kde.org</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">On Thu, Oct 24, 2013 at 3:07 PM, Casian Andrei <<a href="mailto:skeletk13@gmail.com">skeletk13@gmail.com</a>> wrote:<br>
><br>
> Proposal draft 2<br>
><br>
> About the Source class and control units:<br>
> A. Source has control units<br>
> B. Can attach control unit to Source<br>
> A or B?<br>
<br>
</div>B IMO. Though B can be implemented through A inside the library/backend.<br>
<br>
The thing is... from a frontend API POV the difference between A and B is<br>
<br>
A:<br>
  Source s;<br>
  foreach (control, s.controls())<br>
     if (qobject_cast<FooControl *>(control))<br>
       qDebug() << "got what we want"<br>
<br>
B:<br>
  Source s;<br>
  FooControl control(s); // attached to source now<br>
<br>
So B is much nicer. However this has no impact on what is going on<br>
internally, since in either case there needs to be a backing object<br>
implementing the FooControlInterface to make an instance do anything.<br>
But due to the backend separation the backend can be A or B if the<br>
backend lifetime expires the active property simply switches state and<br>
all calls to the control end in<br>
<br>
  if (!active)<br>
   return;<br>
<br>
Not sure if that made sense, as I had only one cup of coffee, if not<br>
have a look at backendinterface.h<br>
<br>
virtual QObject *createObject(Class c, QObject *parent, const<br>
QList<QVariant> &args = QList<QVariant>()) = 0;<br>
<br>
In terms of a Source(Control) the createObject function could return a<br>
new object or an existing object or when wanting a SourceControl it<br>
could even return the Source itself (assuming Source : public<br>
FooControl - which probably would be the case for pvlc).<br></blockquote><div>Ok. Looks both nice and flexible enough for me.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
> List of SourceControl classes (pick your preferred names):<br>
> class AbstractSourceControl OR SourceControlUnit OR SourceControl OR<br>
> ControlUnit<br>
<br>
</div>SourceControl unless there are going to be pure virtuals.<br></blockquote><div>Ok. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
>  - property (R): bool active<br>
>  - property (R): source maybe?<br>
<br>
</div>What would that be?<br></blockquote><div>Source *source() ... but it's kind of irelevant.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
>  - parented by source?<br>
<br>
^ as mentioned above this has no impact on the frontend API. Generally<br>
speaking though whoever controls the lifetime of the backendObject<br>
*must* notify the frontend object (i.e. SourceControl) when the<br>
backendObject is deleted, also see Frontend::isValid.<br></blockquote><div>Yes, irelevant. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
> class VideoSourceControl<br>
>  - property (R ): QList<enum> availableMenus<br>
>  - property (RW): int currentMenu<br>
><br>
>  - property (R ): int chapterCount<br>
>  - property (RW): int currentChapter<br>
><br>
>  - property (R ): int angleCount<br>
>  - property (RW): int currentAngle<br>
><br>
>  - property (RW): bool autoplayTitlesEnabled<br>
>  - property (RW): bool currentTitle<br>
>  - method: void previousTitle()<br>
>  - method: void nextTitle()<br>
<br>
</div>^ missing int titleCount?<br></blockquote><div>yes. got confused by the orderings in mediacontroller.h<br>     - property (R ):  int titleCount<br></div><div>     - property (RW): int currentTitle<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Why is there previous/next? There is no such facility to iter through<br>
angles or channels...<br></blockquote><div>That's what I found in mediacontroller.h, don't know why it is that way.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
>  - property (RW): bool subtitleAutodetectionEnabled<br>
>  - property (R ): QList<Subtitle> availableSubtitles<br>
>  - property (R ): Subtitle currentSubtitle<br>
>  - property (RW): QString subtitleEncoding<br>
>  - property (RW): QFont subtitleFont<br>
<br>
</div>May be moving into an effect as mentioned in some other mail.<br></blockquote><div>Ah, yes, I forgot. So these go away from our VideoSourceControl.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="im"><br>
>  - property (R ): QList<AudioChannel> availableAudioChannels<br>
>  - property (RW): AudioChannel audioChannel<br>
<br>
</div>I am wondering if audio only content can have channels too, j-b probably knows.<br>
<div class="im"><br>
> class AudioSourceControl<br>
>  - property (RW): int trackNumber<br>
>  - property (R ): int trackCount<br>
<br>
</div>For the time being I'd only implement this bugger or a limited version<br>
of the VideoSourceControl as I am not done with replacing<br>
ObjectDescriptions so there is quite some subject to change WRT return<br>
types.<br></blockquote><div>Sure. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
> class VideoDeviceSourceControl<br>
>  - property (RW): VideoCaptureDevice device<br>
>  - property (R ): bool audio<br>
>  - property (RW): VideoRes resolution<br>
>  - ...<br>
><br>
> class AudioDeviceSourceControl<br>
>  - property (RW): AudioCaptureDevice device<br>
>  - ...<br>
<br>
</div>^ Daring thought.. how about *one* DeviceSourceControl?<br>
class DeviceSourceControl<br>
- property (RW): DeviceDescription device<br>
- property(R): QFlags<Content> content /* flags for Audio | Video */<br>
<br>
You are the specialist here, but I am wondering if we really need to<br>
split Audio and Video (how often do you actually get to or need to<br>
control the resolution of the input Video?).<br></blockquote><div>I still think we need to keep them split up. Imagining a multimedia application developer, the developer would like to use a streamline low resolution video feed for his webchat application, or a slowish but high resolution video feed for his backyard surveillance system. Also, things that one could possibly change for video differ from audio. Keeping them separate would allow for greater flexibility for us and a nicer api imo. But we will see when we get to them, right now it doesn't matter that much.<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
> class AbstractMediaStreamSourceControl OR MediaStreamSourceControl OR<br>
> StreamSourceControl (does this make sense?)<br>
>  - ???<br>
<br>
</div>Nothing to control IMO.<br></blockquote><div>Great, nothing to implement here :D <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
> After we finish this I will attempt to begin implementing the following<br>
> days. We can still change stuff afterwards.<br>
<br>
</div>I do expect quite some change, so keep the actual code backing limited<br>
until we have finalized this please.<br></blockquote><div>Sure.<br><br>I will place review requests before committing anything related to this.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class=""><div class="h5"><br>
HS<br>
_______________________________________________<br>
kde-multimedia mailing list<br>
<a href="mailto:kde-multimedia@kde.org">kde-multimedia@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-multimedia" target="_blank">https://mail.kde.org/mailman/listinfo/kde-multimedia</a><br>
</div></div></blockquote></div><br></div></div>