Implement Media and MediaEndpoint API
ClosedPublic

Authored by mweichselbaumer on Sep 25 2018, 12:39 PM.

Details

Summary

Implement Media API including autotests and additional test: mediaendpointconnector

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 25 2018, 12:39 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mweichselbaumer requested review of this revision.Sep 25 2018, 12:39 PM
drosca requested changes to this revision.Sep 25 2018, 1:29 PM

Looks good apart from the coding style.
Also it would be great to have at least basic autotest.

src/media.h
96

Not needed

src/media_p.h
43

= nullptr

44

Same as above

src/mediaendpoint.h
84

Coding style: const QString &transportObjectPath
Please change everywhere

115

Not needed

src/mediaendpoint_p.h
38

typo "namepsace" -> "namespace"

This revision now requires changes to proceed.Sep 25 2018, 1:29 PM
broulik added inline comments.
src/media_p.h
36

I think this needs Q_DECL_HIDDEN

38

Any particular reason this class must inherit QObject, you don't seem to be using signal or slot in it

drosca added inline comments.Sep 25 2018, 3:42 PM
src/media_p.h
36

Why? This class is not exported by default, afaik it is only needed if MediaPrivate was declared inside Media class (eg. Media::MediaPrivate), which it is not.

mweichselbaumer marked 5 inline comments as done.Sep 25 2018, 4:44 PM
mweichselbaumer added inline comments.
src/media_p.h
38

MediaPrivate will later act as parent for child objects (inheriting QObject).

drosca added inline comments.Sep 27 2018, 7:40 AM
src/media_p.h
38

Then just parent them to Media instead of private class.

mweichselbaumer edited the summary of this revision. (Show Details)Oct 3 2018, 7:12 PM

Added autotests and additional test: mediaendpointconnector

drosca requested changes to this revision.Oct 4 2018, 7:49 AM
drosca added inline comments.
src/manager_p.cpp
46

No need because it is smart pointer.

162

As it is smart pointer, it must not have a parent.

src/mediaendpoint.cpp
47

const QVariantMap &

75

Remove commented code.

Also coding style:

if (..) { // braces always, even for one statement
   ..
} else if {
   ...
}
src/mediaendpoint.h
142

const QVariantMap &properties

This revision now requires changes to proceed.Oct 4 2018, 7:49 AM
mweichselbaumer marked 3 inline comments as done and an inline comment as not done.

Fixed style issues and smart pointer construction

drosca added a comment.Oct 4 2018, 3:36 PM

Alright, last thing:

Why NoInputNoOutputAgent? That should be implemented by the application, and not be part of library. In almost all cases you actually want to inform user that something is trying to connect anyway.

Alright, last thing:

Why NoInputNoOutputAgent? That should be implemented by the application, and not be part of library. In almost all cases you actually want to inform user that something is trying to connect anyway.

Yes, i also thought this should be application specific. However, i could not imagine another use case of a NoInputNoOutputAgent, except from doing auto connecting to a limited set of UUIDs. So, i thought it is generic enough to be part of the library.

drosca added a comment.Oct 4 2018, 4:28 PM

Alright, last thing:

Why NoInputNoOutputAgent? That should be implemented by the application, and not be part of library. In almost all cases you actually want to inform user that something is trying to connect anyway.

Yes, i also thought this should be application specific. However, i could not imagine another use case of a NoInputNoOutputAgent, except from doing auto connecting to a limited set of UUIDs. So, i thought it is generic enough to be part of the library.

Well, in any case it has nothing to do being included in this commit. So please take it out, and create a separate revision if you want and we can discuss it there.

drosca accepted this revision.Oct 4 2018, 4:42 PM

Remove NoInputNoOutputAgent and it's good to go.

This revision is now accepted and ready to land.Oct 4 2018, 4:42 PM

Remove NoInputNoOutputAgent and it's good to go.

Agree. Is it ok to move it to mediaendpointconnector?

drosca added a comment.Oct 4 2018, 5:09 PM

Remove NoInputNoOutputAgent and it's good to go.

Agree. Is it ok to move it to mediaendpointconnector?

Sure

drosca added a comment.Oct 4 2018, 6:22 PM

Thanks.
I'll need your full name + e-mail if you don't have dev account to push it.

Thanks.
I'll need your full name + e-mail if you don't have dev account to push it.

You're welcome. It's been a pleasure to contribute to this lib.
Manuel Weichselbaumer, mincequi@web.de

This comment was removed by mweichselbaumer.
This revision was automatically updated to reflect the committed changes.