After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766637 - ahc: add error logging statement
ahc: add error logging statement
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal minor
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-18 23:30 UTC by Martin Kelly
Modified: 2016-05-19 22:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ahc: add error logging statement (858 bytes, patch)
2016-05-18 23:30 UTC, Martin Kelly
needs-work Details | Review

Description Martin Kelly 2016-05-18 23:30:38 UTC
Created attachment 328162 [details] [review]
ahc: add error logging statement

Just add a log statement in case android.hardware.Camera.getParameters returns NULL.
Comment 1 Wonchul Lee 2016-05-19 01:32:53 UTC
I think the debug log at 2300 line suitable than adding another else. If you think it should have higher log level, how would you like to change that GST_DEBUG to GST_WARNING starting with "return parameters" with fixed message
Comment 2 Sebastian Dröge (slomo) 2016-05-19 08:04:55 UTC
Comment on attachment 328162 [details] [review]
ahc: add error logging statement

Also please put {} around that :)
Comment 3 Martin Kelly 2016-05-19 19:30:40 UTC
My other patch in https://bugzilla.gnome.org/show_bug.cgi?id=766638 makes this bug moot, as it adds error logging in a better way. I will close this bug.

PS - I'm happy to add braces in general (I actually prefer that way), but I was under the impression that gstreamer coding style omitted braces on if and else statements that contain only one line in the body. Am I mistaken?
Comment 4 Tim-Philipp Müller 2016-05-19 19:52:20 UTC
We do

  if (..)
    ...
  else
    ...

or

  if (..) {
    ...
  } else {
    ...
  }

but never

  if (..) {
    ...
  } else
    ...

or

  if (..)
    ...
  else {
    ...
  }

:)
Comment 5 Martin Kelly 2016-05-19 20:02:19 UTC
Got it, thanks for the clarification.
Comment 6 Sebastian Dröge (slomo) 2016-05-19 21:21:05 UTC
I just personally think the last two are very ugly and unbalanced :) But we have code like that
Comment 7 Martin Kelly 2016-05-19 22:04:11 UTC
Heh, I happen to agree. I actually wrote it out with the brace and then removed it in order to comply my false perception of the coding standard.