-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve M4A file upload detection #1115
Conversation
...couch-onUpload/src/main/java/ca/carleton/gcrc/couch/onUpload/parser/ContentTypeDetector.java
Outdated
Show resolved
Hide resolved
Changes made look good, m4a files worked |
…pload-m4a-file-multimedia
...iit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/ffmpeg/FFprobeProcessor.java
Outdated
Show resolved
Hide resolved
…pload-m4a-file-multimedia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few small issues noted in comments.
|
||
public class FileStream { | ||
|
||
public String codecType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be private right?
JSONArray streams = json.getJSONArray("streams"); | ||
|
||
List<FileStream> fileStreams = new ArrayList<FileStream>(); | ||
for (int i = 0; i < streams.length(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could consider using streams, would make it cleaner IMO but not a big deal if you prefer this appraoch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…pload-m4a-file-multimedia
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now!
* fix the issue with .m4a file upload * fix issue with .m4a file upload * check media stream if the file has audio//video streams * fix logs * fix the code reviews comments * code refactor --------- Co-authored-by: Nunaliit <nunaliit@lunageo-asus> Co-authored-by: Jagdish Kunwar <jkunawr@lunageo.com> Co-authored-by: Jagdish Kunwar <jkunwar@luageo.com>
* fix the issue with .m4a file upload * fix issue with .m4a file upload * check media stream if the file has audio//video streams * fix logs * fix the code reviews comments * code refactor --------- Co-authored-by: kunwarj <121902036+kunwarj@users.noreply.github.com> Co-authored-by: Nunaliit <nunaliit@lunageo-asus> Co-authored-by: Jagdish Kunwar <jkunawr@lunageo.com> Co-authored-by: Jagdish Kunwar <jkunwar@luageo.com>
This fix checks for the media streams of audio or video files after getting the MIME type from Tika library. If the streams has only one stream and its codec type is audio then it treats as audio, else if multiple streams with video codec type, then is treats as video.