Get to a mergeable state

This commit is contained in:
Manav Rathi 2024-04-24 12:46:11 +05:30
parent d96f710d6d
commit 51a1c77720
No known key found for this signature in database
7 changed files with 16 additions and 14 deletions

View file

@ -212,6 +212,8 @@ const ffmpegExecWeb = async (
*
* See also: {@link ffmpegExecWeb}.
*/
/*
TODO(MR): Remove me
const ffmpegExecNative = async (
electron: Electron,
command: string[],
@ -227,6 +229,7 @@ const ffmpegExecNative = async (
return await worker.exec(command, blob, timeoutMs);
}
};
*/
const ffmpegExec2 = async (
command: string[],

View file

@ -18,7 +18,6 @@ import {
FileTypeInfo,
Metadata,
ParsedExtractedMetadata,
type DataStream,
type LivePhotoAssets2,
type UploadAsset2,
} from "types/upload";
@ -30,6 +29,7 @@ import {
type ParsedMetadataJSON,
} from "./takeout";
import { getFileName } from "./uploadService";
import type { DataStream } from "@ente/shared/utils/data-stream";
const EXIF_TAGS_NEEDED = [
"DateTimeOriginal",

View file

@ -34,8 +34,6 @@ import {
UploadAsset,
UploadFile,
UploadURL,
isDataStream,
type DataStream,
type FileWithCollection2,
type LivePhotoAssets,
type LivePhotoAssets2,
@ -61,6 +59,7 @@ import {
} from "./thumbnail";
import uploadCancelService from "./uploadCancelService";
import UploadHttpClient from "./uploadHttpClient";
import { isDataStream, type DataStream } from "@ente/shared/utils/data-stream";
/** Upload files to cloud storage */
class UploadService {

View file

@ -3,6 +3,7 @@ import {
B64EncryptionResult,
LocalFileAttributes,
} from "@ente/shared/crypto/types";
import type { DataStream } from "@ente/shared/utils/data-stream";
import { FILE_TYPE } from "constants/file";
import { Collection } from "types/collection";
import {
@ -92,15 +93,6 @@ export interface UploadURL {
objectKey: string;
}
export interface DataStream {
stream: ReadableStream<Uint8Array>;
chunkCount: number;
}
export function isDataStream(object: any): object is DataStream {
return "stream" in object;
}
export interface FileInMemory {
filedata: Uint8Array | DataStream;
/** The JPEG data of the generated thumbnail */

View file

@ -1,7 +1,7 @@
import { getFileNameSize } from "@/next/file";
import type { DataStream } from "@ente/shared/utils/data-stream";
import { FILE_READER_CHUNK_SIZE, PICKED_UPLOAD_TYPE } from "constants/upload";
import { getElectronFileStream, getFileStream } from "services/readerService";
import { DataStream } from "types/upload";
import { getImportSuggestion } from "utils/upload";
// This was for used to verify that converting from the browser readable stream

View file

@ -1,4 +1,4 @@
import { DataStream } from "@/next/types/file";
import type { DataStream } from "../utils/data-stream";
export interface LocalFileAttributes<
T extends string | Uint8Array | DataStream,

View file

@ -0,0 +1,8 @@
export interface DataStream {
stream: ReadableStream<Uint8Array>;
chunkCount: number;
}
export function isDataStream(object: any): object is DataStream {
return "stream" in object;
}