Skip to content
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

refactor: change namespace to io.github.anilbeesetti #10

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ffcodecs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ afterEvaluate {
publishing {
publications {
create<MavenPublication>("mavenJava") {
groupId = "com.github.anilbeesetti"
groupId = "io.github.anilbeesetti"
artifactId = "nextlib"
version = "1.0"

Expand Down
12 changes: 6 additions & 6 deletions ffcodecs/src/main/cpp/ffaudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ int transformError(int errorNumber) {

extern "C"
JNIEXPORT jlong JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegInitialize(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegInitialize(JNIEnv *env,
jobject thiz,
jstring codec_name,
jbyteArray extra_data,
Expand All @@ -201,7 +201,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegInitializ

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegDecode(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegDecode(JNIEnv *env,
jobject thiz,
jlong context,
jobject input_data,
Expand Down Expand Up @@ -244,7 +244,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegDecode(JN

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetChannelCount(
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetChannelCount(
JNIEnv *env, jobject thiz, jlong context) {
if (!context) {
LOGE("Context must be non-NULL.");
Expand All @@ -255,7 +255,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetChanne

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetSampleRate(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetSampleRate(JNIEnv *env,
jobject thiz,
jlong context) {
if (!context) {
Expand All @@ -267,7 +267,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegGetSample

extern "C"
JNIEXPORT jlong JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegReset(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegReset(JNIEnv *env,
jobject thiz,
jlong jContext,
jbyteArray extra_data) {
Expand Down Expand Up @@ -300,7 +300,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegReset(JNI

extern "C"
JNIEXPORT void JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegRelease(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegAudioDecoder_ffmpegRelease(JNIEnv *env,
jobject thiz,
jlong context) {
if (context) {
Expand Down
6 changes: 3 additions & 3 deletions ffcodecs/src/main/cpp/ffmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {

extern "C"
JNIEXPORT jstring JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegGetVersion(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegGetVersion(JNIEnv *env,
jclass clazz) {
return env->NewStringUTF(LIBAVCODEC_IDENT);
}

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegGetInputBufferPaddingSize(
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegGetInputBufferPaddingSize(
JNIEnv *env, jclass clazz) {
return (jint) AV_INPUT_BUFFER_PADDING_SIZE;
}

extern "C"
JNIEXPORT jboolean JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegHasDecoder(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegLibrary_ffmpegHasDecoder(JNIEnv *env,
jclass clazz,
jstring codec_name) {
return getCodecByName(env, codec_name) != nullptr;
Expand Down
12 changes: 6 additions & 6 deletions ffcodecs/src/main/cpp/ffvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ JniContext *createVideoContext(JNIEnv *env,

extern "C"
JNIEXPORT jlong JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegInitialize(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegInitialize(JNIEnv *env,
jobject thiz,
jstring codec_name,
jbyteArray extra_data,
Expand All @@ -152,7 +152,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegInitializ

extern "C"
JNIEXPORT jlong JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegReset(JNIEnv *env, jobject thiz,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegReset(JNIEnv *env, jobject thiz,
jlong jContext) {
auto *const jniContext = reinterpret_cast<JniContext *>(jContext);
AVCodecContext *context = jniContext->codecContext;
Expand All @@ -167,7 +167,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegReset(JNI

extern "C"
JNIEXPORT void JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRelease(JNIEnv *env, jobject thiz,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRelease(JNIEnv *env, jobject thiz,
jlong jContext) {
auto *const jniContext = reinterpret_cast<JniContext *>(jContext);
AVCodecContext *context = jniContext->codecContext;
Expand All @@ -179,7 +179,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRelease(J

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRenderFrame(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRenderFrame(JNIEnv *env,
jobject thiz,
jlong jContext,
jobject surface,
Expand Down Expand Up @@ -298,7 +298,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegRenderFra

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegSendPacket(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegSendPacket(JNIEnv *env,
jobject thiz,
jlong jContext,
jobject encoded_data,
Expand Down Expand Up @@ -332,7 +332,7 @@ Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegSendPacke

extern "C"
JNIEXPORT jint JNICALL
Java_com_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegReceiveFrame(JNIEnv *env,
Java_io_github_anilbeesetti_nextlib_ffcodecs_FfmpegVideoDecoder_ffmpegReceiveFrame(JNIEnv *env,
jobject thiz,
jlong jContext,
jint output_mode,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import android.content.Context;
import android.os.Handler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import android.annotation.SuppressLint;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import static androidx.media3.exoplayer.audio.AudioSink.SINK_FORMAT_SUPPORTED_DIRECTLY;
import static androidx.media3.exoplayer.audio.AudioSink.SINK_FORMAT_SUPPORTED_WITH_TRANSCODING;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.github.anilbeesetti.nextlib.ffcodecs;

import androidx.media3.common.util.UnstableApi;
import androidx.media3.decoder.DecoderException;

/** Thrown when an FFmpeg decoder error occurs. */
@UnstableApi
public final class FfmpegDecoderException extends DecoderException {

/* package */ FfmpegDecoderException(String message) {
super(message);
}

/* package */ FfmpegDecoderException(String message, Throwable cause) {
super(message, cause);
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import androidx.annotation.Nullable;
import androidx.media3.common.C;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import android.util.Log;
import android.view.Surface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import static java.lang.Runtime.getRuntime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.anilbeesetti.nextlib.ffcodecs;
package io.github.anilbeesetti.nextlib.ffcodecs;

import android.content.Context;
import android.os.Handler;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@NonNullApi
package io.github.anilbeesetti.nextlib.ffcodecs;

import androidx.media3.common.util.NonNullApi;