[Android] Remove recording patches for VLC4
Romain Vimont
git at videolan.org
Wed Oct 30 20:31:57 CET 2019
vlc-android | branch: master | Romain Vimont <rom1v at videolabs.io> | Wed Oct 16 16:35:42 2019 +0200| [a6999a5a56cfa971208cebe03fe291d1ccb3d6a1] | committer: Romain Vimont
Remove recording patches for VLC4
They don't apply anymore, and it will be implemented in VLC directly.
> https://code.videolan.org/videolan/vlc-android/commit/a6999a5a56cfa971208cebe03fe291d1ccb3d6a1
---
...04-libvlc-events-Add-callbacks-for-record.patch | 74 -------------------
...005-libvlc-media_player-Add-record-method.patch | 82 ----------------------
2 files changed, 156 deletions(-)
diff --git a/libvlc/patches/vlc4/0004-libvlc-events-Add-callbacks-for-record.patch b/libvlc/patches/vlc4/0004-libvlc-events-Add-callbacks-for-record.patch
deleted file mode 100644
index 6ed0f1f94..000000000
--- a/libvlc/patches/vlc4/0004-libvlc-events-Add-callbacks-for-record.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 6d161be5efad022d4249549661a739f04cb11255 Mon Sep 17 00:00:00 2001
-From: Soomin Lee <bubu at mikan.io>
-Date: Thu, 27 Sep 2018 18:40:39 +0200
-Subject: [PATCH 4/5] libvlc: events: Add callbacks for record
-
----
- include/vlc/libvlc_events.h | 9 +++++++++
- lib/media_player.c | 16 ++++++++++++++++
- 2 files changed, 25 insertions(+)
-
-diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
-index 62a81104da..22730b35e1 100644
---- a/include/vlc/libvlc_events.h
-+++ b/include/vlc/libvlc_events.h
-@@ -31,6 +31,8 @@
-
- # ifdef __cplusplus
- extern "C" {
-+# else
-+# include <stdbool.h>
- # endif
-
- typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
-@@ -119,6 +121,7 @@ enum libvlc_event_e {
- libvlc_MediaPlayerAudioVolume,
- libvlc_MediaPlayerAudioDevice,
- libvlc_MediaPlayerChapterChanged,
-+ libvlc_MediaPlayerRecordChanged,
-
- /**
- * A \link #libvlc_media_t media item\endlink was added to a
-@@ -346,6 +349,12 @@ typedef struct libvlc_event_t
- const char *device;
- } media_player_audio_device;
-
-+ struct
-+ {
-+ const char *file_path;
-+ bool recording;
-+ } media_player_record_changed;
-+
- struct
- {
- libvlc_renderer_item_t *item;
-diff --git a/lib/media_player.c b/lib/media_player.c
-index 106e7d26b0..bb41dbf17b 100644
---- a/lib/media_player.c
-+++ b/lib/media_player.c
-@@ -447,6 +447,22 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
- }
- }
- }
-+ else if ( newval.i_int == INPUT_EVENT_RECORD )
-+ {
-+ bool recording = var_GetBool( p_input, "record" );
-+ char *file_path = NULL;
-+
-+ if ( !recording )
-+ file_path = var_GetString( p_mi, "record-file" );
-+
-+ event.type = libvlc_MediaPlayerRecordChanged;
-+ event.u.media_player_record_changed.file_path = file_path;
-+ event.u.media_player_record_changed.recording = recording;
-+
-+ libvlc_event_send( &p_mi->event_manager, &event );
-+
-+ free( file_path );
-+ }
-
- return VLC_SUCCESS;
- }
---
-2.20.1
-
diff --git a/libvlc/patches/vlc4/0005-libvlc-media_player-Add-record-method.patch b/libvlc/patches/vlc4/0005-libvlc-media_player-Add-record-method.patch
deleted file mode 100644
index ad2aaff48..000000000
--- a/libvlc/patches/vlc4/0005-libvlc-media_player-Add-record-method.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From de351093bd7df450c3790ec08290ad0927b00236 Mon Sep 17 00:00:00 2001
-From: Soomin Lee <bubu at mikan.io>
-Date: Wed, 31 Oct 2018 10:08:55 +0100
-Subject: [PATCH 5/5] libvlc: media_player: Add record method
-
----
- include/vlc/libvlc_media_player.h | 14 ++++++++++++++
- lib/media_player.c | 19 +++++++++++++++++++
- 2 files changed, 33 insertions(+)
-
-diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
-index 0df3c0bcc7..4e5bb918cb 100644
---- a/include/vlc/libvlc_media_player.h
-+++ b/include/vlc/libvlc_media_player.h
-@@ -25,6 +25,8 @@
- #ifndef VLC_LIBVLC_MEDIA_PLAYER_H
- #define VLC_LIBVLC_MEDIA_PLAYER_H 1
-
-+#define LIBVLC_MEDIA_PLAYER_HAS_RECORDING
-+
- # ifdef __cplusplus
- extern "C" {
- # else
-@@ -2416,6 +2418,18 @@ LIBVLC_API int libvlc_media_player_get_role(libvlc_media_player_t *p_mi);
- LIBVLC_API int libvlc_media_player_set_role(libvlc_media_player_t *p_mi,
- unsigned role);
-
-+/**
-+ * Start/stop recording
-+ *
-+ * \version LibVLC 4.0.0 and later.
-+ *
-+ * \param p_mi media player
-+ * \param directory path of the recording directory or NULL to stop recording
-+ * \return 0 on success, -1 on error
-+ */
-+LIBVLC_API int libvlc_media_player_record(libvlc_media_player_t *p_mi,
-+ const char *directory);
-+
- /** @} audio */
-
- /** @} media_player */
-diff --git a/lib/media_player.c b/lib/media_player.c
-index ee8f27330a..84aa750551 100644
---- a/lib/media_player.c
-+++ b/lib/media_player.c
-@@ -638,6 +638,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
- var_Create (mp, "rate", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT);
- var_Create (mp, "sout", VLC_VAR_STRING);
- var_Create (mp, "demux-filter", VLC_VAR_STRING);
-+ var_Create (mp, "input-record-path", VLC_VAR_STRING);
-
- /* Video */
- var_Create (mp, "vout", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
-@@ -2102,6 +2103,24 @@ int libvlc_media_player_get_role(libvlc_media_player_t *mp)
- return ret;
- }
-
-+int libvlc_media_player_record( libvlc_media_player_t *p_mi,
-+ const char *directory )
-+{
-+ vlc_value_t val = { .psz_string = (char *)directory };
-+ const bool enable = directory != NULL;
-+ input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi );
-+ if( !p_input_thread )
-+ return VLC_EGENERIC;
-+
-+ if( enable )
-+ var_Set( p_mi, "input-record-path", val );
-+
-+ var_SetBool( p_input_thread, "record", enable);
-+
-+ input_Release( p_input_thread );
-+ return VLC_SUCCESS;
-+}
-+
- #include <vlc_vout_display.h>
-
- /* make sure surface structures from libvlc can be passed as such to vlc
---
-2.20.1
-
More information about the Android
mailing list