ffpyplayer 4.5.1__tar.gz → 4.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/PKG-INFO +11 -2
  2. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/__init__.py +1 -1
  3. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/core.pyx +4 -4
  4. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tools.pyx +19 -12
  5. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer.egg-info/PKG-INFO +11 -2
  6. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer.egg-info/SOURCES.txt +11 -11
  7. ffpyplayer-4.5.3/pyproject.toml +4 -0
  8. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/setup.py +2 -1
  9. ffpyplayer-4.5.1/pyproject.toml +0 -4
  10. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/COPYING +0 -0
  11. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/README.rst +0 -0
  12. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/clib/misc.c +0 -0
  13. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/clib/misc.h +0 -0
  14. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/ff_consts.pxi +0 -0
  15. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/ffconfig.h +0 -0
  16. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/ffconfig.pxi +0 -0
  17. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/ffmpeg.pxi +0 -0
  18. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/inline_funcs.pxi +0 -0
  19. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/includes/sdl.pxi +0 -0
  20. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/pic.pxd +0 -0
  21. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/pic.pyx +0 -0
  22. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/__init__.py +0 -0
  23. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/clock.pxd +0 -0
  24. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/clock.pyx +0 -0
  25. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/core.pxd +0 -0
  26. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/decoder.pxd +0 -0
  27. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/decoder.pyx +0 -0
  28. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/frame_queue.pxd +0 -0
  29. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/frame_queue.pyx +0 -0
  30. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/player.pxd +0 -0
  31. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/player.pyx +0 -0
  32. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/queue.pxd +0 -0
  33. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/player/queue.pyx +0 -0
  34. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tests/__init__.py +0 -0
  35. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tests/common.py +0 -0
  36. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tests/test_pic.py +0 -0
  37. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tests/test_play.py +0 -0
  38. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/tests/test_write.py +0 -0
  39. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/threading.pxd +0 -0
  40. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/threading.pyx +0 -0
  41. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/writer.pxd +0 -0
  42. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer/writer.pyx +0 -0
  43. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer.egg-info/dependency_links.txt +0 -0
  44. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/ffpyplayer.egg-info/top_level.txt +0 -0
  45. {ffpyplayer-4.5.1 → ffpyplayer-4.5.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ffpyplayer
3
- Version: 4.5.1
3
+ Version: 4.5.3
4
4
  Summary: A cython implementation of an ffmpeg based player.
5
5
  Home-page: https://matham.github.io/ffpyplayer/
6
6
  Author: Matthew Einhorn
@@ -17,12 +17,21 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
20
21
  Classifier: Operating System :: MacOS :: MacOS X
21
22
  Classifier: Operating System :: Microsoft :: Windows
22
23
  Classifier: Operating System :: POSIX :: BSD :: FreeBSD
23
24
  Classifier: Operating System :: POSIX :: Linux
24
25
  Classifier: Intended Audience :: Developers
25
26
  License-File: COPYING
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: summary
26
35
 
27
36
  FFPyPlayer is a python binding for the FFmpeg library for playing and writing
28
37
  media files.
@@ -10,7 +10,7 @@ import platform
10
10
 
11
11
  __all__ = ('dep_bins', )
12
12
 
13
- __version__ = '4.5.1'
13
+ __version__ = '4.5.3'
14
14
  version = __version__
15
15
 
16
16
  # the ffmpeg src git version tested and upto date with,
@@ -1616,7 +1616,7 @@ cdef class VideoState(object):
1616
1616
  if self.audio_dev == -1:
1617
1617
  return -1
1618
1618
 
1619
- if not Mix_RegisterEffect(self.audio_dev, <void (*)(int, void *, int, void *) nogil>sdl_mixer_callback, NULL, self.self_id):
1619
+ if not Mix_RegisterEffect(self.audio_dev, <void (*)(int, void *, int, void *) noexcept nogil>sdl_mixer_callback, NULL, self.self_id):
1620
1620
  return -1
1621
1621
 
1622
1622
  ELSE:
@@ -1654,7 +1654,7 @@ cdef class VideoState(object):
1654
1654
  wanted_spec.format = AUDIO_S16SYS
1655
1655
  wanted_spec.silence = 0
1656
1656
  wanted_spec.samples = FFMAX(AUDIO_MIN_BUFFER_SIZE, 2 << av_log2(wanted_spec.freq // AUDIO_MAX_CALLBACKS_PER_SEC))
1657
- wanted_spec.callback = <void (*)(void *, uint8_t *, int) nogil>self.sdl_audio_callback
1657
+ wanted_spec.callback = <void (*)(void *, uint8_t *, int) noexcept nogil>self.sdl_audio_callback
1658
1658
  wanted_spec.userdata = self.self_id
1659
1659
 
1660
1660
  error = self.open_audio_device(&wanted_spec, &spec)
@@ -1869,7 +1869,7 @@ cdef class VideoState(object):
1869
1869
  if codecpar.codec_type == AVMEDIA_TYPE_AUDIO:
1870
1870
  self.auddec.decoder_abort(self.sampq)
1871
1871
  IF USE_SDL2_MIXER:
1872
- Mix_UnregisterEffect(self.audio_dev, <void (*)(int, void *, int, void *) nogil>sdl_mixer_callback)
1872
+ Mix_UnregisterEffect(self.audio_dev, <void (*)(int, void *, int, void *) noexcept nogil>sdl_mixer_callback)
1873
1873
  Mix_HaltChannel(self.audio_dev)
1874
1874
  Mix_FreeChunk(self.chunk)
1875
1875
  self.chunk = NULL
@@ -1942,7 +1942,7 @@ cdef class VideoState(object):
1942
1942
  av_log(NULL, AV_LOG_FATAL, b"Could not allocate context.\n");
1943
1943
  return self.failed(AVERROR(ENOMEM), ic, &pkt)
1944
1944
  #av_opt_set_int(ic, b"threads", 1, 0)
1945
- ic.interrupt_callback.callback = <int (*)(void *)>self.decode_interrupt_cb
1945
+ ic.interrupt_callback.callback = <int (*)(void *) noexcept>self.decode_interrupt_cb
1946
1946
  ic.interrupt_callback.opaque = self.self_id
1947
1947
 
1948
1948
  if not av_dict_get(self.player.format_opts, b"scan_all_pmts", NULL, AV_DICT_MATCH_CASE):
@@ -78,17 +78,6 @@ the log.
78
78
  '''
79
79
  _loglevel_inverse = {v:k for k, v in loglevels.iteritems()}
80
80
 
81
- codecs_enc = get_codecs(encode=True, video=True)
82
- '''A list of all the codecs available for encoding video. '''
83
- codecs_dec = get_codecs(decode=True, video=True, audio=True)
84
- '''A list of all the codecs available for decoding video and audio. '''
85
- pix_fmts = list_pixfmts()
86
- '''A list of all the pixel formats available to ffmpeg. '''
87
- formats_in = get_fmts(input=True)[0]
88
- '''A list of all the formats (e.g. file formats) available for reading. '''
89
- formats_out = get_fmts(output=True)[0]
90
- '''A list of all the formats (e.g. file formats) available for writing. '''
91
-
92
81
  cdef object _log_callback = None
93
82
  cdef MTMutex _log_mutex= MTMutex(SDL_MT)
94
83
  cdef int log_level = AV_LOG_WARNING
@@ -105,7 +94,7 @@ cdef void call_callback(char *line, int level) nogil:
105
94
  with gil:
106
95
  gil_call_callback(line, level)
107
96
 
108
- cdef void _log_callback_func(void* ptr, int level, const char* fmt, va_list vl) nogil:
97
+ cdef void _log_callback_func(void* ptr, int level, const char* fmt, va_list vl) noexcept nogil:
109
98
  cdef char line[2048]
110
99
  if fmt == NULL or level > log_level:
111
100
  return
@@ -278,6 +267,11 @@ cpdef get_codecs(
278
267
  codec = av_codec_iterate(&iter_codec)
279
268
  return sorted(codecs)
280
269
 
270
+ codecs_enc = get_codecs(encode=True, video=True)
271
+ '''A list of all the codecs available for encoding video. '''
272
+ codecs_dec = get_codecs(decode=True, video=True, audio=True)
273
+ '''A list of all the codecs available for decoding video and audio. '''
274
+
281
275
  cdef list list_pixfmts():
282
276
  cdef list fmts = []
283
277
  cdef const AVPixFmtDescriptor *desc = NULL
@@ -288,6 +282,9 @@ cdef list list_pixfmts():
288
282
  desc = av_pix_fmt_desc_next(desc)
289
283
  return sorted(fmts)
290
284
 
285
+ pix_fmts = list_pixfmts()
286
+ '''A list of all the pixel formats available to ffmpeg. '''
287
+
291
288
  cpdef get_fmts(int input=False, int output=False):
292
289
  '''Returns the formats available in FFmpeg.
293
290
 
@@ -350,6 +347,10 @@ cpdef get_fmts(int input=False, int output=False):
350
347
  fmts = sorted(fmts)
351
348
  return fmts, full_names, exts
352
349
 
350
+ formats_in = get_fmts(input=True)[0]
351
+ '''A list of all the formats (e.g. file formats) available for reading. '''
352
+ formats_out = get_fmts(output=True)[0]
353
+ '''A list of all the formats (e.g. file formats) available for writing. '''
353
354
 
354
355
  def get_format_codec(filename=None, fmt=None):
355
356
  '''Returns the best codec associated with the file format. The format
@@ -706,12 +707,15 @@ def list_dshow_devices():
706
707
 
707
708
  # list devices
708
709
  list_dshow_opts(res, b'dummy', b'list_devices')
710
+ # primary dev name
709
711
  pname = re.compile(' *\[dshow *@ *[\w]+\] *"(.+)" *\\((video|audio)\\) *')
712
+ # alternate dev name
710
713
  apname = re.compile(' *\[dshow *@ *[\w]+\] *Alternative name *"(.+)" *')
711
714
  m = None
712
715
  for msg, level in res:
713
716
  message = msg.decode('utf8')
714
717
 
718
+ # do we match a primary name - i.e. next device
715
719
  m_temp = pname.match(message)
716
720
  if m_temp:
717
721
  m = m_temp
@@ -721,6 +725,7 @@ def list_dshow_devices():
721
725
  continue
722
726
 
723
727
  m_temp = apname.match(message)
728
+ # if we match alternate name and already have primary, then we're adding it
724
729
  if m_temp and m:
725
730
  curr[m_temp.group(1)] = []
726
731
  name_map[m_temp.group(1)] = m.group(1)
@@ -730,6 +735,8 @@ def list_dshow_devices():
730
735
  msg2 = message.encode('utf8')
731
736
  av_log(NULL, loglevels[level], '%s', msg2)
732
737
 
738
+ m = None
739
+
733
740
  # list video devices options
734
741
  vid_opts = re.compile(' *\[dshow *@ *[\w]+\] +(pixel_format|vcodec)=([\w]+) +min +s=\d+x\d+ +fps=(\d+)\
735
742
  +max +s=(\d+)x(\d+) +fps=(\d+).*')
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: ffpyplayer
3
- Version: 4.5.1
3
+ Version: 4.5.3
4
4
  Summary: A cython implementation of an ffmpeg based player.
5
5
  Home-page: https://matham.github.io/ffpyplayer/
6
6
  Author: Matthew Einhorn
@@ -17,12 +17,21 @@ Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
20
21
  Classifier: Operating System :: MacOS :: MacOS X
21
22
  Classifier: Operating System :: Microsoft :: Windows
22
23
  Classifier: Operating System :: POSIX :: BSD :: FreeBSD
23
24
  Classifier: Operating System :: POSIX :: Linux
24
25
  Classifier: Intended Audience :: Developers
25
26
  License-File: COPYING
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: home-page
32
+ Dynamic: license
33
+ Dynamic: license-file
34
+ Dynamic: summary
26
35
 
27
36
  FFPyPlayer is a python binding for the FFmpeg library for playing and writing
28
37
  media files.
@@ -2,17 +2,17 @@ COPYING
2
2
  README.rst
3
3
  pyproject.toml
4
4
  setup.py
5
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/pic.pyx
6
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/threading.pyx
7
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/tools.pyx
8
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/writer.pyx
9
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/clib/misc.c
10
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/clock.pyx
11
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/core.pyx
12
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/decoder.pyx
13
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/frame_queue.pyx
14
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/player.pyx
15
- D:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/queue.pyx
5
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/pic.pyx
6
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/threading.pyx
7
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/tools.pyx
8
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/writer.pyx
9
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/clib/misc.c
10
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/clock.pyx
11
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/core.pyx
12
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/decoder.pyx
13
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/frame_queue.pyx
14
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/player.pyx
15
+ C:/a/ffpyplayer/ffpyplayer/ffpyplayer/player/queue.pyx
16
16
  ffpyplayer/__init__.py
17
17
  ffpyplayer/pic.pxd
18
18
  ffpyplayer/pic.pyx
@@ -0,0 +1,4 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools", "wheel", "cython~=3.0.11",
4
+ ]
@@ -376,7 +376,7 @@ with open('README.rst') as fh:
376
376
 
377
377
  setup_requires = []
378
378
  if declare_cython:
379
- setup_requires.append('cython~=0.29.36')
379
+ setup_requires.append('cython~=3.0.11')
380
380
 
381
381
  setup(name='ffpyplayer',
382
382
  version=ffpyplayer.__version__,
@@ -399,6 +399,7 @@ setup(name='ffpyplayer',
399
399
  'Programming Language :: Python :: 3.10',
400
400
  'Programming Language :: Python :: 3.11',
401
401
  'Programming Language :: Python :: 3.12',
402
+ 'Programming Language :: Python :: 3.13',
402
403
  'Operating System :: MacOS :: MacOS X',
403
404
  'Operating System :: Microsoft :: Windows',
404
405
  'Operating System :: POSIX :: BSD :: FreeBSD',
@@ -1,4 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "setuptools", "wheel", "cython~=0.29.36",
4
- ]
File without changes
File without changes
File without changes