diff --git a/site/docs/guide/threads.en-US.md b/site/docs/guide/threads.en-US.md index 0926bbfd..e1c806c0 100644 --- a/site/docs/guide/threads.en-US.md +++ b/site/docs/guide/threads.en-US.md @@ -60,7 +60,6 @@ const pipeline = await createThreadFromClass( ```javascript [node] import DemuxPipeline from '@libmedia/avpipeline/DemuxPipeline' -import DemuxPipelineWorker from './worker' import { Worker } from 'worker_threads' const pipeline = await createThreadFromClass( @@ -71,7 +70,7 @@ const pipeline = await createThreadFromClass( ::: -If you use vite for packaging, you need to add the following configuration for the worker: +If you use vite, you need to add the following configuration for the worker: ```javascript [vite] @@ -108,7 +107,7 @@ export default defineConfig({ ## Use Multi-Threads in webpack -If you are using webpack to build a project, it is recommended to use the webpack plugin to compile. For how to configure it, see [Configuration](./quick-start.md#webpack-plugin). This makes it easier to start multithreading, and there is no need to write a separate worker entry file; and the worker code will not be divided into separate files, it will be created by dynamically generating code at runtime. +If you are using webpack to build your project, it is recommended to use a webpack plugin for compilation. For how to configure it, see [Configuration](./quick-start.md#webpack-plugin). This approach simplifies enabling multi-threading, as it eliminates the need to manually create a separate worker entry file. Additionally, the multi-threaded code is not split into standalone files during compilation. Instead, workers are dynamically created at runtime through code generation. ```javascript diff --git a/site/docs/guide/threads.md b/site/docs/guide/threads.md index cd299f21..ccb12920 100644 --- a/site/docs/guide/threads.md +++ b/site/docs/guide/threads.md @@ -60,7 +60,6 @@ const pipeline = await createThreadFromClass( ```javascript [node] import DemuxPipeline from '@libmedia/avpipeline/DemuxPipeline' -import DemuxPipelineWorker from './worker' import { Worker } from 'worker_threads' const pipeline = await createThreadFromClass( diff --git a/site/docs/guide/timebase.en-US.md b/site/docs/guide/timebase.en-US.md index 182390a4..420cfbe6 100644 --- a/site/docs/guide/timebase.en-US.md +++ b/site/docs/guide/timebase.en-US.md @@ -9,7 +9,7 @@ order: 2 --- # Time base -Time base is a basic concept throughout libmedia, so you must master it. Time base is the unit of time. The data structure of time base is [Rational](https://zhaohappy.github.io/libmedia/docs/libmedia_api/classes/avutil_struct_rational.Rational.html) It represents a fraction, where den is the denominator and num is the numerator. It represents the number of seconds a unit is. For example, we now have a timestamp 100, and the time it represents in different time bases is as follows: +Time base is a basic concept throughout libmedia, so you must understand it. Time base is the unit of time. The data structure of time base is [Rational](https://zhaohappy.github.io/libmedia/docs/libmedia_api/classes/avutil_struct_rational.Rational.html). It represents a fraction, where den is the denominator and num is the numerator. It represents the number of seconds a unit is. For example, we now have a timestamp 100, and the time it represents in different time bases is as follows: - ```{num: 1, den: 1000}``` This time base represents a unit of 1/1000 second, which is 1 millisecond, so 100 is 100*1/1000 second, which is 100 milliseconds; flv uses this time base. - ```{num: 1, den: 90000}``` This time base means that one unit is 1/90000 second, so 100 is 100*1/90000 second, which is about 1.111 milliseconds; ts stream uses this time base. diff --git a/src/cheap b/src/cheap index c27aade1..2cccedeb 160000 --- a/src/cheap +++ b/src/cheap @@ -1 +1 @@ -Subproject commit c27aade17283e7f5889d11ecb21b432768c4fe1d +Subproject commit 2cccedebc13c7a77fe0e9cc4550bd4980bca4864