@@ -169,7 +169,6 @@ def get_scenes_from_cuts(
169169 cut_list : CutList ,
170170 start_pos : ty .Union [int , FrameTimecode ],
171171 end_pos : ty .Union [int , FrameTimecode ],
172- base_timecode : ty .Optional [FrameTimecode ] = None ,
173172) -> SceneList :
174173 """Returns a list of tuples of start/end FrameTimecodes for each scene based on a
175174 list of detected scene cuts/breaks.
@@ -181,20 +180,15 @@ def get_scenes_from_cuts(
181180
182181 Arguments:
183182 cut_list: List of FrameTimecode objects where scene cuts/breaks occur.
184- base_timecode: The base_timecode of which all FrameTimecodes in the cut_list are based on.
185183 num_frames: The number of frames, or FrameTimecode representing duration, of the video that
186184 was processed (used to generate last scene's end time).
187185 start_frame: The start frame or FrameTimecode of the cut list. Used to generate the first
188186 scene's start time.
189- base_timecode: [DEPRECATED] DO NOT USE. For backwards compatibility only.
190187 Returns:
191188 List of tuples in the form (start_time, end_time), where both start_time and
192189 end_time are FrameTimecode objects representing the exact time/frame where each
193190 scene occupies based on the input cut_list.
194191 """
195- # TODO(v0.7): Use the warnings module to turn this into a warning.
196- if base_timecode is not None :
197- logger .error ("`base_timecode` argument is deprecated has no effect." )
198192
199193 # Scene list, where scenes are tuples of (Start FrameTimecode, End FrameTimecode).
200194 scene_list = []
@@ -1099,13 +1093,10 @@ def clear_detectors(self) -> None:
10991093 """Remove all scene detectors added to the SceneManager via add_detector()."""
11001094 self ._detector_list .clear ()
11011095
1102- def get_scene_list (
1103- self , base_timecode : ty .Optional [FrameTimecode ] = None , start_in_scene : bool = False
1104- ) -> SceneList :
1096+ def get_scene_list (self , start_in_scene : bool = False ) -> SceneList :
11051097 """Return a list of tuples of start/end FrameTimecodes for each detected scene.
11061098
11071099 Arguments:
1108- base_timecode: [DEPRECATED] DO NOT USE. For backwards compatibility.
11091100 start_in_scene: Assume the video begins in a scene. This means that when detecting
11101101 fast cuts with `ContentDetector`, if no cuts are found, the resulting scene list
11111102 will contain a single scene spanning the entire video (instead of no scenes).
@@ -1117,9 +1108,6 @@ def get_scene_list(
11171108 end_time are FrameTimecode objects representing the exact time/frame where each
11181109 detected scene in the video begins and ends.
11191110 """
1120- # TODO(v0.7): Replace with DeprecationWarning that `base_timecode` will be removed in v0.8.
1121- if base_timecode is not None :
1122- logger .error ("`base_timecode` argument is deprecated and has no effect." )
11231111 if self ._base_timecode is None :
11241112 return []
11251113 cut_list = self ._get_cutting_list ()
@@ -1424,7 +1412,6 @@ def _decode_thread(
14241412
14251413 def get_cut_list (
14261414 self ,
1427- base_timecode : ty .Optional [FrameTimecode ] = None ,
14281415 show_warning : bool = True ,
14291416 ) -> CutList :
14301417 """[DEPRECATED] Return a list of FrameTimecodes of the detected scene changes/cuts.
@@ -1436,7 +1423,6 @@ def get_cut_list(
14361423 and ending at the last frame detected.
14371424
14381425 Arguments:
1439- base_timecode: [DEPRECATED] DO NOT USE. For backwards compatibility only.
14401426 show_warning: If set to False, suppresses the error from being warned. In v0.7,
14411427 this will have no effect and the error will become a Python warning.
14421428
0 commit comments