Skip to content

Conversation

@i-n-g-o
Copy link
Contributor

@i-n-g-o i-n-g-o commented Jun 12, 2018

No description provided.

@neilcsmith-net
Copy link
Member

Thanks for this! Agree with the need to not hide this, but disagree with this solution. I think we need to find a way to give the error back to the caller, but not sure of the best API to do that. Possibly something along the lines of

Pipeline.launch(String description, List<String> errors);

???

Could also be a chance to move this into Gst. Don't like the confusion with the same named method in Bin.

So, possibly -

Pipeline Gst.parseLaunch(String description, List<String> errors);
Bin Gst.parseBinFromDescription(String description, List<String> errors);

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 12, 2018

yes, agree. would be better to give the error back to the caller.
for completeness we could use a GError instead of String?

Pipeline.launch(String description, List<GError> errors);

also agree to move it into Gst and aligning with gstreamer-function names

@neilcsmith-net
Copy link
Member

Yes, GError makes more sense - for some reason was thinking that was in lowlevel when I commented before - should have checked! (I'm looking at removing all lowlevel types from the external API)

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 12, 2018

Pipeline.initBus() is used after creating the pipeline. it is a private function with comments but without any functionality.
guess this works now and is safe to remove?

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 12, 2018

when passing the error-list to launch(String...) with varargs it would need to look like this:

Pipeline.launch(List<GError> errors, String... pipelineDecription);

better to pass the error-list as first argument then? - that's weird too...

@neilcsmith-net
Copy link
Member

I wouldn't assume it's a no-op too quickly! Am wondering why it's not in the constructor there though?!

@neilcsmith-net
Copy link
Member

Or the new version could be String[]? Or we don't have a new version with String ...?

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 12, 2018

initBus() is actually called in the contructor... so that's fine.

@neilcsmith-net
Copy link
Member

Not in the one that takes an Initializer, which should be the one that gets called here. Need to dig a bit more into that, and also whether getBus() and specifically the Bus constructor is doing something that needs to happen.

Short version - let's leave it for now!

@neilcsmith-net
Copy link
Member

Thanks! Will pull this in but may rethink the API a little more before next release.

@neilcsmith-net neilcsmith-net merged commit 90b1586 into gstreamer-java:master Jun 13, 2018
@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 13, 2018

should the launch() functions in Bin/Pipeline be removed?
(removed them but did not push...)

about the pipeline-constructor: question is why initBus() is not called in the constructor which takes the Initializer...?
if we would move it in there all constructors would call initBus()

@neilcsmith-net
Copy link
Member

I will (probably) deprecate rather than remove the launch() methods for now, with aim to remove before 1.x.

I need to look deeper at the initBus() thing - need to look at any other uses of that constructor first, which will be hidden in native bindings.

@i-n-g-o
Copy link
Contributor Author

i-n-g-o commented Jun 13, 2018

yes. deprecating first...
i will offer another PR which changes BinTest and PipelineTest to use the new functions in Gst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants